Skip to content

Keep stress-test figures local; enforce via gitignore and git hooks - #31

Merged
zhemingfan merged 2 commits into
mainfrom
chore/enforce-no-stress-figures
Jul 2, 2026
Merged

Keep stress-test figures local; enforce via gitignore and git hooks#31
zhemingfan merged 2 commits into
mainfrom
chore/enforce-no-stress-figures

Conversation

@zhemingfan

Copy link
Copy Markdown
Owner

Summary

Stress-test figures and generated data under test/stress/ must stay local and never reach this public repo. Enforced at three layers:

  • .gitignore — ignores test/stress/figures/, test/stress/results/, and image files under test/stress/.
  • scripts/pre-commit (new) — refuses to commit image files staged under test/stress/, even if force-added.
  • scripts/pre-push — refuses to push if any image files are tracked under test/stress/.

Also untracks the pre-existing test/stress/stress_test_results.png (the file stays on disk locally). Hooks run via the repo's core.hooksPath=scripts (set by npm postinstall).

Note: stress_test_results.png remains in earlier git history (already public); this removes it from the current tree only.

Figures and generated results under test/stress/ must not be committed to this
public repo. Adds .gitignore rules for test/stress figures/results, a pre-commit
hook that refuses to stage image files under test/stress/, and a pre-push guard
that refuses to push if any are tracked. Also untracks the existing
stress_test_results.png (the file stays local).

Hooks run via core.hooksPath=scripts (set by npm postinstall).
Server-side complement to the local hooks: CI fails if any image file is tracked
under test/stress, so figures cannot land on main even if a local hook is
bypassed or not configured.
@zhemingfan
zhemingfan merged commit 60dd0a9 into main Jul 2, 2026
3 checks passed
@zhemingfan
zhemingfan deleted the chore/enforce-no-stress-figures branch July 2, 2026 17:05
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