Skip to content

Spec: process Trials and a code-graded implement Eval suite - #1915

Merged
JacobStephens2 merged 53 commits into
mainfrom
issue-1484
Nov 10, 2026
Merged

JacobStephens2 merged 53 commits into
mainfrom
issue-1484

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Experiments can compare complete Built-in or Custom Ticket processes on past merged work, including implementation and Security review, and grade the Trial's own final commit.

merged Ticket → screen reference tests at base and merge
             → freeze each Arm's build, Process and home skills
             → run Steps locally, stopping before publication
             → overlay reference tests on the Trial's final commit
             → grade offline + check transcripts + price Sessions
             → paired quality, cost and time Verdict

The shared Ticket-source seam preserves factory execution and supplies local Trial inputs without GitHub, a Claim or a pull request. Trials retain Steps, Sessions, traces, delivered/stopped-to-ask/failed outcomes and usage under their Experiment; they do not enter factory run lists or metrics. Stopped-to-ask fails quality; outside failures and incomplete Session accounting remain Void.

Process task proposals retain real merged-work provenance, the host environment, separate reference tests, changed shared fakes and fail-to-pass/pass-to-pass selectors. Preparation screens the tests at both commits and refuses changed inline Rust tests. The suite selects three Trials and declares its Factory skill, Process, prompt, Harness, Model and Effort dependencies. Building and measuring the real task inventory remains the separate post-release work described by the Spec.

Arms freeze Custom processes and referenced home skills by content hash and check them before every Trial. Review fixes also include those hashes in Experiment identity and cost history, so editing the same source path starts a new comparison. Unchanged inputs resume their frozen Experiment; restore an older Custom input's bytes to resume its older comparison. Its saved results remain readable by ID.

The code Grader applies reference tests to the final committed work and shares one Bar deadline across snapshot preparation and all selectors. Session accounting uses a dated frozen price table, observed Models and Step roles. Paired median cost/time ratios, optional fixed ceilings and cheaper/faster Verdict text accompany quality. Transcript leak hits await auditable human decisions; confirmed leaks void the Trial. CLI and Console expose the same retained facts, including format-8 Experiment JSON and its corrected OpenAPI schema.

Closes #1484

Seams under test

  • Experiment CLI JSON through the existing fixture: changed Custom inputs select a new comparison; combined selector work respects the fixed grading timeout.
  • Console Experiment JSON/OpenAPI and detail HTML: published formats and Bar wording agree with served results.
  • Console HTTP process-I/O checks retain their original assertion with host Cron jobs isolated at the command seam.
  • Existing Spec acceptance seams: local --trial, evals prepare, evals propose-process, Arm preparation, Experiment resume, and Console Trial/trace/leak-decision views.

Evidence

Execution evidence

  • cargo test --test experiments process::edited_custom_process_starts_a_new_experiment -- --exact --nocapture
    Before: assertion left != right failed: changed Process bytes must select a new frozen Arm; both IDs were identical.
    After: 1 passed; 0 failed.
  • cargo test --test experiments process::process_grading_shares_one_bar_timeout_across_selectors -- --exact --nocapture
    Before: combined grading must stop at the Bar timeout; the Score was passed: true after two four-second selectors under a six-second Bar.
    After: 1 passed; 0 failed; a timed-out check fails the Score; later selectors stay unstarted after the shared budget expires. The existing selector-timeout regression now asserts that same behavior.
  • cargo test --test console experiments::openapi_experiment_format_matches_served_list_and_detail -- --exact --nocapture
    Before: /api/v1/experiments advertised Number(6) while the served format was Number(7).
    After: 1 passed; 0 failed for both list and detail schemas. The added Arm digest advances both the view and its schema to format 8 under the documented versioning rule.
  • cargo test --test console experiments::console_experiment_does_not_claim_efficiency_is_outside_the_bar -- --exact --nocapture
    Before: the rendered comparison contained Efficiency stays outside the Bar with a recorded cost ceiling.
    After: 1 passed; 0 failed; the text explains the ceilings and distinguishes frozen-price accounting from Harness-reported usage.
  • Removed the duplicate hard-kill role-only regression; the stronger retained test covers that same role plus positive Session and role time.
  • cargo test --test console idle::unchanged_requests_reuse_retained_records_but_replacements_are_visible -- --exact --nocapture
    Before: unchanged request reread 107775 bytes. The record was read only once; host crontab -l and PAM startup caused the extra I/O.
    After: 1 passed; 0 failed after giving the shared Console fixture an empty-crontab fake. The original 48 KiB assertion and cache behavior are unchanged.
  • Validation: scripts/affected-tests main passed Go, TypeScript, site, production-build and Console-browser checks. Its Rust phase exposed the old selector-timeout assertion described above; after updating that assertion, cargo nextest run --no-fail-fast passed all 3,988 tests (91 skipped) in 2,113.64s wall time, including compilation with warm dependencies and four workers. All review regressions pass. Python tooling: python3 -m unittest discover -s scripts -p 'test_*.py' — 41 passed with Python 3.11. cargo fmt --check and git diff --check passed.

Visual evidence

Matched Before (main) and After Console Experiment pages were captured and inspected at 1440×900 and 390×844, with the Arm comparison and Bar open. Four PNGs are retained in .thirdshift-review-rq0eHq/visual/ beside the Session's review artifacts. The captures show the corrected comparison text and fixed resource ceilings. Media hosting via a git-pushed Gist was omitted under the no-push instruction.

Review coverage

The independent reviews cover the entire main...HEAD comparison, including the merged Fleet and prototype ancestry. Reports and final files-read lists are retained beside the Session trace in .thirdshift-review-rq0eHq/standards.md and spec.md; counts in summary.json are Standards 2 and Spec 4, including fixed findings. OpenAPI was raised on both axes.

  • Standards read 277 of 278 changed files. prototype/go/factory-skills.json was intentionally not read: its sources are the unchanged skills/**/* tree, with generator prototype/go/bundle-skills.py and consumer prototype/go/skills.go reviewed. python3 prototype/go/bundle-skills.py --check exited 0; go test ./... passed, including the inspected TestTicketRunLinksEmbeddedSkillsAndStreamsSession consumer assertions. This is the sole generated-output exclusion.
  • Spec read all 278 changed files, with no exclusions. The generated manual was inspected directly on both axes. There are no other unread changed files.

Unaddressed findings

Standards

None. Both findings addressed.

Spec

None. All four findings addressed.

Security

None. The process Grader's script-directory standard-library bypass was fixed. A python3 tests/check.py selector put the script directory ahead of the standard library, so a Trial could commit tests/pathlib.py and pass a broken commit. The import guard now moves every path inside the repository behind the standard library. Proof: cargo test --bin thirdshift sandbox::code_grader::tests::a_script_directory_cannot_shadow_the_standard_library -- --exact failed before the fix (script directory shadowed pathlib: exit status: 0) and passed after it. The same command on the pinned merge base ran 0 tests and exited 0; that grading path is not on the base.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Code rollback is available; saved Experiment records remain retained. Experiment JSON clients must recognize format 8 for the added Arm digest; private metadata stays at format 1. Changed Custom process content now receives a distinct Experiment identity.

Blast Radius: Factory

Shared Ticket Process execution, Experiment preparation/grading/accounting, retained result contracts and Console views. The remaining real-task rollout needs the released build.

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

Tickets

JacobStephens2 and others added 30 commits November 9, 2026 16:04
Isolate the Process engine’s Ticket source and publication
Run Built-in Ticket processes as Experiment Trials
A Trial could commit a module such as pathlib.py and make the overlaid
reference tests import it, so a broken commit still passed. Process
grading now searches the repository after the standard library. Review
Graders are unchanged.
Build and screen process Eval tasks from merged Tickets
A Process Trial keeps one home for every Step and prepares a new sandbox
there when a Step uses another Harness. Copying a login through a symlink
in that home wrote outside the sandbox. Host writes and read-only binds
into the fresh home now refuse a symlink along the destination.
Preserve the process Grader documentation alongside process task proposals. Have proposals and preparation share the required process_grading table used by the Grader, retaining the proposal report format.

Validation: Eval and process Trial tests, site and Console browser tests, cargo check, formatting, and all-target clippy pass. Full Rust validation stops at the Console idle IO regression already documented in #1926 (107775 bytes); its isolated rerun reproduces the failure.
Preserve Custom process and frozen home-skill documentation alongside the process Eval task proposal guidance. Regenerate the manual from the merged source.
JacobStephens2 and others added 21 commits November 9, 2026 22:34
Grade process Trials with the reference fix's tests
Preserve frozen Custom process Arms and home skills alongside final-commit process grading with the reference tests and shared fakes overlaid. Regenerate the manual and reconcile the three hand-written site pages.

Validation: cargo check --bin thirdshift, cargo fmt --check, all-target clippy, and all 68 site checks pass.
Freeze Custom process Arms and home skills for Experiment Trials
…ption

The supervisor skipped its repository integrity walk whenever the Arm protocol's void cause was interrupted, including when the outcome was still success. A Trial could edit a reviewed input, report success with that cause, and keep the mutated result. The walk is skipped only when the attempt is already void for interruption.
Check process Trial Session evidence for the real fix
Preserve Trial role pricing and accounting-gap Voids alongside process Trial leak detection and fix-leaked Voids. Retain both features in the result contract and domain-to-code index.
Price Trial sessions by role and report paired cost and time
Add cost and time ceilings and cheaper/faster Experiment Verdicts
Key Custom Arms and cost history by Process and home-skill content, and
share one Bar deadline across process snapshot preparation and selectors.
Advance the result contract and OpenAPI schema together to format 8, correct
the Console's Bar wording, and remove the subsumed killed-session test.

Isolate shared Console fixtures from host crontabs: PAM startup IO was
tripping the unchanged idle-store regression despite the record being cached.
Process selectors run `python3 tests/check.py`. Python searches that
script directory before the standard library, and the import guard only
moved the working directory, so a Trial could commit tests/pathlib.py
and pass a broken commit. The guard now moves every path inside the
repository behind the standard library.
@JacobStephens2
JacobStephens2 marked this pull request as ready for review November 10, 2026 09:55
@JacobStephens2
JacobStephens2 merged commit f5a2653 into main Nov 10, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1484 branch November 10, 2026 11:03
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 10, 2026
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: process Trials and a code-graded implement Eval suite

1 participant