feat(specgen): decode gzip vendored source specs #254

Closed
opened 2026-07-24 01:31:10 +00:00 by coilyco-ops · 0 comments
Member

Problem

Specgen can encode generated API locks, but a vendored source named by spec must still be committed as plain JSON. Consumers that deliberately vendor a large API contract therefore retain the raw source even after migrating the generated lock to gzip.

Change

  • Accept .json.gz, .yaml.gz, and .yml.gz vendored spec paths.
  • Decode gzip before parsing, pruning, hashing, and lock generation.
  • Keep plain vendored source specs compatible.
  • Preserve the existing generated lock name when only the source encoding suffix changes.
  • Reject invalid or oversized gzip input without silently falling back to the network.

Acceptance

  • A gzip vendored spec produces the same logical lock as its plain form.
  • Repeated gzip source reads are deterministic and bounded.
  • Invalid gzip returns a contextual error.
  • .json.gz naming derives the same .lock.json.gz artifact as .json.
  • Tests and repository validation pass.

Downstream consumer: agentic-os aguard source.

## Problem Specgen can encode generated API locks, but a vendored source named by `spec` must still be committed as plain JSON. Consumers that deliberately vendor a large API contract therefore retain the raw source even after migrating the generated lock to gzip. ## Change * Accept `.json.gz`, `.yaml.gz`, and `.yml.gz` vendored spec paths. * Decode gzip before parsing, pruning, hashing, and lock generation. * Keep plain vendored source specs compatible. * Preserve the existing generated lock name when only the source encoding suffix changes. * Reject invalid or oversized gzip input without silently falling back to the network. ## Acceptance * A gzip vendored spec produces the same logical lock as its plain form. * Repeated gzip source reads are deterministic and bounded. * Invalid gzip returns a contextual error. * `.json.gz` naming derives the same `.lock.json.gz` artifact as `.json`. * Tests and repository validation pass. Downstream consumer: agentic-os aguard source.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/umbra#254
No description provided.