Skip to content

test: add pre-push gate regression coverage#67

Open
flyingrobots wants to merge 3 commits intomainfrom
feature/b168-pre-push-gate-regression
Open

test: add pre-push gate regression coverage#67
flyingrobots wants to merge 3 commits intomainfrom
feature/b168-pre-push-gate-regression

Conversation

@flyingrobots
Copy link
Member

@flyingrobots flyingrobots commented Mar 13, 2026

Summary

  • add focused regression coverage for scripts/hooks/pre-push so the checked-in hook header, quick-mode messaging, and Gate 1-8 failure labels cannot drift silently
  • add an explicit Gate 8 failure label so unit-test failures report with the same gate semantics as the static gates
  • reconcile ROADMAP.md, docs/ROADMAP/COMPLETED.md, and CHANGELOG.md so B168 moves from active to done in the same slice

Test plan

  • npx vitest run test/unit/scripts/pre-push-hook.test.js
  • npx markdownlint ROADMAP.md CHANGELOG.md docs/ROADMAP/COMPLETED.md
  • git push -u origin feature/b168-pre-push-gate-regression (full IRONCLAD pre-push firewall; 283 files / 4989 tests)

Summary by CodeRabbit

  • Tests

    • Added comprehensive regression test suite for pre-push hook validation, covering quick mode, normal mode, and all gate failure scenarios.
  • Chores

    • Improved pre-push hook to explicitly report and block pushes when unit tests fail.
  • Documentation

    • Updated roadmap to reflect current task status.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aeedd03f-ec15-4383-93f3-fa663228908b

📥 Commits

Reviewing files that changed from the base of the PR and between 2be5841 and 9d417f1.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • ROADMAP.md
  • test/unit/scripts/pre-push-hook.test.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/unit/scripts/pre-push-hook.test.js
  • ROADMAP.md

📝 Walkthrough

Walkthrough

This PR adds a comprehensive Vitest-based regression test suite for the pre-push hook that exercises the hook with stubbed commands, verifies gate failure scenarios (Gates 1–8), and confirms quick mode skips Gate 8. The hook now explicitly reports test failures. Documentation is updated to reflect these changes.

Changes

Cohort / File(s) Summary
Documentation Updates
CHANGELOG.md, ROADMAP.md
Updated changelog entry for pre-push hook regression harness; adjusted roadmap wording for B168 regression-coverage task and status timeline.
Pre-push Hook Implementation & Tests
scripts/hooks/pre-push, test/unit/scripts/pre-push-hook.test.js
Added error handling to report test failures with BLOCKED message and exit code 1; created comprehensive regression test suite covering header alignment, quick mode gate skipping, normal mode execution, and failure scenarios for all eight gates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 hop skip jump Eight gates now tested with care,
Quick mode leaps past Gate 8's snare,
Failures caught and blocked with flair,
Regression harness hops so true,
Pre-push hooks held to standards new! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding regression coverage for the pre-push gate functionality.
Description check ✅ Passed The description covers the summary and test plan as required by the template, though ADR checks section is missing.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/b168-pre-push-gate-regression
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Release Preflight

  • package version: 14.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v14.0.0, release workflow will publish.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ROADMAP.md`:
- Line 4: The ROADMAP has inconsistent active-item counts: the header line
containing "**Last reconciled:** ... 25 active standalone items" must be
reconciled with the later sentence that currently reads "32 active items";
locate the paragraph containing the "32 active items" phrase (search for "active
items" or that exact text) and update it to match the reconciled count (change
"32" to "25" or otherwise adjust the number to the true current count), then
scan the document for any other occurrences of "active items" or "active
standalone items" and make all counts consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9aeb944-9867-4ab2-a2c5-70fba61c2e2f

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc3fbb and 2be5841.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • ROADMAP.md
  • docs/ROADMAP/COMPLETED.md
  • scripts/hooks/pre-push
  • test/unit/scripts/pre-push-hook.test.js

@flyingrobots
Copy link
Member Author

@coderabbitai review please 🥕

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

@flyingrobots Sure, kicking off the review now! 🥕

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions
Copy link

Release Preflight

  • package version: 14.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v14.0.0, release workflow will publish.

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