Skip to content

test: cover populated system prompt guidance - #177

Merged
404-Page-Found merged 1 commit into
404-PF:mainfrom
Peter7896:peter7896/build-system-prompt-profile-tests
Jul 4, 2026
Merged

test: cover populated system prompt guidance#177
404-Page-Found merged 1 commit into
404-PF:mainfrom
Peter7896:peter7896/build-system-prompt-profile-tests

Conversation

@Peter7896

@Peter7896 Peter7896 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Closes #146.

This adds a populated buildSystemPrompt profile case so the style guidance branches are covered for:

  • imperative mood guidance
  • sentence-case guidance
  • common prefix guidance and multi-prefix listing
  • scope usage guidance
  • body paragraph guidance

Validation:

  • npm.cmd run build
  • node --test tests\build-system-prompt.test.mjs
  • npx.cmd prettier --check tests\build-system-prompt.test.mjs
  • git diff --check

Summary by CodeRabbit

  • Tests
    • Updated the prompt-generation test suite for clearer validation of fallback behavior.
    • Added coverage for richer commit-history signals, checking that generated guidance includes formatting and writing conventions such as line length, imperative tone, capitalization, prefixes, scoped/multi-line structure, and descriptive body context.

@Peter7896
Peter7896 requested a review from 404-Page-Found as a code owner July 3, 2026 16:42
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5fbbcd22-570e-4796-90b6-902daac34722

📥 Commits

Reviewing files that changed from the base of the PR and between 50eebed and 94cd776.

📒 Files selected for processing (1)
  • tests/build-system-prompt.test.mjs
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
{src/**/*.ts,tests/**/*.mjs,tests/e2e/**/*.mjs}

📄 CodeRabbit inference engine (AGENTS.md)

Keep code formatted with the project Prettier rules: single quotes, trailing commas, 2-space indentation, and 120-character print width.

Files:

  • tests/build-system-prompt.test.mjs
{tests/**/*.mjs,tests/e2e/**/*.mjs}

📄 CodeRabbit inference engine (AGENTS.md)

Write tests with Node.js built-in node:test and node:assert/strict rather than Jest or Mocha.

Files:

  • tests/build-system-prompt.test.mjs
tests/**/*.mjs

📄 CodeRabbit inference engine (AGENTS.md)

Tests may skip on Windows when platform-specific mock logic is required.

Files:

  • tests/build-system-prompt.test.mjs
🔇 Additional comments (2)
tests/build-system-prompt.test.mjs (2)

18-19: LGTM!


21-39: LGTM! Assertions correctly correspond to the buildStyleGuidance branch logic in dist/llm/prompt.js (prefix rate ≥30%, multi-prefix listing, scope/body thresholds), and the test satisfies the coverage goals from issue #146.


📝 Walkthrough

Walkthrough

This PR modifies a test file to reformat an existing assertion into a single line and adds a new test case validating that buildSystemPrompt generates guidance covering line-length, imperative mood, capitalization, prefixes, scoping, and body formatting for non-empty commit history.

Changes

Style Guidance Test Coverage

Layer / File(s) Summary
Assertion reformat and new coverage test
tests/build-system-prompt.test.mjs
The fallback empty-history assertion is condensed to a single line, and a new test verifies buildSystemPrompt produces guidance strings for line length, imperative mood, capitalization, common prefixes, scope/body formatting when given strong commit-history signals.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: 404-Page-Found

Poem

A rabbit hops through lines of test,
Checking prompts with earnest zest,
One line trimmed, one test brand new,
Guidance strings all ring true! 🐇
Thump-thump-thump, the suite's complete,
Commit history, now hard to beat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the added test coverage for populated system prompt guidance.
Linked Issues check ✅ Passed The new test covers the non-empty style profile branches requested in #146, including mood, case, prefix, scope, and body guidance.
Out of Scope Changes check ✅ Passed The changes stay within the requested test coverage work and do not introduce unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@404-Page-Found

Copy link
Copy Markdown
Contributor

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@404-Page-Found 404-Page-Found 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.

LGTM

@404-Page-Found
404-Page-Found merged commit 67f5e54 into 404-PF:main Jul 4, 2026
1 check passed
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.

Add test for buildSystemPrompt with non-empty style profile

2 participants