Skip to content

chore(scripts): enforce generate/check pairs and regenerate every artifact with bun run generate - #10254

Merged
waleedlatif1 merged 3 commits into
stagingfrom
chore/generator-contract
Nov 20, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
chore/generator-contract

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add check:generators (runs in check:audits): every generate:<x> needs a check:<x>, every check:<x> that runs a generator in check mode needs a generate:<x>, and no test may rewrite a committed artifact behind an UPDATE_* env flag
  • Move the pairing rule into scripts/generators.ts, shared by bun run generate and the audit, so a new pair is picked up by both with nothing to list
  • Close the gaps the audit found: add generate:docs (integration docs, one section per tool, already enforced by check:docs) and generate:schema-mock; drop the duplicate apps/sim generate-docs script
  • bun run generate now covers all 15 repo-local generators in ~10s; when the working tree is exactly the pushed commit, the pre-push hook runs it and stops the push if it rewrites a tracked file (with uncommitted work it defers to CI's check:audits)
  • Point CLAUDE.md, the ship/add-integration/validate-integration/add-tools/add-trigger/db-migrate skills, and the generator fix-it messages at bun run generate / generate:<x>

Type of Change

  • Improvement

Testing

  • bun run check:generators fails on the pre-change scripts (flags check:docs and check:schema-mock with no generator) and passes after
  • scripts/generators.test.ts (7 passed)
  • bun run generate (15 generators, exit 0, no drift); pushed through the new pre-push step
  • check:skills, check:schema-mock, check:sdk-fixture-catalog, check:script-tests, check:guidance-refs, check:comment-hygiene

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 20, 2026 19:46
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 20, 2026 8:01pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with all three previous findings addressed.

Summary

Adds shared generator discovery and an audit for generate/check pairs. Registers docs and schema-mock generation and updates contributor guidance.

  • One root command refreshes all paired generated artifacts.
  • Clean-tree pushes now check generated files before sending.

Reviews (2) · Last reviewed commit: "fix(scripts): order docs before deployme..." · Reviewed by Greptile

Comment thread scripts/generators.ts Resolved
Comment thread package.json Resolved
Comment thread .husky/pre-push Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/generators.ts Resolved
Comment thread apps/sim/package.json Resolved
Comment thread .husky/pre-push Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 24 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 8d8606e into staging Nov 20, 2026
107 of 108 checks passed
@waleedlatif1
waleedlatif1 deleted the chore/generator-contract branch November 20, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant