Ship codex/chatgpt-delegate-mode - #135
Conversation
…ocol Add references/delegate.md: 15-rule transport-agnostic protocol (task brief with EXECUTION_BOUNDARY, sentinel envelope bound to baseline/bundle SHA-256, baseline snapshot incl. WIP diff, isolated-worktree acceptance chain with no 3-way merge rescue, 2-round escalation semantics, delegation evidence dir under .ai/harness/chatgpt/delegations/) plus two explicit host transports: Claude via the existing oracle consult/continue chain (oracle >=0.16 floor, browser-doctor preflight, provider-session evidence join, followup model-inheritance rule) and Codex via the built-in browser (visible-completion + sentinel authority). SKILL.md gains the delegate route, trigger words, and the consult-stays-planning-only boundary note. Skill-surface pin updated under contract authority: REFERENCES + delegate.md, router byte limit 2048->2560. Canary evidence and probe results recorded in the contract notes; deferred engine work (oracle >=0.16 meta projection, delegate read posture) ledgered in tasks/todos.md.
…ss) and complete review projection
|
Codex independent acceptance result: BLOCKED; do not merge yet. Canary B itself passed:
Two P1 blockers remain:
Required correction slice:
Local independent gates at this PR head: |
Close the two P1 gaps reproduced by independent acceptance of the delegate workflow: (1) content-level secrets in allowed staged files could reach the generated prompt.md — the engine now runs a required Gitleaks scan over the exact rendered PromptBundle (prompt + inline files + followups) before any session-store write or provider spawn, fail-closed on missing binary, incompatible version, unparsable output, or findings, with stdin payload feeding, isolated config, and a scan receipt (version/source/bytes/sha256); followup consults inherit the scan requirement from session meta and cannot opt out. (2) The canonical repo-harness-chatgpt package was absent from host discovery roots — add explicit opt-in install-skill/uninstall-skill projection (realpath-validated symlinks to the canonical package, unowned destinations fail closed, idempotent with rollback), and consolidate canonical source resolution into chatgpt-skill/source.ts (mcp/setup.ts now consumes it). Docs updated (delegate.md scan wording, setup.md gitleaks + projection lifecycle/recovery, browser-engine doc); default install profiles unchanged; no automatic Gitleaks installation; Oracle metadata projection stays deferred in tasks/todos.md.
…nd complete review projection
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 322c7abfc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| mkdirSync(dirname(target), { recursive: true }); | ||
| writeFileSync(target, file.content, 'utf-8'); | ||
| const stagedBytes = readFileSync(target); | ||
| const stagedHash = createHash('sha256').update(stagedBytes).digest('hex'); |
There was a problem hiding this comment.
Hash the bytes that staging actually writes
When an allowed attachment contains non-UTF-8 text, readBrowserInputFile hashes the original bytes but stores a UTF-8-decoded string; this block then re-encodes that string and compares it with the original-byte hash. Such files pass the existing binary/path checks and secret scan but every scan-bound Oracle consult fails with PROMPT_BUNDLE_STAGING_FAILED before submission. Reject invalid UTF-8 during assembly or compute the staging drift check from the same outbound byte representation.
AGENTS.md reference: AGENTS.md:L55-L55
Useful? React with 👍 / 👎.
* chore(release): prepare 0.11.3 Release scope v0.11.2..main (PR #135, squash 8046045): repo-owned dual-agent ChatGPT delegate mode with per-host transports, mandatory fail-closed Gitleaks egress scan over the exact rendered PromptBundle, explicit host skill projection commands, and the widened skill-surface pin. Version sources, localized READMEs, changelog, and the 0.11.3 release filing are updated; publish remains pending until the filing's release sequence completes. * chore(release): record 0.11.3 acceptance * chore(workflow): archive release-0-11-3 closeout
Automated repo-harness ship for
codex/chatgpt-delegate-mode.Checks:
contract-worktree finish --no-mergeran the sole sprint verification.merge-gatesealed the exact base/head/full diff locally without another provider call.This PR intentionally does not merge
mainlocally.Canary B handoff (Codex built-in browser, run in a Codex session after merge)
~/.codex/skills-projectedrepo-harness-chatgptroutes adelegatemode toreferences/delegate.md.delegate.mdwith this mini brief: new conversation -> record the actually-selected Pro model label -> send: "Delegate-mode transport canary. Reply with exactly two lines: line 1: CANARY-ACK codex-iab transport OK; line 2: ===END OF DELIVERABLE===" -> confirm the /c/ conversation URL before waiting.tasks/notes/of the consuming session; Claude-side Canary A evidence lives in.ai/harness/chatgpt/sessions/chgpt_20260729_013746_*andchgpt_20260729_014227_followup-*.