Repository navigation
fix(api): authorize inbox question writes and exact readback - #622
Closed
adrianwebb wants to merge 25 commits into
Closed
adrianwebb wants to merge 25 commits into
adrianwebb wants to merge 25 commits into
Conversation
Preserve all 15 original Writer, Tester, and Engineer commits, including the request-changes correction. Relocate the unchanged regression into its existing parent ownership directory to meet the ten-file limit; focused checks and architecture policy pass.
8 of 10 tasks
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.
Superseded by #623: its authoring/gateway permission repair is included in checked head85eff60cd941058c04aa975746ab1c8d4838d01c, complete Verify40159462985/PASS, merged to staging2793e2a68a2b41d668f6f8a93fc20ecae60b4396 with identical tree read-back. This PR is closed as superseded, not separately merged. Original failed observations and work authority remain below and in #553.
Outcome
Repair the native inbox question-authoring permission failure observed while recording the real Deployment simulation-origin handoff. Grant the generated question path for writing and immutable readback; grant an agent question signal’s exact path during inbox synchronization. This slice does not yet connect questions to work-item execution gates.
Work authority
Contributor mode (select one):
Plan
Small first slice: reproduce missing question scope; authorize only the known question path; verify exact returned commit, path, and bytes; retain failures and close the workspace. Native integration and coded coverage use the existing original TreeDX fixture and component scene. Follow-up slices must connect existing relatedWorkItems to scoped graph conditions, verify exact answers, repair retry recovery, and stop re-admitting already-current estimators. Those behaviors are unresolved here.
Changes and commits
4e3cee8 requests workspacePaths for question authoring/readback and agent question synchronization. It retains the existing gateway and canonical TreeDX question format, rejects moved/missing/wrong-path/changed-byte readback before integrated journal recording, and closes failed workspaces. No broad relation scope or new store/model/runner is introduced. Prior commits belong to #615 and remain independently attributed there.
Verification
Focused regression before fix: four failing cases, including Permission denied. After fix: 11 cases across inbox question scope and gateway broker identity passed. Exact commands: TREESEED_SDK_SOURCE_ROOT=/tmp/codex-sdk-schedule496 node node_modules/vitest/vitest.mjs run --config vitest.control-plane.config.ts tests/unit/control-plane/knowledge/inbox/question-scope.test.ts tests/unit/control-plane/treedx/knowledge/gateway-broker-identity.test.ts; npm run check:file-lengths; npm run build:dist; git diff --check. All passed locally. Native TreeDX environment is absent locally; real integration and coded-scene verification are pending Actions. No new runtime activation or acceptance claim.
Risk and rollback
No migration. Exact readback rejects any transformed bytes; the native case must prove the owning transport preserves them. Revert only 4e3cee8 to restore prior question behavior; preserve authored TreeDX commits, retained products, and unrelated work. Do not revert the separately reviewed #615 base.
Completion summary
Draft pending exact-head full verification and #615 merge. Question-path permission repair implemented; runtime gate, exact-answer lifecycle, idempotent partial retry, repeated-estimation admission, and full simulation release remain unproven. No actual source implementation or release by the Deployment agents is claimed.
AGPL committer authorization
The base-owned approved-committer workflow remains authoritative; no grant or license change.
Submission checklist
Native failure and current replacement
Exact4e3cee8cd6ed3e3026875190049eabb5e1d53ff5 Verify40147338808 failed the new native question authoring case before complete verification: TreeDX denied workspace creation because omitted allowedPaths defaulted to [**]. Forty other focused prerequisite cases passed; this was not a qualified candidate. The failure is retained. Replacement f4d9b67 explicitly requests allowedPaths=[the generated question path] at workspace creation as well as the existing token/read scopes. A focused regression reproduced six failures/two denials passing before this correction; final11 cases/two files, policies, build and diff checks pass. Fresh exact-head native/full verification is pending. No failed evidence is counted as a pass. API615 has since merged as c7e9bab after complete40142447990 SUCCESS. Later scoped question graph/answer work is a separate unpublished candidate and is not part of this permission slice.
Writable-mode correction after the second native observation
Replacement f4d9b67 Verify40148206798 passed workspace creation but failed the new native changeset at files:write. The owning TreeDX workspace contract defaults omitted mode to read_only and omitted allowedPaths to [**]; the API omitted both. No token or policy broadening is appropriate. Current9054ba7e992b3711ba70b3c0d0788266dda3f4bb explicitly supplies mode=writable and exactly one question path, with exact write/readback scope. Unit regression reproduced six failures/two denials before the mode correction; final11cases/two files PASS, policies/build/diff PASS. Full fresh Verify40149077683 is running; native success, merge, and runtime adoption remain unproven. Historical permission failures above remain retained.