dispose() cached its drain promise. When the cleanup deadline expired it
returned UNAVAILABLE/retryable but kept that promise, so a later dispose()
replayed the same failure even after all work had settled: the checkpoint
store was never closed and lifecycle stayed CLOSING.
The one-shot admission close and the quiescence promise now live in
beginTeardown(); each dispose() races that shared quiescence against a new
deadline, and an expired drain resets so the next call can close the store.
Verified: RED "closes on a later dispose() once work that outlived the
deadline settles" (tests/unit/resumable-upload-runtime-teardown.test.ts)
failed with { ok: false } on the second dispose before the fix and passes
after. Gates: check:architecture, check:types:app, check:types:test, lint,
test:component pass; test:unit passes except removal-fixture.test.ts, which
needs untracked artifacts/release/* absent from a fresh worktree (unrelated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/.generated is gitignored, but no entry point rendered it, so a fresh
checkout failed check:architecture, check:types:app/node/test, unit and
component tests, verify:documentation, dev and build.
- run-vitest renders the index before starting Vitest (all vitest suites)
- package scripts that load src (dev, build, storybook, architecture,
app/node/test type checks, the five fixtures that reach the index,
verify:documentation) render it first; CI runs these scripts by name
- tests/unit/product-index-entrypoints.test.ts guards the wiring
Verified from a fresh state (src/.generated removed before each gate):
architecture, types app/node/test, lint, unit 1781/1781, component 132/132,
verify:documentation, build, dev (HTTP 200), check:ci all pass;
fixture route-runtime still fails with its expected TS2740.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>