Skip to content

Conversation

@sdcarter
Copy link
Contributor

ci: add manifest enforcement via pre-commit and CI

Summary

Adds automation to ensure data/manifest.json stays in sync with car data files without creating noise commits in main.

Motivation

Currently, contributors must manually run scripts/generate_manifest.py before committing. If they forget, the manifest becomes stale. Rather than having CI auto-commit changes (which creates extra commits in main), this PR enforces that the manifest is always up-to-date at PR-time.

What's included

  1. Pre-commit hook (.pre-commit-config.yaml)

    • Automatically runs generate_manifest.py on every commit
    • Stages data/manifest.json if it changes
    • Ensures developers who have pre-commit installed never forget to update the manifest
  2. CI check (.github/workflows/manifest-check.yml)

    • Runs on PRs and pushes to main that touch scripts/** or data/**
    • Regenerates the manifest and fails if it differs from the committed version
    • Prevents merging PRs with stale manifests

How it works

  • Local (pre-commit users): Manifest auto-generates and stages on commit
  • CI (everyone): Pipeline fails if manifest is out-of-date, requiring the contributor to regenerate and push an update

This keeps main clean by requiring manifest updates within the PR rather than having CI create follow-up commits.

Testing

  • Added/removed car files trigger manifest regeneration
  • CI check passes when manifest is current, fails when stale
  • Pre-commit hook runs cleanly without modifying unrelated files

@sdcarter sdcarter changed the title Ci/manifest enforcement ci/manifest enforcement Jan 23, 2026
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.

2 participants