Skip to content

Spec: Experiments, which measure a change before it reaches production - #1122

Merged
JacobStephens2 merged 115 commits into
mainfrom
issue-977
Oct 24, 2026
Merged

JacobStephens2 merged 115 commits into
mainfrom
issue-977

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Experiments measure a Candidate against a fresh Baseline before a change reaches production. This gathers the work for Spec #977: private Eval suites and replay import, Arm builds and fixed Harness versions, resumable paired Trials, grading and human rechecks, release checks, and live Console pages.

change → dependency-selected, approved Eval tasks
       → Baseline / Candidate builds + fixed Harness paths
       → interleaved Trials (two workers, provider proxy, bwrap, memory caps)
       → mechanical checks → blind model Graders → human Score rechecks
       → seeded paired Bayesian Verdict + wrong findings + pass^3 + Arm usage
       → experiments CLI / live Console / release wait

The CLI prepares time-safe repositories, approves proposed Eval tasks without starting work, and imports the private replay material once. Setup stores the Claude Trial token in Credentials. Trials and Graders retain private Session evidence and join the Experiment's Trace; Void retries, drop-outs, plan-limit pauses and interrupted work survive resume.

The whole-Spec review also fixes missed native Codex quota reports for current and older Arms, missing production user rules/hooks, stale Inbox groups after rechecks, and releases shipping changes absent from their measured Candidate. Executable lookup and metadata-table regression setup are shared.

Closes #977

Evidence

Each actionable behavioral finding was reproduced before its fix, and the regressions are retained:

Check Before After
Recheck → Inbox Verdict became pass; status stayed Needs you Confirmed pass moves the latest invocation to Done
Production user files Claude rules and OpenCode instructions were missing Real bwrap sessions retain Claude/Grok/Muse instructions, rules and hooks, plus OpenCode instructions
Codex native quota Trial continued and succeeded after a native warning Current Trials become void; older Code review and Spec review Arms pause with retained usage-limit evidence
Release resume and merged PR A tag included arrived-during-pause.txt, absent from the Candidate Changed main content is refused before publishing; an already-merged mismatched tree cannot be tagged

Final validation:

  • /usr/bin/time -p scripts/affected-tests main: passed; 2,579 Rust tests passed (58 skipped), all 44 site tests passed, and the release-generator check passed. Overall wall time was 1,513.75s including compilation; the Rust test run took 1,341.37s after 81s compilation.
  • cargo clippy --all-targets -- -D warnings and cargo fmt --check: passed.
  • npm test --prefix console: 69 passed, 1 pre-existing skipped test.
  • python3 -m unittest discover -s scripts -p 'test_*.py': all 14 passed.

Testing seams

  • Whole binary against fake Harnesses: Command/Activity records, private artifacts, CLI views, resume, rechecks and Inbox groups.
  • Standalone seeded Verdict: paired accuracy/wrong-finding intervals, drop-outs, pass^3 and forecasts.
  • Sandbox launcher: real bwrap visibility/network/process checks and memory scopes where available.
  • Console routes paired with CLI JSON and browser tests, including live Experiment pages and proposal approval.
  • Release script against fake cargo/GitHub: waits, overrides, rechecks, interruption and matching measured/released content.

Unaddressed findings

Standards

  • S1: statistical Bar data clump (P3 judgment), declined. src/verdict.rs:3-6,22-31 deliberately gives the standalone judge a scalar Trial count and prediction budget; src/evals/experiment.rs:41-55 persists per-suite counts, timeouts and Void rules. The explicit projection at src/evals/experiment/grading.rs:254-263 adapts those representations. CLI validation and the judge's validation protect separate entry seams and have different underflow/prediction checks. The Standards reviewer accepted retaining these interfaces. No behavioral defect was claimed. S2 and S3 were addressed.

Spec

  • R3: agy provider-side web search (P1), deferred to #1215. src/harness/agy.rs:157-170 and docs/research/eval-sandboxes.md:831 record that no grounding-off switch is known. The supplied regression, cargo test --bin thirdshift harness::agy::tests::trials_do_not_keep_the_provider_grounding_invocation -- --exact --nocapture, failed with identical production and Trial arguments. It confirms the gap; the provider proxy cannot disable server-side grounding. The existing open needs-triage issue already records the evidence and the Day shift's choice between refusing unsupported Trials and permitting grounding. That product decision is not this review's to make. The full regression and patch remain with the Session's review artifacts; the temporary failing test is outside the active suite. R1, R2, R4 and R5 were addressed.

Security

  • Security review of the issue-977 change against main (merge base d05aa97) found no unaddressed introduced findings: no failing proof-of-concept was produced, so no fix was committed here.

Review coverage

Both axes read all 121 changed files, including generated output. No changed file was left unread; no generated-output exclusions were taken. Final reports and each axis's complete files-read list are retained in .thirdshift-review-ARHrhS/standards.md and .thirdshift-review-ARHrhS/spec.md beside the Session trace.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

The code can be reverted; private Eval artifacts remain on the host. Real-login refresh, provider allowlists and production memory measurements remain Day shift checks, as recorded in the sandbox research.

Blast Radius: Factory

Session launching, Experiment scheduling/grading, Console views and release publication. Releases now refuse content changes that were absent from their fixed Candidate; a fresh release version measures current main.

Built with codex · gpt-6.1-sol · xhigh

Tickets

Add private Eval task format and time-safe repositories
Add hidden Trial flag for Spec review sessions
Add paired Bayesian Verdicts for Experiments
Cache Arm builds and record fixed Harness paths
Save Claude setup tokens in Credentials
Import #429 replay material as private Eval suites
Add resumable Experiment Command and Trial workers
Preserve packet-only Grader sandboxes inside individual memory-capped scopes. Keep launcher-owned startup evidence, cleared Code Grader environments and cap-kill diagnostics; resolve the scope launcher before applying the sandbox PATH.

Keep both sandbox and memory-cap documentation. Synchronize both fake Trials before warning in the zero-retry regression: unequal worker startup reproduced its assumption that both Trials had already started.

Validation: cargo check, cargo fmt --check, cargo clippy --all-targets -- -D warnings, and scripts/affected-tests origin/issue-977. All 2553 Rust tests passed (58 skipped), as did all 44 site checks. Full affected validation took 1344.43 seconds; Nextest execution took 1289.404 seconds with a cached 0.32-second test build.
Trial sandbox preparation resolves socat before probing bwrap. Both new failure fixtures supplied only bwrap, so CI hosts without socat stopped at the relay dependency instead of reaching the asserted launcher failure. Provide a fixture-local executable relay stub; both launchers fail before it can run, and all Void Trial and diagnostic assertions remain intact.

Reproduced both failures with socat excluded from PATH and verified both pass after the fix. Validation: scripts/affected-tests issue-977 (44 browser tests and 2553 Rust tests passed), cargo fmt --check, and cargo clippy --all-targets -- -D warnings.
Sandbox Experiment Trials and Graders
Wait for release Experiments before publishing
Add live Experiment pages to the Console
Approve proposed Eval tasks from the CLI and Console
Preserve both the Trial-input preflight documentation and the Console Experiment page documentation on the homepage.
Keep the Trial-input preflight and Spec-review sandbox documentation alongside the incoming CLI and Console Eval-task approval documentation.

Validation: cargo check, cargo fmt --all -- --check, 44 site tests, three Console Experiment browser tests, and all 171 tests in evals, experiments, trial and console passed (three skipped).

The affected-tests selector stopped after 400 Rust passes on release::an_interrupted_release_resumes_the_same_experiment, matching the intermittent failure documented in upstream PR #1273. Its isolated cargo test and nextest reruns both passed, and it passed again in the 171-test targeted run. The selector took 432.74s including compilation; the targeted run took 190.67s.
Complete Spec-review Trial inputs before Experiment builds
@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 24, 2026 19:26
Preserve Experiments alongside main's trace recording, Inbox evaluation, resource admission and Console views. Keep older Arms readable and route Experiment release messages through the shared timestamp helper.
@JacobStephens2
JacobStephens2 merged commit ee7fe11 into main Oct 24, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-977 branch October 24, 2026 20:44
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.

Spec: Experiments, which measure a change before it reaches production

1 participant