Repository navigation
Name Experiments, with readable defaults for A/A and release ones - #1503
Merged
Merged
Conversation
) thirdshift experiment ... --name <text> saves a name beside the Bar, and thirdshift experiments <id> --name <text> renames one in any state under a short metadata lock every experiment.json write now takes, so a running Experiment keeps a rename made while it runs. --name '' clears it. Unnamed Experiments read "A/A at <ref>" for identical Arms and "Release <ref>" after --release, otherwise what differs between the Arms. The CLI list, experiments <id>, --json (name, name_set) and the Console's list, detail page and tab title all use the one name.
The resume command shown for an Experiment leaves out --name, so following it no longer undoes a later rename. Release Experiments saved before the release flag are recognised by their saved command. The default name and the Console's "What it tests" share one list of Arm setup changes, so a Harness version change is never named A/A.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An Experiment can now be given a name, and one without a name gets a readable default instead of a bare commit such as "71c7a497".
The name is kept beside the Bar, never inside it. It is not part of the Experiment's identity, so it never changes Trials, Scores or the Verdict and never refuses a resume.
Shown in: the
experimentslist line andexperiments <id>(<id> · <name> · <state> · …);--jsonasnameplusname_set; and the Console's list, detail heading and browser-tab title. The live refresh carries the title over, so a rename from the CLI reaches an open page.A running Experiment holds its run lock for the whole run, so a rename can't take that lock. Instead, every
experiment.jsonwrite (the run's own saves, rechecks and renames) now takes a shortmetadata.lock. The run's saves keep whatever name is on disk, so a rename made mid-run survives the run's later writes. The resume command shown for an Experiment leaves--nameout, so following it keeps a later rename.names::setup_changesis now the single list of Arm differences (Harness, Model, Effort, Harness version). The default name and the Console's "What it tests" both use it, so a page can't be titled "A/A" while it lists a change.Tested at two pre-agreed seams:
thirdshift experiment … --name,thirdshift experiments <id> [--name] [--json]), driven through the fake Harnesses intests/experiments/names.rsandtests/experiments/release.rs;tests/console/experiments.rsandconsole/tests/experiments.test.cjs.tests/experiments.rs's Fixture now copies the Arm binaries withsupport::copy_executable. The in-processfs::copyhitExecutableFileBusylocally once the new tests ran in parallel; that helper exists for exactly this race.Evidence
Before: the new tests fail on
main's behaviour. For example:After:
Behaviours pinned by tests: a paused
--nameExperiment renamed and then resumed (no Bar refusal; the name is kept); a rename while it runs survives the run's later writes;--name ''brings backmain (merge base) → candidate; an A/A run readsA/A at v0.1.0; a release readsRelease candidate;, a two-line name and 101 characters are refused before any Experiment exists, and 100 characters are accepted; a record withoutnamegets its default in the CLI and on both Console pages.Full Rust suite (
cargo test --no-fail-fast, head 7688a01, before merging currentmain; after the merge, the experiments, console and unit tests above and the Console browser tests passed again): 3250 passed, 44 failed. Every failure is a sandboxed test on a host withoutsocat(sandbox failed to start: socat is not on PATH, or a Trial voided assandbox_unavailable), plus onebug_originssettlement test that needs Python'stomllib, which this host's Python lacks. None is in code this PR changes; CI has both tools.scripts/affected-tests mainselected the full suite and stopped at the same sandbox unit tests.Merge Danger
Door: two-way
The only new field written to
experiment.jsonis an optionalname(plus thereleasedefault). Older binaries ignore unknown keys there, and older records load with defaults.Blast Radius: Experiments
The plain-text
experimentsline gains a name column after the ID, so a script that splits that line by position would shift;--jsononly adds keys.Stored::savenow takes&mut selfand a brief file lock on every metadata write.Review
Reports: Standards 9 findings (judgement calls, no hard violations), Spec 3. Fixed: the shown resume command undid renames (Spec 1 / Standards 8); older release records lacked the release default (Spec 2); the A/A check ignored a Harness version change (Standards 5); the store's module doc missed the new lock (Standards 3). Commits 59adfc7 and 7688a01 make those fixes after the review pass; they touch only files the review read. Every changed file was read by both axes, and
site/docs/index.htmlis generated output, confirmed withnpm run docs:checkand also inspected.Unaddressed findings
Standards
store.rs. Declined:store::renamemust read the record undermetadata.lock. A nestedflockon a second file description from the same process would block on itself, so it can't callStored::rename. Each body is three to five lines (src/evals/experiment/store.rs,fn renameandStored::save).savesilently replacesself.namewith the name on disk. Declined: that invariant is what keeps a mid-run rename. It is stated inStored::save's doc comment and pinned bynames::renaming_a_running_experiment_survives_its_later_writes, and the only writer of the name isrename.shortduplicated innames.rsandrender.rs. Declined:render::shortserves several commit displays in the Console. Sharing a one-line helper would expose it crate-wide for no behaviour change.String(Primitive Obsession). Declined: the rules are enforced at both entry points throughnames::parse, andname_setmust stay its own JSON field, as the issue asks.names::defaultreads like theDefaulttrait. Declined: it is always called by its module path,names::default(…).ExecutableFileBusyrace.Spec
Closes #1378
Built with claude 2.1.312 · claude-opus-5-5 · high
Security review outcome
No unaddressed introduced findings.