Skip to content

spec: StrandedRunState's TSDoc names two members while the type will carry five — correct it once #15358 lands #16708

Description

@os-trump

Blocked-by: #15358

Restart-when: git log origin/main --oneline | grep -q '(#16704)' — i.e. PR #16704 has merged. ⭐ That predicate is keyed on a landing, not on a prose field, deliberately: see #13566's correction, where a hold keyed on an ADR's Status: line could never fire because no acceptance act writes that line.

The measurement

packages/spec/src/contracts/automation-service.ts:345 documents StrandedRunState as 'missing' | 'failed'.

⚠️ That is correct today and this card must not be started early. PR #16704 (card #15358, ruling B′, contract review PASS) widens the type to:

'missing' | 'failed' | 'repairable' | 'snapshot_dropped' | 'unrepairable'

The moment it lands, that TSDoc describes a two-member union that has five members — a spec doc telling a reader the type cannot express the distinction the platform just published.

Why this is not a "docs nit"

The ruling forbade any packages/spec change inside #16704 (option A — publishing the discriminator on the wire surface — was refused, and touching spec at all was out of scope). So the stale line is the deliberate, known residue of a correct decision, not an oversight — which is exactly the kind of residue this repo keeps losing track of.

Same class as #16333 ("manifest.zod.ts integrity TSDoc must stop asserting an unpack-time verification nobody performs"): a spec docblock asserting something measurably false about the shipped contract. That one was worth a card; so is this.

Scope

Docs-only. Correct the member list and, if it reads naturally, say what each new member means at the contract level (the engine-side definitions are in #16704's engine.ts TSDoc — ⛔ do not re-derive them, quote the landed text).

Not in scope: adding the discriminator to any wire surface, ExecutionLogEntry, or GET /automation/:name/runs/:runId. Ruling B′ refused that and this card does not reopen it.

One reading already taken, so it is not re-derived

packages/spec/src/contracts/automation-result-status.pin.test.ts:170 asserts only toContain('StrandedRunState') — it does not pin the member list, so this correction will not fight a pin. (Measured by the isolated contract reviewer on PR #16704 at head 1b4dad617.)

⚠️ The two CHANGELOG.md mentions of the old two-member spelling are historical records and must stay — ⛔ do not "fix" them.

Filed by the domain:services PM seat out of the #16704 contract review's §5, per the seat's commitment on #15358 (5576769163). Unassigned.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions