Skip to content

docs(api): document isLocked field in stat() response (#1940)#1956

Merged
qin-ctx merged 2 commits into
volcengine:mainfrom
r266-tech:docs-stat-islocked-1940
May 11, 2026
Merged

docs(api): document isLocked field in stat() response (#1940)#1956
qin-ctx merged 2 commits into
volcengine:mainfrom
r266-tech:docs-stat-islocked-1940

Conversation

@r266-tech
Copy link
Copy Markdown
Contributor

Summary

#1940 (feat(fs): expose isLocked in stat() to surface path-lock state, fengluodb / qin-ctx merge 2026-05-09) added an isLocked boolean to the dict returned by VikingFS.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 the stat() Response example don't know the new field exists.

Changes

docs/en/api/03-filesystem.md and docs/zh/api/03-filesystem.md stat() Response section:

  1. Add "isLocked": false to the JSON example, mirroring the docstring example in viking_fs.py ({... 'isDir': True, 'isLocked': False, 'meta': {...}}).
  2. Add one descriptive sentence paraphrasing the PathLock.is_locked detection rules + the best-effort fallback behavior — both verbatim from the source PR's docstring/body.

Description sources (verbatim from #1940):

  • Detection rules: "Aligned with conflict-detection in the acquire flow: the path itself has a valid .path.ovlock; or any ancestor directory holds a SUBTREE lock."
  • Best-effort fallback: "Both are best-effort and degrade to False when the LockManager is unavailable, keeping stat() resilient."
  • User benefit: "Without having to attempt a write and observe 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 isLocked is available without inspecting the returned dict at runtime.

EN + ZH parity preserved.

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1940 - Partially compliant

Compliant requirements:

  • Document the new isLocked field in English API reference
  • Document the new isLocked field in Chinese API reference

Non-compliant requirements:

  • Document the new isLocked field in Japanese API reference
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 95
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

Documentation Inconsistency
Japanese API reference for stat() is missing the new isLocked field, breaking consistency across all supported language versions (en/zh/ja).

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@qin-ctx qin-ctx merged commit 217eaa5 into volcengine:main May 11, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants