Skip to content

Pipeline controls: planted defects prove each gate can still go red #7155

Open

Description

@squid-protocol

Why

A green gate only means something if that gate can go red. Three failures from one week looked healthy until someone checked:

We test code heavily, but we don't test whether the tests and gates still work. det_mutation.py and mutation.py measure whether tests catch code changes. Nothing measures whether a bad PR is actually stopped.

The idea

Run lab-style controls on the pipeline itself:

  • Negative control: a known-bad change. Its gate must go red. If it stays green, that gate is blind, which matters more than any single bug.
  • Positive control: a known-clean change. Everything must stay green. This measures false alarms and fix-loop cost.

The output is a detection matrix: each gate against each planted defect, with pass or miss and how long it took. A miss is treated as a high-priority failure of the gate, not of the code.

Plan, cheapest first

1. Gate self-tests (no extra CI runs)

2. Weekly control PR (one full CI run a week)

3. Controls on the review layer (an experiment, not a default)

Gates catch rules. Reviewers catch judgement. The #5274 import cycles passed every gate, and a reviewer was the only layer that could have questioned them.

4. Learn from escapes

  • Every defect that reaches main adds a new control, so the set grows from real failures
  • A monthly Opus session reviews misses, false alarms and escapes, and proposes new control classes
  • Add the detection matrix to the squid-bot dashboard

Safety rules

  • A control PR can never merge: canary/ branches carry a hold that ci-gate always fails, whatever else is green, and the merge label is refused
  • Planted defects are inert: no real vulnerabilities, secrets, network calls, or changes to workflows or release paths
  • Control runs stay out of the factory's own numbers: merges, first-pass rate, lessons and agent memory
  • A control PR that fails to close alerts the owner

How to judge it

  • Cost to measure first: the runner-minutes of one control PR (.claude/rules/ci-workflows.md) and the tokens for a review session.
  • Worth continuing if it finds gaps that weekly CI doesn't. Part 2 should show its value within about 4 runs, or the cadence drops.

Open questions

  • Should part 2 be weekly, or follow gate changes only?
  • Do control PRs count against the 20-runner pool at peak hours, or run off-peak?
  • Can controls for owner-only workflows (shepherd-*.yml) run here, or do they need separate approval?

Activity

  1. added
    enhancement
    priority: high
    scope:infra
    on Oct 30, 2026
  2. squid-protocol commented on Nov 21, 2026

    @squid-protocol
    OwnerAuthor

    #8940 merged: a partial slice of [c:f743d1a3] "List every gate and what it claims to catch"; left: every gate now states what it claims to catch; failure proofs for 19 gates are the remaining slice. (promoter-bot)

  3. 40 remaining items

  4. squid-protocol commented on Nov 22, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 7155-20261122T2310Z (host melek) ended without a PR. live Sonnet-vs-Opus run awaits owner OK (owner-questions/issue-7155-live-review-run.md); no PR

  5. squid-protocol commented on Nov 23, 2026

    @squid-protocol
    OwnerAuthor

    #9078 merged: a partial slice of [c:04c21193] "Measure catch rate and false alarms for the Sonnet review, and compare with Opus on the same set"; left: needs the live Sonnet vs Opus run, which calls models and goes through the experiment lane (owner OK). A headless worker cannot grant that OK, so no model was called. Everything the run needs is in place; the command is in docs/research/review-layer-controls-sonnet-vs-opus.md. (promoter-bot)

  6. squid-protocol commented on Nov 23, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 7155-20261123T0149Z (host melek) ended without a PR. No PR: live Sonnet-vs-Opus run awaits owner yes (owner-questions/7155-review-experiment-run.md); docs page says 36 reviews vs 18 in question

  7. squid-protocol commented on Nov 23, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 7155-20261123T0631Z (host melek) ended without a PR. No PR: live Sonnet-vs-Opus run waits on owner OK (question file corrected to 36 reviews); checklist c:04c21193 partial

  8. squid-protocol commented on Nov 23, 2026

    @squid-protocol
    OwnerAuthor

    Waiting on an owner decision (asked privately, 2026-11-23). Nothing is needed from contributors; work resumes once it is answered.

  9. squid-protocol commented on Nov 23, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host melek, lease renewed 2026-11-26T23:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claim:melekenhancementpriority: highscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions