Repository navigation
refactor: eliminate run as a noun, keep session + turn (#279) - #292
Conversation
…l#279) Implements the decision on rossoctl#279: `runId` was reused for three unrelated things (an orchestrator batch id, a sandbox-lease field duplicating session_id, and a run-to-completion vs. one-turn execution mode). Rename `runId` -> `sessionId` across the harness sandbox/config/converge/swebench helpers and control-plane, and delete the dead `lease.runId` field (a self-reported duplicate of session.id that nothing writes or reads for authz). Data-plane `/runs` and `/v1/runs` routes are left untouched (frozen legacy job-mode phrasing per the decision) since 14 deploy/knative scripts already call them. Adds docs/glossary.md as the canonical session/turn definition, linked from the README, the archetypes doc, and the multi-user control-plane spec. Fixes rossoctl#279 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
esnible
left a comment
There was a problem hiding this comment.
Careful, well-scoped mechanical rename backed by a canonical glossary. Verified the load-bearing claims against refs/pull/292/head and main through the API rather than a local checkout (head is a fork):
- Rename completeness — the grep claim holds: zero
runIdinharness/srcandpackages/control-plane/srcon PR HEAD, confirmed file-by-file across all eight touched sources. - The
lease.runIddeletion is genuinely dead — searched the repo for consumers oflease.runId: none. It was write-only, andresources.test.tsnow assertsnot.toHaveProperty('runId')rather than just dropping it from the fixture, which is the stronger form. - No wire-format or Redis-key change — every rename is a parameter or local.
leaseKey/runtimeKeyand thesh:cp:session:<sid>shapes are untouched; only the ZSET member-value variable was renamed, and that call site was already passingsid. SinceRUNTIME_FIELDSis a write-side allowlist, removingrunIddegrades gracefully against runtime hashes already in Redis. - The naming lie was real —
run-leaf.ts:600passedrunId: sid, a session id into a field namedrunId. This fixes an actual mismatch rather than inventing one. - Out-of-scope
runIdsurvivors are independent —experiments/src/sharing.tshas its ownLeafObservation.runId, a local experiment-analysis type with no coupling to the lease/session path;deploy/knative/and the older specs are the frozen legacy surface the PR scopes out deliberately. - Glossary claims check out — all three referenced specs exist, the route names match
server.ts:618exactly (/runs,/run-leaf,/v1/runs), and every relative link resolves. - Tests — no
.skip/.only/.todointroduced, net +1 assertion.
Freezing the /runs data-plane routes instead of chasing a second rename cycle is the right call. The pre-existing select-sandbox.test.ts failure disclosed in the test plan is consistent with CI being fully green here.
One nit inline on the script count in the glossary; not blocking.
Areas reviewed: TypeScript (harness + control-plane), Docs, Tests, Security
Agent/IDE config (.claude/.vscode): none — supply-chain gate clean (checked both +++ b/ and rename to forms)
Commits: 1 commit, all signed-off: yes
CI status: passing (13/13)
|
|
||
| `run` survives only: | ||
|
|
||
| - As an English verb ("run to completion" vs. "one turn"). |
There was a problem hiding this comment.
nit: "14 scripts under deploy/knative/ already call them" — a code search for the literal /runs under deploy/knative/ returns 12 files. The substantive point is right and is the part that matters (these routes are load-bearing for the deploy scripts, so renaming them would be real churn), but a hard count in a doc that is meant to be canonical will drift the next time a script is added or removed.
Suggest "a dozen-plus scripts" or just "the scripts under deploy/knative/" so the rationale survives without needing maintenance.
There was a problem hiding this comment.
Fixed — dropped the hard count, kept the rationale: docs/glossary.md now just says "the scripts under deploy/knative/" instead of a number that will drift. 97aa4df.
review) esnible's review noted the "14 scripts" claim in docs/glossary.md would drift as deploy/knative/ scripts are added or removed (current count is 12). Drop the number; the rationale (deploy scripts already call these routes, so renaming them is real churn) survives without needing maintenance. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
…tion Integrates main (through #292) so this branch can target main directly and carry E12 + E13 as one landing: #273's branch already contains every commit of #272, so retargeting its base collapses the stack rather than dropping any of it. #272 is closed as superseded, not discarded. EXPERIMENTS.md was the only conflict, and it was a pure insertion clash -- main added its "Issue #266 -- the metal/nested ratio" section at the same point this branch added E12 and E13. Both sides kept, #266 first since it continues the E10/E11 material it ratios against. Three prose amendments to the E12 section, so main never carries a claim this branch already knows is wrong. E13 established that C@128's failures were this probe's own listener startup race -- a control at the same N=128 over the existing Exec path came back clean, memory and the OOM killer were ruled out directly, and the fix in b203e38 drove the dominant failure signature to zero on both substrates. E12's section previously attributed those failures to host resource or scheduling contention: - A dated caveat under the E12 heading names what is superseded and what still stands (rungs A, B, D, C@8, both witnesses, T1's support). The numbers stay, as the record of what the pre-fix probe produced. - Sealed prediction 6 is re-scored. Its falsifier still fires, but on the residual failure family rather than the race: 37 of 40 post-fix metal iterations clean, 3 failures across 5,120 VM-attempts, none of them the signature the fix removed. Verdict unchanged, substance changed. - E12's "Effect on PR #268" paragraph now points at E13's revised recommendations rather than standing as current. No script, test or prediction file changed in this merge. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Summary
runId->sessionIdacross the harness sandbox-lease/config-overlay/converge/swebench-setup helpers and control-plane (mechanical, params/locals/comments/tests)lease.runIdfield (packages/control-plane/src/ownership.ts,resources.ts) — a self-reported duplicate ofsession.idthat nothing writes or reads for authz/runsand/v1/runsroutes untouched (frozen legacy job-mode phrasing, per the decision) since 14deploy/knative/scripts already call themdocs/glossary.mdas the canonicalsession/turndefinition, linked from the README, the archetypes doc, and the multi-user control-plane specFixes #279
Test plan
make typecheckcleanmake lintclean (prettier reformattedconverge.ts/swebench-setup.tsfor line width, no logic change)vitestrun over the touched suites (config-overlay,swebench-setup,select-sandbox,converge,run-leaf,packages/control-plane/resources,ownership) — 183/184 pass; the 1 failure (select-sandbox.test.tsRedisRecordStore-mock-as-constructor) reproduces identically on unmodifiedmain, confirmed pre-existing and unrelated to this changegrep -rn "runId" harness/src packages/control-plane/srcreturns no results after the rename🤖 Generated with Claude Code