Repository navigation
Validate shared command and push policy configuration - #75
Conversation
|
Two more focused splits are verified and backed up as branches. Their PRs remain unopened pending review of #78.
They form a chain on #78. Existing hook tests are unchanged. The file/mode split adds core files to one launcher fixture without changing assertions or release metadata. #79 is the separate #76 follow-up; its CI passes and it awaits review. #77's documentation change is prepared locally. The lead/child split is under a dependency audit: atomic capacity checks must stay with role limits; native hooks remain the final split. No claim of installed Codex lifecycle enforcement is made by these prepared core branches. |
|
The fourth split is verified and backed up on Build: 130 files. Check: all checks pass. Full suite: 525 tests passed, 0 failed. All 47 added tests fail on detached main. Independent review found no remaining blockers after a malformed-UTF-8 journal corruption fix; that regression failed before repair. This split checks role rules and capacity in one atomic core operation. It does not authenticate native actors, release completed reservations, or activate installed-session enforcement. Those boundaries remain explicit. Claude nested-spawn work in #62 remains separate, as does the final Codex runtime/native-hook split. |
|
The fifth split is backed up on It packages the inactive Codex runtime and shared role instructions. Build produced 212 files, check passed, and the full suite passed all 642 tests. All 117 added tests fail individually on detached main ( Automatic Sage remains unfinished: complete tool policy, report acceptance, capacity release, lifecycle recovery, activation wiring, and a real-project pilot remain. The draft also records the unresolved |
|
Extraction coverage note: the five prepared branches preserve the earlier policy fixes and installed Claude behavior. The saved broad draft also validates command-policy setup paths and push-policy callbacks, validates branch-reader return values, and freezes those policy objects. Those extra API changes are not runtime dependencies and were not included in the behavior-preserving extractions. They remain here for separate review. The draft's command-reader and mode-policy notes also remain here. The former predates merged T199; the latter describes an earlier fixture-based mode probe. The extracted runtime has current contracts for its tested behavior and remaining gaps. Issue #77 is now fully checked and backed up on |
# Conflicts: # packages/sage-claude/agents/chief-of-staff.md # packages/sage-claude/hooks/command-policy.mjs # packages/sage-claude/hooks/command-reader.mjs # packages/sage-claude/hooks/sage-hook.mjs # packages/sage-core/command-policy.mjs # packages/sage-core/command-reader.mjs # packages/sage-core/index.mjs # plugins/sage-codex/core/command-policy.mjs # plugins/sage-codex/core/command-reader.mjs # plugins/sage-codex/core/index.mjs # plugins/sage/core/command-policy.mjs # plugins/sage/core/command-reader.mjs # plugins/sage/core/index.mjs # plugins/sage/hooks/command-policy.mjs # plugins/sage/hooks/command-reader.mjs # plugins/sage/hooks/sage-hook.mjs # scripts/providers.test.mjs # scripts/sage-hook.test.mjs
# Conflicts: # packages/sage-claude/hooks/sage-hook.mjs # packages/sage-core/command-policy.mjs # packages/sage-core/index.mjs # packages/sage-core/pull-request.mjs # packages/sage-core/push-policy.mjs # plugins/sage-codex/core/command-policy.mjs # plugins/sage-codex/core/index.mjs # plugins/sage-codex/core/pull-request.mjs # plugins/sage-codex/core/push-policy.mjs # plugins/sage/core/command-policy.mjs # plugins/sage/core/index.mjs # plugins/sage/core/pull-request.mjs # plugins/sage/core/push-policy.mjs # plugins/sage/hooks/sage-hook.mjs
# Conflicts: # packages/sage-claude/hooks/sage-hook.mjs # plugins/sage/hooks/sage-hook.mjs # scripts/providers.test.mjs
# Conflicts: # packages/sage-core/admission.md # packages/sage-core/admission.mjs # packages/sage-core/index.mjs # plugins/sage-codex/core/admission.md # plugins/sage-codex/core/admission.mjs # plugins/sage-codex/core/index.mjs # plugins/sage/core/admission.md # plugins/sage/core/admission.mjs # plugins/sage/core/index.mjs # scripts/providers.test.mjs
# Conflicts: # packages/sage-codex/runtime/mcp-sdk.md # packages/sage-core/index.mjs # plugins/sage-codex/core/index.mjs # plugins/sage-codex/runtime/mcp-sdk.md # plugins/sage/core/index.mjs # scripts/providers.test.mjs
This PR rejects malformed provider configuration before shared command and push checks run. It completes the remaining shared-core validation from the Codex lifecycle split. It references #55 and #88. The five original splits merged as #78, #80, #82, #83, and #84.
The remaining changes reject invalid trusted command-policy paths, invalid push-policy configuration, and malformed branch-reader results. They freeze returned policy objects and export the existing
commandTextreader. They do not change the parser. The diff also retains compatibility checks, command-reader documentation, and a complete-plugin test fixture.The branch includes main
69cb227, through #123. Reviewed head:fa31ca00b04a67da612c41bf4985d797a5486510. The Claude hook and shared state tool match main exactly. No work from Claude's open #124 branch is included.Validation
Every test command used fake
ps,pgrep, andkillfirst on PATH. Test command text went to parsers or hook inputs, not a real shell. No test ran a real merge or push.npm run buildnpm run checknpm testgit diff --checkRegression comparison: the eleven retained provider tests ran unchanged on detached main
69cb227, with only the test file copied. Result: tests 11; pass 8; fail 3. The failures cover invalid trusted paths, refusal after an invalid path prevents command-policy loading, and invalid branch-reader/message configuration. These are behavior failures, not missing dependencies. The eight passing tests are compatibility controls, not evidence of new behavior. All eleven pass in the branch's full suite.Baseline command:
node --test --test-name-pattern='missing shared file policy|missing shared mode policy|shared command reader|shared command policy|shared push policy' scripts/providers.test.mjs.Review and remaining limits
Independent code review found a P2 regression: the new validation rejected Unicode spaces that Git permits in branch names. Commit
fa31ca0fixes it by rejecting ASCII spaces and controls. Added assertions use Git's branch validator and parser-only push text for nonbreaking and em spaces. The assertion failed on prior head9ab57f5and passes after repair. This preserves behavior already accepted by main.The repair restarted review cycles. Two clean cycles, each with separate code, security, and QA reviewers, completed on exact head
fa31ca00b04a67da612c41bf4985d797a5486510. The second cycle used fresh reviewers. No source changes followed those reviews. Reviewers checked the full residual diff, caller denial handling, main push/merge boundaries, test evidence and generated copies. They did not rerun the parent-owned full suite.Build, check, and all 873 tests pass on the repaired head. GitHub CI passed on that same head: https://github.com/erickb336/sage/actions/runs/38209677848. The PR is ready for owner merge review; no merge was performed.
Automatic Codex work remains on
codex/issue-88-native-followup, tracked by #88. This PR does not contain its later runtime changes or establish installed operation. Complete policy, broader recovery, a real-project pilot, and gated autopilot remain incomplete. The SDK advisory remains tracked by #94.No live Claude or real-model pilot ran. All validation processes exited.