Skip to content

refactor: eliminate run as a noun, keep session + turn (#279) - #292

Merged
pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:fix/279-run-session-glossary
Sep 18, 2026
Merged

pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:fix/279-run-session-glossary

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

  • Implements the decision posted on Ambiguity between "run" and "session" — clarify or eliminate the term #279: renames runId -> sessionId across the harness sandbox-lease/config-overlay/converge/swebench-setup helpers and control-plane (mechanical, params/locals/comments/tests)
  • Deletes the dead lease.runId field (packages/control-plane/src/ownership.ts, resources.ts) — a self-reported duplicate of session.id that nothing writes or reads for authz
  • Leaves data-plane /runs and /v1/runs routes 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 #279

Test plan

  • make typecheck clean
  • make lint clean (prettier reformatted converge.ts/swebench-setup.ts for line width, no logic change)
  • Targeted vitest run 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.ts RedisRecordStore-mock-as-constructor) reproduces identically on unmodified main, confirmed pre-existing and unrelated to this change
  • grep -rn "runId" harness/src packages/control-plane/src returns no results after the rename

🤖 Generated with Claude Code

…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 esnible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 runId in harness/src and packages/control-plane/src on PR HEAD, confirmed file-by-file across all eight touched sources.
  • The lease.runId deletion is genuinely dead — searched the repo for consumers of lease.runId: none. It was write-only, and resources.test.ts now asserts not.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/runtimeKey and the sh:cp:session:<sid> shapes are untouched; only the ZSET member-value variable was renamed, and that call site was already passing sid. Since RUNTIME_FIELDS is a write-side allowlist, removing runId degrades gracefully against runtime hashes already in Redis.
  • The naming lie was real — run-leaf.ts:600 passed runId: sid, a session id into a field named runId. This fixes an actual mismatch rather than inventing one.
  • Out-of-scope runId survivors are independent — experiments/src/sharing.ts has its own LeafObservation.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:618 exactly (/runs, /run-leaf, /v1/runs), and every relative link resolves.
  • Tests — no .skip/.only/.todo introduced, 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)

Comment thread docs/glossary.md

`run` survives only:

- As an English verb ("run to completion" vs. "one turn").

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@pdettori
pdettori merged commit 5492374 into rossoctl:main Sep 18, 2026
13 checks passed
@pdettori
pdettori deleted the fix/279-run-session-glossary branch September 18, 2026 12:04
pdettori added a commit that referenced this pull request Sep 18, 2026
…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]>
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.

Ambiguity between "run" and "session" — clarify or eliminate the term

2 participants