Prune the committed spec lock to granted operations + transitive refs #134
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up split from the now-closed lock-pruning sub-item in #106.
The committed spec lock (
<spec>.lock.json) is currently the full ~828KB upstream Swagger dump. It is not the consumer's source, it churns the whole blob on everylock, and its provenance is weak (upstream is unversioned). Prune it to only the granted operations plus their transitively-referenced definitions, so the committed artifact becomes small, reviewable, and semantically the consumer's own contract.Plan
specverb.Prune(spec, guardfile) ([]byte, error): resolve each grant via the expansion table to an operationId,findOpto (path, method), keep only those path/method operation objects, transitively close$ref: #/definitions/X, preserve top-level metadata, emit indented JSON.specdrv.Lock: prune the fetched spec before writing the lock, embedding, and the reference doc.specdrv.Skew: prune the live spec with the same algorithm before diffing, so drift is reported only for operations the consumer actually exposes (ungranted upstream churn is noise).forgejo.swagger.lock.jsonshrinks to the granted slice.Origin objection: ward#62 spec-lock bloat, reasserted by Kai.