ci(registry): enforce generated registry freshness in fork#12
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR wires
Confidence Score: 5/5Safe to merge — no runtime changes, only tightens existing quality gates. Both changes are minimal, additive-only, and follow established patterns in the codebase. The underlying No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Hook as .husky/pre-push
participant CI as GitHub Actions (typecheck)
participant Script as registry:check
participant Gen as generate-dataset-registry.ts
participant Git as git diff --exit-code
Dev->>Hook: git push
Hook->>Hook: npm run typecheck
Hook->>Hook: npm run typecheck:api
Hook->>Script: npm run registry:check
Script->>Gen: npx tsx generate-dataset-registry.ts
Gen-->>Script: writes generated artifacts
Script->>Git: diff api/_generated/ server/_shared/_generated/
alt artifacts up-to-date
Git-->>Script: exit 0
Script-->>Hook: pass
Hook->>Hook: CJS / Unicode / boundary checks...
Hook-->>Dev: push allowed
else artifacts stale
Git-->>Script: exit 1
Script-->>Hook: artifacts out of date
Hook-->>Dev: push blocked
end
CI->>CI: npm ci
CI->>CI: npm run typecheck
CI->>CI: npm run typecheck:api
CI->>Script: npm run registry:check
Script->>Gen: npx tsx generate-dataset-registry.ts
Gen-->>Script: writes generated artifacts
Script->>Git: diff api/_generated/ server/_shared/_generated/
alt fresh
Git-->>CI: pass
else stale
Git-->>CI: fail (PR blocked)
end
Reviews (1): Last reviewed commit: "ci(registry): enforce generated registry..." | Re-trigger Greptile |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Run registry:check in the existing pre-push hook and typecheck workflow so generated bootstrap and health artifacts cannot drift from the registry source. Validation: npm run registry:check
50e795e to
9c37cfe
Compare
2b801fc to
141a159
Compare
|
PR author is not in the allowed authors list. |
1 similar comment
|
PR author is not in the allowed authors list. |
Summary
This wires dataset registry freshness into the existing local and CI quality gates so generated artifacts cannot drift after the bootstrap and health migrations land.
Root cause
The registry generator only helps if the generated outputs are treated as read-only artifacts. Without an explicit freshness gate, hand edits or stale generated files can silently diverge from
registry/datasets.ts.Changes
npm run registry:checkin.husky/pre-pushaftertypecheck:apinpm run registry:checkin.github/workflows/typecheck.ymlValidation
npm run registry:checkRisk
Low. This only tightens existing quality gates and does not affect runtime behavior.
Refs #5
Depends on #11