You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(spec): refresh the gen:openapi exemption why with the #5757 measurement (#6949)
The exemption said a stale OpenAPI artifact "fails nothing". True, but an
understatement: #5757's measurement round found staleness is structurally
unreachable on every canonical path, not merely unpunished. Record the two
measured facts so the next reader does not re-file the gate card.
No logic change: one `why` string plus the comment above it.
Claude-Session: https://claude.ai/code/session_01AZgRyPVwi1jLb1mNNuUQ9o
Co-authored-by: Claude <noreply@anthropic.com>
// #5744 that names a reconciliation with no second party: the document
239
239
// carries no route section at all — built-in routes are produced at serve
240
240
// time by the package that mounts them (#5588 ruling C, #5078, ADR-0076), so
241
-
// there is nothing here to compare against a route table. What IS still
242
-
// ungated is staleness against `src/api`: nothing fails when a contract
243
-
// schema changes and the artifact is not regenerated. Coherence is covered
244
-
// (the generator self-checks before writing, #5168) — currency is not.
241
+
// there is nothing here to compare against a route table. Coherence is
242
+
// covered (the generator self-checks before writing, #5168); currency this
243
+
// aggregate still does not verify. #5757 measured what that omission costs
244
+
// and the answer was nothing — staleness here is unreachable, not merely
245
+
// unpunished — so "add a gate" was ruled not planned. The `why` carries the
246
+
// measurement so the next reader does not re-file it.
245
247
{
246
248
gen: 'gen:openapi',
247
-
why: 'the OpenAPI document is generated but nothing compares its components.schemas against src/api — a stale artifact fails nothing (it IS self-checked for coherence at write time, #5168, and since #5744 it describes no routes to reconcile)',
249
+
why:
250
+
'nothing here compares the document\'s components.schemas against src/api — but per the #5757 '+
251
+
'measurement a stale artifact is not merely unpunished, it is unreachable on every canonical path. '+
252
+
'Staleness cannot outlive one build of this package: `json-schema/**` is a turbo build OUTPUT and is '+
253
+
'gitignored, so it is never a task input; `build` declares no `inputs`, so it hashes every git-tracked '+
254
+
'file in the package; and everything this generator reads sits in there (the `src/**` closure reached '+
255
+
'through `src/api`, these scripts, the manifest). That input surface is a SUBSET of the build task\'s, '+
256
+
'so any edit able to make the artifact stale is exactly the edit that busts the cache — and `build` '+
257
+
'runs the generator unconditionally (`gen:schema && gen:openapi && tsup`). Deleting the artifact does '+
258
+
'not even bust the cache: the next build restores it byte-identically (measured, FULL TURBO). What a '+
259
+
'stale copy could mislead is bounded too — the served document holds 0 $refs into components.schemas, '+
260
+
'leaving the nine contract schemas an unreferenced island (#6797). It IS self-checked for coherence at '+
261
+
'write time (#5168), and since #5744 it describes no routes to reconcile. Gating it would also be '+
262
+
'dormant: CI runs this aggregate only as `--reconcile-only` (lint.yml), and a full run sits after '+
263
+
'`pnpm build` — green by construction, the #4177/#4232 class.',
248
264
},
249
265
{gen: 'gen:sbom',why: 'the SBOM is a release artifact, regenerated at publish time rather than checked in'},
0 commit comments