Skip to content

feat: add pre-commit hook for automatic diagnostic generation#332

Open
feng83232 wants to merge 1 commit into
lobster-trap:mainfrom
feng83232:precommit-hook
Open

feat: add pre-commit hook for automatic diagnostic generation#332
feng83232 wants to merge 1 commit into
lobster-trap:mainfrom
feng83232:precommit-hook

Conversation

@feng83232

Copy link
Copy Markdown

Closes #89

This PR adds a pre-commit hook that runs diagnostic generation before every commit:

tools/pre-commit — Python hook that:

  1. Runs python3 build.py --module frontend
  2. Detects new/updated diagnostic artifacts via hash comparison
  3. Prints elapsed time and remaining timeout while building
  4. Aborts the commit with a clear error if build fails

Makefile (new) — root-level Makefile with install-hooks target

docs/pre-commit-hook.md (new) — usage and troubleshooting documentation

Install with: make install-hooks

@lobster-trap

Copy link
Copy Markdown
Owner

Diagnostics are still blocking review on this PR.

Please rebase onto the current upstream branch and run the repository build script so the script-generated diagnostic bundle is committed to this PR:

git fetch upstream
git rebase upstream/main
python3 build.py
git push --force-with-lease

Please do not manually create, copy, or edit diagnostic files. python3 build.py automatically generates and commits the fresh encrypted diagnostic artifacts.

A valid PR must include a matching diagnostic/build-*.json and diagnostic/build-*.logd pair in the PR's changed files. The JSON should be generated by build.py, and the .logd file should be the encrypted diagnostic archive generated by the same run.

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.

[$25 BOUNTY] Python Precommit Hook

2 participants