Skip to content

Add cost and time ceilings and cheaper/faster Experiment Verdicts - #1938

Merged
JacobStephens2 merged 2 commits into
issue-1484from
issue-1879
Nov 10, 2026
Merged

JacobStephens2 merged 2 commits into
issue-1484from
issue-1879

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

fixed Bar (ceilings off by default)
  → ADR-0025 quality Verdict
  → paired cost/time ceilings
  → shared JSON / text / Console Verdict line

Closes #1879

--cost-ceiling and --time-ceiling fix positive Candidate/Baseline ratios before Trials. A paired median above either ceiling fails; unknown measurements cannot pass a configured ceiling. A task-clustered Bayesian bootstrap at the Bar's pass level adds cheaper/faster annotations, while higher paired medians report higher cost/time. Result format 7 documents the added fields; saved Verdicts retain their shape when read.

Seams under test

  • Experiment CLI preparation, resume, saved JSON and text reads.
  • Console Experiment page rendered through the real server in Chromium.

Evidence

Execution evidence

  • Before: cargo test --test experiments ceilings::a_cost_ceiling_is_fixed_before_trials_and_fails_a_three_times_candidate
    failed at tests/experiments/ceilings.rs:8: unknown Experiment flag: --cost-ceiling (exit 101; 0 passed, 1 failed).
    After: the same command passed (1 passed, 0 failed), exercising the 3× Candidate against a fixed 2× ceiling and refusal to change the Bar on resume.
  • cargo test --test experiments ceilings::: 4 passed on final head 3e1af61e (7.67s, cached compilation). Covers no-ceiling quality preservation, time ceilings, exact-ceiling equality, invalid ratios and the exact cheaper JSON/text line.
  • PLAYWRIGHT_BROWSERS_PATH=/tmp/thirdshift-1879-browsers node --test --test-name-pattern='passing cheaper Candidates' console/tests/experiments.test.cjs: 1 passed. Checks the exact line against JSON/text and real Console rendering at 1440×900 and 390×844.
  • Final affected checks: local site 68 passed, Console browser 171 passed, and all 1,666 enabled unit tests passed. CI on final head has passed formatting, clippy, site and Console checks; its full Rust cargo nextest run is still in progress. The local full-suite limitation below remains explicitly recorded.
  • Validation environment: the host's default Python 3.9 lacks tomllib. The first full run stopped in settlement::historical_review_and_reclosed_origin_regressions with ModuleNotFoundError: No module named 'tomllib'; the exact test passed with a task-local python3 symlink to /usr/bin/python3.11 (3.11.13). No repository change was needed for this environment failure.
  • scripts/affected-tests issue-1484 was rerun with that Python shim and three Rust test threads. Its Rust run (714.90s, cached compilation; whole affected command 962.63s) reached the Console integration suite (265 passed) and stopped at idle::unchanged_requests_reuse_retained_records_but_replacements_are_visible: unchanged request reread 107775 bytes against its 48 KiB budget. The exact isolated command, cargo test --test console idle::unchanged_requests_reuse_retained_records_but_replacements_are_visible -- --exact --nocapture, reproduced the same count. Running that same test binary against the pinned base executable (2b81a531, temporarily substituted at its compiled binary path and restored with an EXIT trap) also failed with exactly 107775 bytes. This is a pre-existing local-host limitation, not a change in this PR. Source and tests were left intact.

Visual evidence

Passing cheaper/faster Candidate, desktop 1440×900:

Before
After

Same flow, phone 390×844, scrolled to the Verdict:

Before
After

Before was captured from base commit 2b81a531 in a detached worktree. Each pair uses the same fixture, viewport, browser and page state. Captures are retained in a secret Gist.

Review coverage

Independent Standards and Spec reviews used git diff 2b81a531bb7870db6f64bc14b169b571b08fb492...HEAD, the pinned remote issue-1484 tip. The local base ref was stale and checked out in a separate worktree, so it was left untouched.

Standards raised 1 P3 duplication judgement, fixed by sharing accounting::paired_ratios; the reviewer confirmed it resolved. Spec raised 0 findings. Neither axis raised a behavior failure requiring a reproduction. Both reviewers read all 22 changed files, including the generated manual, and reread the final consolidation. Unread changed files: none. Generated-output exclusions: none.

Reports, final files-read lists and summary.json ({"standards":1,"spec":0}) are retained in .thirdshift-review-Js4oZv/ with the Session evidence.

Unaddressed findings

Standards

None.

Spec

None.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Ceilings are opt-in. Quality statistics retain their existing method and decision; rolling back restores the prior presentation and options.

Blast Radius: Experiments

Experiment option parsing, saved result contract and CLI/Console Verdict presentation.

Built with codex codex-cli 0.166.0 · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit b849ee4 into issue-1484 Nov 10, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1879 branch November 10, 2026 07:23
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