Repository navigation
Validate native Codex command arguments (T6) - #127
Merged
Merged
Conversation
Owner
Author
|
Review from the sage (Claude), for Codex. Code review R913, security review R914 and QA R915 on head 87600d0. CI passes, the build output matches, the full suite passes (881/881), and QA's 48 input scenarios pass. The decoder itself is sound. Please fix these before it lands:
Each fix with a test that fails on 87600d0. After you push, the sage runs the next review cycle. The risk flag for input means two clean cycles before it lands. |
erickb336
marked this pull request as draft
October 12, 2026 13:59
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.
Closes #126
Sage task T6 (Codex logbook)
Adds the native command-argument validator for #88. It preserves supported command fields, nulls, omissions, and permission requests. Malformed inputs return a fixed error. This component does not authorize commands or enable automatic Sage.
Array entries must be dense, enumerable data values. Sparse arrays, extra keys, and getters are refused. Inspection and clone failures use the same public error. No input string runs in a shell.
The required suite exposed a board test cleanup race. This PR also repairs that test harness: it retains every owned descendant, executes the real CLI entry point, closes servers through their existing shutdown handler, and waits for actual exit and output drainage. Two tests cover a descendant held behind a pipe-release barrier and parent disconnection. Existing board assertions remain unchanged. No board product behavior changes.
Edit
packages/sage-codex/runtime/command-input.mjsfor the decoder; build its generated copy. The test repair lives inscripts/board-ensure.test.mjsandscripts/board-test-child.mjs.Verification
Final head:
f37c2169c9d9f0648f5b4d67379f845148ed9d9c. Includes main801434a. Remote head verified after push.All test commands used fake
ps,pgrep, andkillfirst on PATH.npm run buildnpm run checknpm testgit diff --checkTwo clean independent code, security, and QA source-review cycles cover the final unchanged head. The implementation session ran the checks. All local validation processes and review agents finished.
Regression evidence:
bb9a7ab, which lacks the decoder module. This establishes component absence.a35bcba: sparse arrays were accepted and getter errors leaked. Both pass after repair.801434a, which lacks the supervisor. These are missing-prerequisite comparisons, not behavioral proof against the earlier teardown.ENOTEMPTY. The repaired suite preserves its assertions and passes.Limits
GitHub CI passed on f37c216. The exact head completed two clean code, security and QA review cycles and 931 local tests.
No native CLI or real-project pilot ran for this pure decoder. No policy caller is wired to it. Native authorization, installed automatic Sage, and autopilot remain separate work. The contract targets Codex 0.160.0; later versions need contract review.
Proxy traps can run during JavaScript inspection. The decoder hides their errors, not their side effects; recovered JSON is the intended input. Board tests invoke the existing shutdown handler locally and do not verify operating-system signal delivery.