Repository navigation
fix(session): compare server entrypoint file identity - #8849
1052326311 wants to merge 1 commit into
Conversation
[Low impact] The PR appears safe to merge. SummaryChanges
Reviews (1) · Last reviewed commit: "fix(session): compare entrypoint file id..." · Reviewed by Greptile |
|
TL;DR: All 12 tests in the changed test file passed on three Node versions. With I ran
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/mcp/serverIdentity.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Fixes #8844 Supersedes #8849 Co-Authored-By: gensokyo-dev <[email protected]>
Fixes #8844 Supersedes #8849 Co-Authored-By: gensokyo-dev <[email protected]>
Fixes #8844 Supersedes #8849 Co-Authored-By: gensokyo-dev <[email protected]>
|
Thank you for this fix. It landed in #10499 with your authorship kept on the commit (adapted where noted in the PR), so I'm closing this PR as superseded. |
Summary
Fixes #8844.
binary_sessionnow compares the selected entrypoint file when two absolute path spellings differ, so a Bun launch through a directory symlink followed by..no longer receives false restart advice.Problem and expected behavior
On
main@c3647ade1, an actual Bun 1.4.4 MCP server launched throughlink/../scripts/rea.mjsreportedregistration_path_mismatchfor that exact caller path even though it selected the same file as the canonical entrypoint. Lexicalresolve()changes the meaning of this POSIX path after symlink traversal.Change and scope
The server identity owner compares equal spellings directly and, on POSIX when spellings differ, compares filesystem device/inode identity. A different file remains a mismatch; if either path cannot be inspected, the result remains
unknownwith explicit guidance. Windows retains its existing lexical path behavior. This is an ordinary fix within the existing read-only session status contract; no new provider or target authority is added.Contract and boundary impact
src/serverIdentity.ts; thebinary_sessionMCP result consumes this alignment decision. No parallel path interpretation remains in this flow.server_identity.alignmentstops giving false restart advice for a verified same-file caller path. Schema and catalog unchanged.Expected effects:
Evidence and regression coverage
unknown.main@c3647ade1withregistration_path_mismatchand passed with this change.{"state":"aligned","reasons":[],"remediation":null}frombinary_sessionon the same session.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/mcp/serverIdentity.test.ts src/contracts/sessionPathInputs.test.tson Node 24.22.1: 26 passed, 3 skipped.npm run check:faston Node 24.22.1: passed.npm run checkon Node 24.22.1: passed (format, typecheck, lint, Knip, architecture guards and typed lint; existing advisory warnings remain).aligned.git diff --cached --checkbefore commit: passed.Compatibility, safety, and release
statof the two supplied entrypoint paths only; no target access or mutation.Author readiness
Human owner:
Before merge
type(scope): outcome.