Repository navigation
refactor(codex): resolve the parent's collaboration version and say why V2 stays off - #9290
Conversation
…hy V2 stays off The gate now resolves a parent to collaboration V1 or V2 instead of asking whether it is V1. A V2 parent is declined with the ADR 0159 reason until the child-result delivery path is implemented and verified live; a disabled, unknown-version or unlisted parent gets its own explanation, so no line claims native sub-agents need a parent on V1. The bump re-check table gains the feature-table cap derivation and the child-result delivery path. Signed-off-by: Dharit Shah <dhshah@redhat.com>
PR Summary by QodoClarify Codex parent collaboration versions and V2 decline reasons
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
|
🤖 Finished Review · ✅ Success · Started 6:09 PM UTC · Completed 6:21 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.55 |
Site previewPreview: https://524a1d97-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: moderate (2/5) DetailsModerate-sized refactor (7 files, 239 lines) by an established contributor with no protected or security-sensitive paths touched, keeping V2 delegation declined while clarifying gate diagnostics and updating documentation. Previous runRisk Assessment: moderate (2/5) DetailsModerate-sized refactor (7 files, 237 lines) by an established contributor with no protected or security-sensitive paths touched, keeping V2 delegation declined while clarifying gate diagnostics and updating documentation. |
|
Looks good to me Labels: PR updates Codex runtime docs alongside the runtime change. Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> ReviewFindingsLow
Labels: PR refactors the Codex runtime delegation gate and updates the related runtime docs. |
waynesun09
left a comment
There was a problem hiding this comment.
Review-only pass: one MEDIUM finding, posted inline.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bootstrap delegated whenever the resolver returned a version and no reason, so a V2 branch that stopped returning a reason would have admitted V2 parents with the V1-only config. The gate now reads the version: only "v1" delegates, and only the change that renders the V2 config and the checked child-result delivery path widens it to V2. The resolver's doc and its test say the reason explains a decline and never decides one. Signed-off-by: Dharit Shah <dhshah@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 7:07 PM UTC · Completed 7:15 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.86 |
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
LGTM. The delegation gate now admits only version == "v1" and prints the reason whenever delegation is off (b84b520).
Summary
Resolve a Codex parent to its catalog collaboration version, V1 or V2, in the delegation gate, and say why a V2 parent still runs in one context (ADR 0159 decisions 1 and 4). The old explanation asked for "a parent Codex resolves to collaboration V1", which the accepted ADR no longer requires; a V2 parent is now declined with the decision-4 reason until its child-result delivery path is implemented and verified live, and
disabled, unknown-version and unlisted parents each get their own line. No run changes whether it delegates: V2 parents were declined before and are declined now; only the stderr explanation of a declined parent changes.Part of #9085.
Intentional: V2 parents are declined on this release (ADR 0159 decision 4, strict reading); the alternatives are listed on #9085.
Changes
internal/runtime/codex_personas.go:collabVersionandcodexParentCollabVersionreplace the V1-only resolver; explicitdisabledcase.internal/runtime/codex_bootstrap.go: the gate admits only a V1 parent and prints the reason for any other; V2 declined with the ADR 0159 reason.TestCodexParentCollabVersion(v1, absent, v2, disabled, unknown, unlisted, gateway, translate errors, no model; no explanation asks for a V1 parent); catalog and Bootstrap reason strings.docs/runtimes/codex.md: the decline lines and the "Not supported" row.docs/architecture.md: the decided V2 extension no longer says "alongside the 0.166.0 bump", which merged without it.docs/contributing/runtime-implementation.md: the catalog row's test name; two bump re-check rows: the[features.multi_agent_v2]keys and how Codex derives the V2 child cap, and the V2 child-result delivery path (codex runtime: delegate from collaboration V2 parents and bump Codex past 0.159.3 #9085 item 8).Testing
make lintpasses (stage changes first, then run)pre-commit run --from-ref origin/main --to-ref HEADandmake lint-md-linkspass.go test ./internal/runtime/ -run 'Codex' -race -count=1 -timeout 15mandgo vet ./...pass; goldens unchanged.collabVersion100%,codexParentCollabVersion100%,Bootstrap88.7%.npm run docs:buildneeds the submodule andnode_moduleslocally).Checklist
!for breaking changes)