Skip to content

ci(oracle): run the v1 oracle as three cells of the contract matrix - #113

Merged
aRustyDev merged 5 commits into
mainfrom
feat/ci-oracle-cell
Nov 10, 2026
Merged

aRustyDev merged 5 commits into
mainfrom
feat/ci-oracle-cell

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Refs #58.

Issue #58 names scripts/oracle-v1.sh <target> as one of the planned cells of gate. #107 built the scoped gate, the corpus comparison and the controls; this runs them in CI, so a change to /api/v1, to the register or to the harness that breaks the oracle fails gate.

What changes

  • Three new cells, native-memory, native-pg and worker-cf with the oracle pass, as run <target> oracle lines in scripts/contract-all.sh (18 to 21 cells). plan-cells.sh derives the matrix from those lines and assert-gate.sh already requires every planned cell's marker, so nothing in ci.yml or the ruleset changes: the cells reach the one required check, gate, through the path every other cell uses.
  • contract.sh: the oracle pass runs the must-fail controls (C0-C4, the comparison's self-test) as well as the gate and the corpus comparison, and keeps its logs in target/contract-logs/<target>-oracle.oracle/, which the cell's logs-<target>-oracle artifact already uploads. oracle-v1.sh takes the work directory from ORACLE_V1_WORK.
  • contract-cell.yml: the oracle pass installs uv (astral-sh/setup-uv pinned to a full SHA, v10.3.2; uv pinned to 0.12.18) and the preflight requires it. No other pass changes.
  • classify-changes.sh: tools/oracle-v1/ counts as Rust-relevant, so a change to the harness, register or corpus alone runs the cells instead of being skipped as docs. Other files under tools/ stay docs-only (tested: tools/oracle-v1-notes.md does not match).
  • Docs: cicd.md, running.md, contract-suite.md, the oracle README and G-25 in status.md.

Evidence

Each cell run locally with scripts/contract.sh <target> oracle, on this branch rebased on 405f153:

Cell Gate (m1) Corpus Controls Exit
native-memory 161 cases, 13 failures, 13 accepted, 0 unaccepted, 0 stale 108 compared C0-C4 and the comparison's 8 self-test controls as they must 0
native-pg the same the same the same 0
worker-cf the same the same the same 0

A cell that cannot fail is not evidence, so the control: with "deleted_at": 0 planted in states.rs::state_body (a defect only the oracle sees), scripts/contract.sh native-memory oracle exits 1 with VERDICT: FAIL, on three independent legs. The gate rejects 0 is not valid under any of the schemas listed in the 'anyOf' keyword on four states operations; the corpus comparison finds 12 unaccepted differences on 6 exchanges (committed=null recorded=0); and C0/C4 report that the gate is no longer green. The comparison's own self-test stayed green. The mutation was reverted and is not in this PR. The CI-script tests pass (34 of 34), including that a plan without the oracle cells is refused.

In that broken run the gate also hit a 500 on GET .../issues/?per_page=-600, which the clean run never draws. Thrust answers a negative per_page with Plane's 500 on purpose (EX-001/EX-002), and the scope's register lists that quirk on POST .../issues/, where the clean seed-1 run draws it. My reading is that the fuzzer took a different path once other cases failed (126 cases against 161); I did not measure that. It fails closed, and with the server unchanged the run is deterministic: 161 cases on all three targets.

What the CI run showed

tools/oracle-v1/ is now Rust-relevant, so this PR ran the whole pipeline. Three things could not be tried locally, and are shown by the runs:

  • The cells work on hosted runners. All three oracle cells passed on all three heads that ran (e591b29, 43a17da, and the final 1a808c5, whose whole run is green): setup-uv installed uv, the preflight found it and uvx fetched Schemathesis from PyPI there. As whole jobs (checkout, toolchain and build included) they took 1m36s (native-memory), 2m11s (native-pg) and 4m00s (worker-cf), in parallel, against the 40 minute timeout.
  • gate sees them. On 43a17da it printed ok: 21 of 21 planned cells reported success, with every needed job green; gate is the only required context and it reported.
  • hermetic failed once, on a finding that is not this PR's. On e591b29, hermetic failed on thrust-editor-doc's prop_decode_never_panics_on_mutated_updates: a panic inside yrs 0.28.0 (block.rs:92, assertion failed: value & Self::MASK == 0) on a mutated update, proptest seed cc 1f4f49f134f46a92171befaad1d56f43b58eb0e14a6fd564d00fb2433caa58cb. No Rust changed here. That red hermetic made gate red (it stops at the job check, so the 21-cell comparison did not run on that head). The runs on 43a17da and 1a808c5 passed hermetic: each push draws a new random seed, so that is not a fix. The panic is older than feat(api): /api/v1 projects, states, labels and work items with the oracle gate on those operations #58 and the test is randomized, so any PR can hit it when the draw does. There is no committed regression file for it, and I have not filed an issue (the owner's call).

Not covered

  • worker-memory has no oracle cell (its gate was not measured), and the plane target is not in CI: it needs the fork checkout and its Celery worker.
  • gate now takes the oracle's three cells with it: a red oracle blocks merge. If a cell proves flaky on hosted runners, the answer is to find the cause, not to drop it from the plan.
  • ADR-0122's 2026-11-10 update says oracle/ci/oracle.yml "has never run in CI"; that is the fork's workflow and stays true. I left the ADR as the owner's record. After this PR the first two layers (gate and corpus comparison) are PR-gated here.

🤖 Generated with Claude Code

aRustyDev and others added 5 commits November 10, 2026 12:23
Issue #58 names `scripts/oracle-v1.sh <target>` as one of the planned cells of
`gate`. Add `run <target> oracle` for native-memory, native-pg and worker-cf to
scripts/contract-all.sh (18 to 21 cells); plan-cells.sh derives the matrix from
those lines, so the cells reach `gate` through the markers it already checks.

- contract.sh: the oracle pass runs the must-fail controls too (seconds on a
  Thrust target) unless ORACLE_V1_WHAT is set to '', labels the run with the
  target, and keeps its logs in target/contract-logs/<target>-oracle.oracle/,
  which the cell's logs-<target>-oracle artifact uploads.
- oracle-v1.sh: the work directory is ORACLE_V1_WORK when given, so a cell's
  files sit beside its own log and not in the tree.
- contract-cell.yml: the oracle pass installs uv (setup-uv pinned to a full
  SHA, uv pinned to 0.12.18, as every other action and tool here is) and the
  preflight requires it. Other passes are unchanged.

worker-memory has no oracle cell and the plane target is not in CI: the pin
needs the fork checkout and its Celery worker.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The oracle cells run the harness, the exception register and the corpus, so a
change to them alone must run the cells, not be skipped as docs. Add
`tools/oracle-v1/` to the classifier's Rust-relevant set; other files under
tools/ stay docs-only.

test-ci-scripts.sh gains the classifier cases (harness alone, register alone,
and `tools/oracle-v1-notes.md` / `tools/spike-0006/README.md`, which stay
rust=false, so the prefix cannot match a sibling) and checks that the real plan
holds the three oracle cells and that a plan without them is refused.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
cicd.md: the 21-cell matrix, the oracle cells and what they need, the
tools/ skip claim amended for tools/oracle-v1, and the new pinned action.
running.md, contract-suite.md and the oracle README: the oracle pass, the
cell count and where the cell's logs are. status.md G-25 item (1): CI cells
exist for native-memory, native-pg and worker-cf; there is no worker-memory
cell and the plane target is not in CI.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
PR #113's run (e591b29): the three oracle cells passed on hosted runners, so
setup-uv installed uv, the preflight found it and uvx fetched Schemathesis
there; as whole jobs they took 1m36s, 2m11s and 4m00s. 21 cell jobs ran and
`gate` downloaded 21 markers. Its planned-against-reported comparison did not
run that time: `hermetic` failed first (the yrs panic in
thrust-editor-doc's prop_decode_never_panics_on_mutated_updates, unrelated to
this change) and assert-gate stops at the job check. Said so in the tag.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
On 43a17da the whole run passed and `gate` printed "ok: 21 of 21 planned cells
reported success". The first run (e591b29) never reached that comparison,
because hermetic failed and assert-gate stops at the job check. Cite the run
where it did.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit 69c099e into main Nov 10, 2026
33 checks passed
@aRustyDev
aRustyDev deleted the feat/ci-oracle-cell branch November 10, 2026 17:51
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.

1 participant