Skip to content

platform-docs has no run-lifecycle reference — blocked on #596, and the pages suspected of drift are already correct #601

Closed

Description

@serge-ivo

platform-docs/ has no run-lifecycle reference — and the docs suspected of drift are already correct

Measured 2026-08-15 before any edit.

Starting position: the published docs are NOT stale

Named explicitly so an implementer does not churn correct files — that is this repo's characteristic failure mode:

The actual gap

RUN_HEALTH_STATES is a four-member set including ended (workers/api/src/lib/work-report.ts:93). Migration 0127 split liveness, progress and parks into separate facts. DRIVER_RESUME_POLICY governs which drivers resume after an interruption.

$ grep -rl 'RunHealth\|waitingUntil\|lastProgressAt\|lastAliveAt' platform-docs/
(no matches)

Zero published pages mention any of it. This is net-new reference material, not a correction.

⚠ Blocked, deliberately — do not write this yet

The vocabulary is actively moving. Open against this exact surface: #591 (park writer), #594 (budget states), #596 (waiting_until carries two opposite meanings — "expected to resume" vs "about to give up"), #598 (unwritable status values), #600 (unchecked vocabulary citations).

Publishing now would freeze a known contradiction into reference documentation, which is worse than the current absence: an absent page misleads nobody, a published contradiction misleads everyone. #596 in particular must be resolved first — a reference page cannot define a field that means two opposite things.

Scope decision for whoever picks this up

New page versus a section on architecture.md. Note docs:drift checks nav ↔ sources in both directions (currently 10 == 10), so a new page must be added to nav or the gate goes red.

Acceptance criteria

  1. Every stated value set is rendered from the enum that emits it, not transcribed — RUN_HEALTH_STATES is a const array precisely so this is possible, and a transcribed list is the drift this issue exists to avoid.
  2. The liveness / progress / park distinction is stated in the terms the code uses, including that neither timestamp speaks for the engine (work-report.ts:84-88 is the reference wording).
  3. pnpm docs:build (zensical --strict) and pnpm docs:drift green; nav updated if a page is added.
  4. Denominator stated per ADR 0002 for any guard added.
  5. waiting_until means 'expected to resume', and the human handoff's deadline is a give-up — one field, two opposite actions #596 resolved before this lands.

Verified vs inferred

Activity

  1. serge-ivo commented on Aug 15, 2026

    @serge-ivo
    ContributorAuthor

    Delivered in 7a19d104. CI green, host deploy green, verified live.

    The page

    platform-docs/run-lifecycle.md, nav 10 → 11 both directions. Live at
    https://proagentstore.online/docs/run-lifecycle/ — 200, linked from the docs index, and the
    rendered park table reads one "gives up" (human) and two "resumes" (engine_limit,
    platform_interrupt), which is #596's semantics arriving intact on the public page.

    AC1 — generated, not transcribed

    The two value sets are rendered into delimited regions from RUN_HEALTH_STATES,
    RUN_WAIT_REASONS and PARKS; the gate compares them byte-for-byte. Only the value sets are
    generated — the prose stays hand-written, per the rule wire-surface.mjs states about golden
    files over explanation.

    PARKS.why is rendered too, as a considered trade: it reaches the owner verbatim through
    waitClause, so a paraphrase could disagree with what the platform actually says. The cost is
    that rewording a park regenerates the block.

    Every failure mode was watched, not assumed

    Both directions of drift, driven end-to-end before the guard was trusted:

    Mutation Result
    5th RUN_HEALTH_STATES member, page untouched red, names the count
    4th RUN_WAIT_REASONS member with no PARKS row red, names the reason
    human flipped give_up → resume red — the #596 regression, which a set-membership check would not catch
    enum reshaped to a bare type union red as UNREADABLE, not silently empty (G3)
    page edited back to the pre-#588 wording red, printing the expected text verbatim
    unmutated control green

    The code-side cases were driven through in-memory mutations of workers/api sources, which
    another agent holds live. Nothing under workers/api/** is touched.

    One defect this found in itself

    The first end-to-end red run printed the ✓ denominator line beside the ✗. A success line next
    to a failure about the same check reads as "mostly fine" — the #604 collapse wearing a summary's
    clothes. The note is now withheld whenever the check failed, pinned by a test.

    AC4 — denominator

    ✓ run lifecycle: 2 generated region(s) in platform-docs/run-lifecycle.md == 4 health state(s) + 3 park reason(s) (2 deadline kind(s)) from 2 code file(s)
    

    Floors are derived, not observed: 3 health states (the pre-ended size; runHealth returns
    four distinct literals) and 2 park reasons (the smallest set carrying both a resume and a
    give-up). Below either, the parser has stopped parsing — and an empty render compares equal to an
    empty region, so without the floor this guard would pass by checking nothing.

    One correction to the brief

    I was pointed at work-report.ts:84-88 as the reference wording for "neither timestamp speaks for
    the engine". Those lines are the ended-is-a-member rationale. The engine caveat is at
    work-report.ts:314-317 ("What it deliberately does NOT claim: that the ENGINE is working…
    The live runState lives behind /capture"). The page cites the latter; both facts are stated,
    under the right citations.

    Verified / not verified

    • Verified: all 14 docs:drift checks, pnpm docs:build (zensical --strict), pnpm typecheck
      (11 projects), every scripts/check-*.mjs gate enumerated from ci.yml (including
      check-surface-lock --require-history and check-mcp-parity), biome, CI green on 7a19d104,
      and the live page + nav.
    • Full suite: measured on a throwaway worktree at origin/main + only these five files —
      all 10 scripts/ test files, 168 tests, green. The main checkout carried failures in
      workers/mcp/src/** from another agent's uncommitted work; those same files pass at clean
      origin/main, so they are neither mine nor main's. No git stash was used at any point.
    • Not run: pnpm test:e2e. Nothing under store/ or agents/coder/web was touched, and the
      only docs path any spec loads is /docs/browser-runtime/ (e2e/console-server.mjs:209).
    • Not observed live: no run is parked right now, so the page's park table has not been read
      beside a real waiting row. Same gap waiting_until means 'expected to resume', and the human handoff's deadline is a give-up — one field, two opposite actions #596 recorded; the next handoff will carry it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions