Repository navigation
Add session modes and guarded Codex publication (T35) - #304
Merged
Merged
Conversation
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 #303
Sage task T35
Codex's skill-led Sage workflow can now store session mode and publish a reviewed PR through a guarded helper. The existing owner phrases remain unchanged. A new session starts off, and autopilot needs Sage on and a separate publisher verification record.
The chief registers a manual task before publication. The helper checks task state, ownership, unanswered gates, required reviews, the local branch and commit, and live GitHub checks. It saves intent before one expected-head squash merge. Recovery can reconcile an uncertain result while off without submitting again. Core owns the final task-state transition.
This first version runs inside an active Codex task and supports same-repository PRs on github.com. It uses chief declarations, not native caller authentication. Core and the prepared protected runtime are unchanged. The broader controller work and #88 remain open.
Validation
Final reviewed commit:
6db138cf9f12dacbd5c96faa13151650a6da9ff2.npm run build: exit 0; 336 files built.npm run check: exit 0; all checks pass.node --test packages/sage-codex/runtime/workflow.test.mjs: 7 passed, 0 failed.npm test: actual exit 0; 1,979 passed, 0 failed, 0 cancelled, 0 skipped.All test runs put fake process commands first on PATH. Publication tests use a fake GitHub adapter or executable; they perform no real merges. Independent probes cover gate refusals, a changed PR identity, lost readback and recovery without a second submission.
Baseline comparison
QA copied only the new test into a detached worktree at origin/main
d56453949dfb1d0af3018f4ba15ca087beca9833. It failed before executing tests becauseworkflow.mjsdoes not exist there. This proves the new helper is absent; it does not prove seven separate behavioral defects on main. QA removed the disposable worktree without a stash.The gate regression has separate behavioral evidence: the first implementation submitted one simulated merge with an unanswered gate. The repaired version refuses before intent or submission, then succeeds after the answer.
Live publication and released installation
The installed publisher first refused while GitHub reported the PR as unready and CI remained in progress. It created no publication intent. After CI passed, the publisher performed the authorized expected-head merge. GitHub independently confirms merge commit
5d2064989061adc8d56389dc617d7e7799d57b6f; the state tool independently reports T35 merged. This was an actual publication, separate from the fake-service tests above.Refreshed the configured Sage marketplace from main and installed the released plugin through Codex. All 213 installed files match the reviewed package, and user configuration remains unchanged. The installed helper reports Sage on and autopilot on for the current session. Reconciliation confirmed the existing merge and local state without another submission.
Not verified
Fresh-chat discovery and a new task performed entirely after installation remain unverified. No claim of hidden-journal discovery, hostile-local identity isolation, global native enforcement or unattended operation follows from these checks. The broader controller and parent issue remain open.