Skip to content

[codex] Add Opus confirm phase to factory gate#91

Closed
wizzoapp[bot] wants to merge 2 commits into
mainfrom
codex/gate-opus-resync-two-phase
Closed

[codex] Add Opus confirm phase to factory gate#91
wizzoapp[bot] wants to merge 2 commits into
mainfrom
codex/gate-opus-resync-two-phase

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • add FACTORY_REVIEW_CONFIRM_ARGS for Claude Opus 4.8 high in the t3code factory config
  • port the factory2 two-phase gate flow: Codex runs first, then Opus confirms after Codex is clean or fully dismissed
  • add FACTORY_CONFIRM=0 as an explicit per-invocation confirm skip, with a distinct gate cache key so a Codex-only run cannot masquerade as a full-panel pass
  • document the Opus confirm phase and the spend-control toggle

Budget note

This increases Claude/Opus usage on commits whose Codex primary phase passes. Adam is at roughly 80% weekly Claude usage, so FACTORY_CONFIRM=0 is available for non-trivial budget pressure or availability issues while still making skipped runs auditable/cache-distinct.

Validation

  • bash -n scripts/factory/precommit-gate.sh scripts/factory/factory.conf
  • throwaway fake-autoreview gate test covering full two-phase pass, FACTORY_CONFIRM=0, Codex finding, and Opus confirm finding
  • node_modules/.bin/vp run typecheck
  • node_modules/.bin/vp check (passes with existing unrelated mobile unused-symbol warnings)
  • scripts/factory/precommit-gate.sh --prepare using the current HEAD gate (Codex-only, because this commit changes gate files)

Linear: ADA-31

@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 15:47
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 15:56
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 15:56
@wizzoapp wizzoapp Bot marked this pull request as draft July 6, 2026 16:26
@wizzoapp wizzoapp Bot marked this pull request as ready for review July 6, 2026 16:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f92edc5b06

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# fixes or dismissals.
audit dismissals-consumed "$(jq -cn --arg g "$GATE_ID" --argjson f "$findings" --argjson d "$valid_dismissals" \
'{gate_id:$g,phase:"pre-confirm",findings:$f,dismissals:$d}')"
mv "$DISMISSALS" "$STATE_DIR/dismissals-used-$(date +%s).json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep primary dismissals until the gate passes

When Codex findings are fully dismissed but the confirming reviewer returns new findings, this moves .git/factory/dismissals.json aside even though the overall gate is about to refuse. If the user follows the printed preferred path to fix the confirm findings and re-stage, the staged tree changes, the cached confirm result is invalidated, and the next run reruns the primary reviewer without the still-valid primary dismissals, forcing the user to recreate dismissals for unchanged findings despite no commit having succeeded. That contradicts the script's documented single-use-on-success dismissal workflow.

Useful? React with 👍 / 👎.

@wizzoapp

wizzoapp Bot commented Jul 7, 2026

Copy link
Copy Markdown
Author

Closing this as stale/superseded rather than landing it.

I rechecked the current t3code gate and the Factory² source of truth. This PR is a direct t3code-local port of the Opus confirm phase and includes the now-obsolete per-invocation FACTORY_CONFIRM=0 skip/cache path. The current Factory² policy/template has moved on: confirm fallback is represented by FACTORY_REVIEW_CONFIRM_ARGS=() with a LEARNINGS entry, and the template also carries newer audit/timing machinery that this branch does not include.

Per the factory layering rule, gate machinery should come down from Factory² as a versioned upgrade PR rather than landing a stale hand port in the factory instance. No code from this PR was landed.

@wizzoapp

wizzoapp Bot commented Jul 7, 2026

Copy link
Copy Markdown
Author

Superseded by the current Factory² gate template/policy; should be replaced by a fresh Factory² upgrade PR if still wanted.

@wizzoapp wizzoapp Bot closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants