Repository navigation
fix(docs): recognize native changelog routes in link validation - #6979
Conversation
When the Hermes gateway restarts after a SIGUSR1, it can commit the apply-state hash advance to .config-hash concurrently with the transaction helper's own verify step. The race detector in _atomic_replace_preserving_flags then throws UnsafePathError, causing apply_transaction_and_reload to enter the rollback path. The rollback immediately fails with "rollback requires a pending desired configuration" because the hash is already current/current, leaving the sandbox with a mismatched config/hash and blocking future MCP mutations. Before starting the rollback, check whether the gateway already committed the apply: if the config still matches the intended text and inspect_mcp_integrity reports "current", the operation succeeded and rolling back would undo a live gateway configuration. Return success instead. Adds a test that simulates the race by mocking _refresh_and_verify_hashes to advance the hash to current/current then raise the race error, and asserts that apply_transaction_and_reload returns ok=True without attempting a rollback. Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
#6900 moved docs/release-notes.mdx to docs/changelog/ but left the link in platform-support.mdx pointing to the old path. Update to ../changelog/overview so the local link checker resolves the file. Signed-off-by: Prekshu Vyas <prekshiv@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe docs link checker now indexes Fern changelog entries as canonical overview routes and includes a test confirming links resolve through the changelog’s published slug. ChangesChangelog route resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agents/hermes/mcp-config-transaction.py`:
- Around line 698-699: Update the recovery-probe exception handling around the
broad except block to retain a non-sensitive diagnostic for the eventual error
instead of silently discarding the failure. Preserve the existing
fallback-to-rollback behavior, and add an inline comment documenting why this
deliberately catches broadly; ensure the eventual error includes the captured
diagnostic without exposing sensitive details.
- Around line 689-697: Update the success condition in the transaction flow
around guard._read_text and inspect_mcp_integrity to verify every path returned
by _managed_hash_paths(privileged) is "current", rather than checking only
integrity_path. Preserve the existing committed-text comparison and
deny-by-default fail-closed behavior, and add a regression case covering a
strict-anchor advance without the compatibility-anchor advance.
In `@test/hermes-mcp-apply-race.test.ts`:
- Line 17: Update the suite title in the “Hermes MCP apply-state race recovery”
describe block to append the local issue reference as the final “(`#1234`)”
suffix, leaving child test titles unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 563c0352-52d9-4820-b3a0-d8252dc01d73
📒 Files selected for processing (3)
agents/hermes/mcp-config-transaction.pydocs/reference/platform-support.mdxtest/hermes-mcp-apply-race.test.ts
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
|
@miyoungc This PR is ready for maintainer review and exact-diff E2E authorization.
After reviewing this exact revision, please dispatch |
Summary
../release-noteslink used by Fernchangelognavigation nodes by their published slugRoot cause
#6900 migrated release notes to Fern native changelog navigation. The published route remains
/user-guide/<variant>/release-notes, but the lightweight parser incheck-docs.shindexed only pages and sections. It therefore rejected the valid../release-notesroute. Pointing the link at../changelog/overviewresolves on disk but does not correspond to a published Fern route.Test plan
npm run docs:check-routesnpm run check:diffSigned-off-by: Prekshi Vyas prekshiv@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests