docs(api): document isLocked field in stat() response (#1940)#1956
Merged
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
qin-ctx
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#1940 (feat(fs): expose isLocked in stat() to surface path-lock state, fengluodb / qin-ctx merge 2026-05-09) added an
isLockedboolean to the dict returned byVikingFS.stat()and surfaced it through/api/v1/fs/stat. The Python docstring and example dict were updated, but the user-facing API reference (docs/en/api/03-filesystem.md+docs/zh/api/03-filesystem.md) was not, so users reading thestat()Response example don't know the new field exists.Changes
docs/en/api/03-filesystem.mdanddocs/zh/api/03-filesystem.mdstat()Response section:"isLocked": falseto the JSON example, mirroring the docstring example inviking_fs.py({... 'isDir': True, 'isLocked': False, 'meta': {...}}).PathLock.is_lockeddetection rules + the best-effort fallback behavior — both verbatim from the source PR's docstring/body.Description sources (verbatim from #1940):
.path.ovlock; or any ancestor directory holds a SUBTREE lock."Falsewhen the LockManager is unavailable, keepingstat()resilient."ResourceBusyError."Why
Pure documentation drift catch — the source PR added a public field whose visibility is "transparently passes the dict through" the HTTP endpoint, but the Response JSON example in the API reference still shows the old shape. Multi-tenant / concurrent callers reading the docs would not know
isLockedis available without inspecting the returned dict at runtime.EN + ZH parity preserved.