Skip to content

infra_generated_artifact_freshness_gate: CI gate for generated-artifact freshness (types.ts + ui/public/docs) #407

@SoundMindsAI

Description

@SoundMindsAI

Why

Two tracked generated artifacts drift silently between the feature that should regenerate them and the next feature that happens to run the generator, because nothing in CI fails when a committed copy is stale.

  • Problem: ui/src/lib/types.ts (regenerated from the backend OpenAPI via pnpm types:gen) and ui/public/docs/*.md (copied from docs/08_guides/*.md via node scripts/copy-docs.mjs) have no freshness gate. During feat_overnight_autopilot, a routine pnpm types:gen regenerated ~818 lines of types.ts that had accumulated drift from previously-merged features (Solr schemas, the _SourceBreakdown.click UBI bucket), and copy-docs revealed tutorial-first-study.md had never been re-synced after the Solr "Path C" section merged.
  • Outcome: CI fails a PR whose committed types.ts does not match what the live OpenAPI schema would produce, and whose ui/public/docs/* copies do not match their docs/08_guides/* sources. Drift is caught at the PR that introduces it, not laundered into an unrelated later PR's diff.
  • Non-goal: This feature does not auto-commit regenerated artifacts, does not change what the artifacts contain, and does not add any runtime behavior. It is a CI guard plus the minimal tooling needed to run the regeneration deterministically and offline.

Status

  • Stage: PLAN
  • Priority: (see idea file)

Definition of done

Spec defines AC-1: copy-docs gate catches a stale public doc, AC-2: copy-docs gate passes on an up-to-date tree, AC-3: copy-docs gate is reachable on a docs-only PR, AC-4: offline OpenAPI export runs with no live services, AC-5: openapi.json snapshot freshness gate catches a schema change, AC-6: types.ts gate catches drift against the snapshot, AC-7: regeneration is byte-deterministic across runners, AC-8: banner is source-invariant, AC-9: gate catches an untracked generated file, AC-10: Phase 2 one-paste fix command makes the gates green, AC-11: removed/renamed guide is pruned from public docs. Each must pass before merge.

Artifacts

How to execute

The folder has both feature_spec.md and implementation_plan.md — both cross-model reviewed. Ready to ship:

/impl-execute docs/00_overview/planned_features/02_mvp2/infra_generated_artifact_freshness_gate/implementation_plan.md --all

--all runs the full story sequence end-to-end with per-story verification gates, phase-gate cross-model reviews via GPT-5.5, test coverage audit, push, PR creation, CI watch, Gemini Code Assist adjudication, and final cross-model review. The PR is opened but NOT merged — you merge it manually after review.

Notes

This issue is part of the MVP2 backlog issue-coverage sweep (2026-06-02) — every active MVP2 folder should have a tracking issue so external contributors can discover the work without grep-ing the planned-features tree. If you pick this up, drop a comment so others don't duplicate; if you find the linked idea/spec stale, run /idea-preflight first to refresh it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mvp2MVP2 backlog itemready-to-executeHas approved spec + impl plan; ready for /impl-executetype/infraInfra — tooling, CI, deploy

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions