flip-first-required-gate

Make deep FLIP the required pre-merge feedback gate

Metadata

Statusdone
Assignedagent-930
Modelpi:openai-codex:gpt-5.6-sol
Created2026-07-28T13:40:52.155345177+00:00
Started2026-07-28T14:57:46.468780317+00:00
Completed2026-07-28T15:46:48.417054263+00:00
Tokens30167853 in / 48138 out

Description

Product decision

Deep read-only system FLIP is the primary and required feedback signal for real coding work. A candidate must not merge merely because deterministic validation or a bounded grader passes. The authoritative order is:

completion receipt → immutable candidate → deterministic validation → deep read-only FLIP → accepted FLIP verdict → merge → Done

Bounded evaluation is optional/secondary and must neither precede, dilute, average with, nor be required for FLIP. This supersedes the prior bounded-advisory-first rollout policy.

Required policy semantics

  • Managed rollout must support a FLIP-first required stage. In that stage auto_evaluate=false is valid, bounded records are absent unless separately requested, global deep FLIP selection is enabled for every qualifying real source candidate, and eval_gate_all remains irrelevant/false.
  • Decouple deep gate selection from bounded selection. A deep-only EvaluationGatePolicy must exist and be snapshotted before completion; current logic that returns no gate when bounded is absent must be corrected.
  • Qualifying sources: actual worker-produced immutable candidates for ordinary coding/structural tasks. Exclude system/meta/evaluation tasks, drafts/unpublished work, never-ran/preparation-failed/cancelled/skipped/abandoned/waiting/message-only/reconciliation-only work, explicit shell/exec tasks, stale generations, and candidates without current-epoch completion+validation proof.
  • The only acceptable product is the observation-only deep-readonly FLIP lane, not legacy shallow summary roundtrip or bounded grading masquerading as FLIP.
  • Pass requires a valid candidate-bound report, exact route/policy/evidence bindings, observation-only capability audit, required evidence coverage, semantic Pass, and score at/above the snapshotted FLIP threshold. Only then may exact candidate merge proceed.
  • Semantic fail/below-threshold supplies AcceptanceRejected: do not merge; preserve the successful source attempt, candidate, validation, report, and worktree/rescue evidence. Project an explicit RepairNeeded/AwaitingAcceptance state with exact operator/repair next actions.
  • Timeout, malformed output, unavailable credentials/adapter, route drift, crash, or missing evidence are infrastructure failures, never semantic rejection. Keep the candidate in AwaitingAcceptance, consume only the evaluation retry budget, and never reopen/retry/fail/complete the source attempt.
  • No cross-runtime/model fallback. A selected Pi route failure remains visible.
  • First accepted verdict wins under source generation/attempt/fence/candidate/policy CAS; later or stale verdicts are immutable evidence only. Restart/replay must never re-invoke after a valid report or merge twice.
  • Any waiver is explicit, content-bound, operator-attributed and audited; no silent promotion.

Rollout correction

  • Replace/extend the managed controller so it can prove and enter flip-required without first enabling bounded automatic evaluation.
  • Ordered gate evidence must include: credential-free Fake-Pi pass, semantic reject, infrastructure failure/retry, restart at every boundary, and one live low-risk Luna gate canary when the exact route is available.
  • The live canary must prove main remains unchanged while FLIP is pending, advances exactly once on pass, and remains unchanged on reject/unavailable.
  • Rollback atomically returns FLIP selection/gating to disabled while preserving reports/candidates and never changing already accepted source history.
  • Do not enable the live project gate from inside an unmerged worker candidate. Produce an explicit, copy-pasteable operator activation command/evidence plan for the chat operator to run only after exact-main install.

Feedback and repair visibility

  • wg show, stable JSON, status, TUI selected-task detail, and ⌂ Activity must distinguish FLIP queued/running, waiting on required FLIP, FLIP rejected—repair needed, FLIP infrastructure unavailable, and FLIP passed—merging with relative/system times and candidate/report IDs.
  • Surface structured latent-intent, counterfactual, cross-component, and evidence-reference codes safely; never raw chain-of-thought, prompts, secrets, or attacker-controlled unbounded text.
  • A rejected candidate must expose deterministic commands to inspect the report, retry only FLIP, request candidate repair/retry under policy, or issue an audited waiver. No message or late event may resurrect source execution.

Validation

  • RED test proves today a deep-only policy cannot gate because gate construction depends on bounded selection and managed rollout forbids global FLIP.
  • With bounded auto-evaluation off, a qualifying candidate remains unmerged while required deep FLIP is queued/running and merges exactly once only after a valid passing report.
  • Semantic fail/below threshold never changes main and projects retained RepairNeeded/AcceptanceRejected with inspect/repair actions.
  • Timeout, malformed, unavailable, route drift and crash never merge or source-retry; exact evaluation retry/restart converges.
  • Never-ran/excluded/stale candidates create no FLIP work and cannot block unrelated graph work.
  • Fake-Pi proves observation-only tools, full evidence classes, latent/counterfactual/cross-system findings, no source/config/graph/session mutation, no worker/build/worktree slot use, and no fallback.
  • Restart before/after candidate, report write, verdict link, acceptance consume and merge yields one report/verdict/merge with no duplicate cost.
  • Real candidate-binary daemon + terminal/TUI human-flow smoke demonstrates pass/reject/unavailable and legible Activity progress.
  • Live low-risk Luna gate canary records content-addressed evidence and leaves the gate disabled in this live project pending operator activation from accepted main.
  • Existing lazy, bounded, deep, finalization, strong-merge, watchdog, observer, Activity and native Codex smokes pass.
  • cargo fmt --check, cargo clippy, focused/full tests and owned smoke pass; commit/push and wg done finalize normally.

Depends on

Required by

Log