Repository navigation
feat(codex): Group D — immutable delivery repair + .install-version lifecycle (dogfood-remediation) - #2628
Conversation
… lifecycle Group D (immutable-delivery-repair): let update/install repair a MISSING authenticated delivery record for the installed target exactly once, without activation and without redefining the target from a moving channel. - src/genie-commands/codex-delivery-repair.ts: the injectable repair orchestrator — pin channel/version/platform/tag/name + manifest digest before download, download the exact asset, SHA-256 after, authenticate via the existing attestation/cosign anchors, prove the candidate against canonical installed bytes, recheck the channel under the lease (advance => ordinary upgrade, mint no stale record), reobserve + publish once. No-network fast path for matching records; every failure leaves state unchanged with deliveryComplete:false. - src/lib/install-version-marker.ts: the ONE .install-version lifecycle module (D-owned). Retire on convergence success, preserve on failure/unsafe, idempotent uninstall for either layout. Canonical VERSION stays authoritative. - src/lib/codex-activation.ts: additively extend the delivery record + publish input to carry the immutable attestation tuple (platform/tag/name/manifest/ artifact/binary/root); the store parser round-trips them. - update.ts: repair before the already-current return; retire the marker after successful convergence. - install.ts: deferred install publishes its matching record before the exit-2 handoff (idempotent); retire the marker on convergence success. All network/attestation/codex is stubbed in tests; the suite passes with codex present AND stripped from PATH (0 fail, 0 errors).
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30bf66fef9
ℹ️ 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".
| const registration = snapshot.query.status === 'ok' ? snapshot.query.registration : { present: false as const }; | ||
| const installedGeneration = registration.present && registration.version ? registration.version.canonical : null; |
There was a problem hiding this comment.
Skip repair handoff when Codex cannot be observed
When the Codex CLI is not installed or codex plugin list fails, this branch fabricates an absent registration. If the same-version repair then publishes the missing delivery record, handoffFor(null, target) maps it to activation-pending, so an otherwise already-current genie update on a non-Codex machine can download the tarball and exit 2 with the Codex setup trailer. Treat query failure/absent registration like the existing delivery classifier's non-pending absent case and skip the handoff instead.
Useful? React with 👍 / 👎.
…s, IN_PROGRESS The H3 SessionStart line surfaced ledger drift: waves 1+2 shipped 2026-07-22 (PRs automagik-si#2625/automagik-si#2626/automagik-si#2628/automagik-si#2629, per-group SHIP reviews, validations reproduced) but their evidence and criteria were never recorded; status still read APPROVED with execution long underway. - status APPROVED -> IN_PROGRESS - 41 evidence-backed criteria ticked (5 -> 46/67): Groups A-D ACs + global criteria owned by merged groups; deliberately NOT ticked: the two live 'codex mcp get genie --json' operator proofs, Group F/G criteria, and all post-merge QA rows - appended the waves-1+2 evidence block, the seven live-QA fixes (automagik-si#2631-automagik-si#2634, automagik-si#2636), Group E's actual merge commit (4be6917), and the open automagik-si#2633-deferred follow-up (pre-A route-arm retirement) Adversarially verified pre-commit by the pm-ledger-verify workflow: 0 must-fix; its 4 advisory findings (defect count, untracked follow-up, unrecorded E merge) are incorporated above.
Wave 2 of
codex-plugin-dogfood-remediation. Group D (depends on B, now shipped).What
assessAuthenticatedDelivery; pins channel + immutable target version/platform + release tag/name + manifest bytes/digest before download; downloads the exact named asset, computes SHA-256 after, authenticates it against the GitHub attestation/cosign anchors (repo/predicate/workflow/OIDC), persists the computed digest; extracts privately, proves candidate VERSION/binary/plugin-tree vs installed bytes, takes the lifecycle lease, rechecks the pinned channel before publish. A channel advance routes to ordinary upgrade and never mints a record for stale bytes.deliveryComplete: false. Repeated repair neither re-downloads nor republishes. No-network fast path for matching records..install-versionlifecycle module: canonicalVERSIONauthoritative; retire the legacy marker only after successful install/update convergence, preserve exact prior bytes/tree on failure, idempotent across present/absent layouts. Deferred install publishes its matching record before the exit-2 handoff.Validation (reproduced by orchestrator)
bun testover the 8 Group-D files (codex-delivery, update, install, install-promote, install-version-marker, uninstall, codex-delivery-bootstrap, codex-delivery-repair) → 397 pass / 0 fail, codex-present and codex-absent (network/attestation fully stubbed via injected seams). typecheck clean;dead-code(knip) clean.Adversarial execution review: SHIP, ciPortability confirmed. One tracked MEDIUM (below).
Tracked follow-up (Group E)
uninstallInstallVersionMarkeris exported + unit-tested but not yet called by the uninstall command (behavior is already correct —.install-versionis removed by the digest-verified wholesale GENIE_HOME child removal, since it's deliberately absent frompreservedGenieDirEntry). Wiring the explicit symlink-safe typed removal must be done with awareness of the digest-bound removal, so it's folded into Group E (lifecycle-surface integration) rather than rushed here.