fix(handshake): close three auth gaps (+ graphify code/ graph) - #7
Draft
focusedbrain wants to merge 2 commits into
Draft
fix(handshake): close three auth gaps (+ graphify code/ graph)#7focusedbrain wants to merge 2 commits into
focusedbrain wants to merge 2 commits into
Conversation
Build an initial graphify map of code/ using tree-sitter AST extraction only. PDFs and documentation are excluded via .graphifyignore so the graph reflects the current codebase; docs can be added selectively later. Co-authored-by: focusedbrain <focusedbrain@users.noreply.github.com>
Apply row-level session visibility to handshake.get/queryStatus/delete, require assertRecordForServiceRpc for sandbox DC capability responses, and use canonical role/eligibility policy in internalSandboxesApi instead of local_role. Add regression coverage for each fix. Co-authored-by: focusedbrain <focusedbrain@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Aug 8, 2026
Bounded pass ordered after phase-2-complete and before Phase 3, because p2p/coordination-client overlaps Phase-3 territory. Of the 35 failing identities in the five suites, only 29 are consolidation- inherited: they step in at exactly one commit, the #7 merge dffec03, whose canonical coordination-device-id role derivation the four clone-prepare fixtures do not satisfy — they still encode the retired local_role model and set no coordination ids. The product fails closed as that merge intended. The other 6 predate the consolidation and split three ways: harness schema lag, one unresolved seal-verification case where a product defect is not excluded, and two coordination-client tests that assert a deliberately retired relay path and an enqueue shape that no longer validates. CC_05b also fails alone at every commit probed yet passed in one full-workspace run, so the suite can report a broken test as green. Counting failures would not have caught that; the identity-set comparison did. No fixes applied; fix-vs-defer is the author's per class. Co-authored-by: focusedbrain <focusedbrain@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Aug 8, 2026
…erivation B. PR #7 replaced the local_role role derivation with the canonical coordination-device-id derive, on the grounds that local_role is a per-device view that can disagree with the ledger. These fixtures still set only local_role and no coordination ids, so the derive returned device_id_not_in_handshake and the product refused every prepare. The fail-closed refusal is the enforcement #7 added and is left untouched; the fixtures now name the local instance, following the 2a24cdb precedent. Co-authored-by: focusedbrain <focusedbrain@users.noreply.github.com>
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
Closes three confirmed handshake / Host-AI authorization inconsistencies, with regression tests for each. Also includes the earlier
code/graphify knowledge graph on this branch.Authorization fixes
handshake.get,handshake.queryStatus, andhandshake.deletenow applyhandshakeRowVisibilityForSession(fail-closed asHANDSHAKE_NOT_FOUND) so single-row reads/deletes match list filtering.handleP2pDcInferenceCapabilitiesAsSandboxnow requires fullassertRecordForServiceRpceligibility (not role-derive alone), matching the Host handler.internalSandboxesApiHost/Sandbox decisions — replace weakerlocal_rolechecks withderiveInternalHostAiPeerRoles+assertRecordForServiceRpcfor eligibility.Protocol behavior for authorized callers is preserved (including existing delete state policy).
Regression tests
ipc.rowSessionAuth.regression.test.tsp2pDcCapabilities.sandboxServiceRpc.regression.test.tsinternalSandboxesApi.canonicalRoles.regression.test.tsregressionMatrix.relayHandshakeSandbox.test.tsfor coordination-id eligibilityGraphify (prior on branch)
AST-only knowledge graph for
code/undergraphify-out/(PDFs/docs excluded via.graphifyignore).Test plan
vitest runon the three new regression suites + relay handshake matrix (23 passed)handshake.getdoes not leak row data