Skip to content

test: make local stdio fixture path independent - #390

Merged
mohanagy merged 2 commits into
developmentfrom
fix/383-header-cache-path
Aug 11, 2026
Merged

test: make local stdio fixture path independent#390
mohanagy merged 2 commits into
developmentfrom
fix/383-header-cache-path

Conversation

@mohanagy

@mohanagy mohanagy commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the local-stdio happy-path fixture relative to the checkout
  • assert the happy-path executable argument is not absolute
  • preserve explicit rejection coverage for credential-bearing arguments and ${NAME} environment references
  • leave the production credential guard unchanged

Regression evidence

  • before: the focused suite failed 1 of 44 tests from a worktree path containing header-cache
  • after: npx vitest run tests/preset-catalog.test.ts passed 44 of 44 from the same worktree

Validation

  • npm run lint
  • npm run typecheck
  • npm run test:oauth-console (496 passed, 4 skipped)
  • npm test (1,947 passed, 34 skipped)

Fixes #383

Summary by CodeRabbit

  • Tests
    • Updated preset validation coverage to use a relative executable path.
    • Added verification that absolute executable paths are rejected.
    • Continued validating acknowledgement requirements for configuration.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ef826ab9-ac7e-4c8b-bf06-f851326c9ed4

📥 Commits

Reviewing files that changed from the base of the PR and between e8215f1 and ea0f6cf.

📒 Files selected for processing (1)
  • tests/preset-catalog.test.ts
📝 Walkthrough

Walkthrough

The local stdio preset test now uses a relative fixture path and verifies that the executable argument is not absolute. Existing acknowledgement and rejection checks remain unchanged.

Changes

Local stdio preset test

Layer / File(s) Summary
Validate relative fixture arguments
tests/preset-catalog.test.ts
The test passes a relative fixture path and asserts that the first argument is not absolute.

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

Possibly related PRs

Poem

A rabbit hops past checkout trees,
With relative paths among the leaves.
No absolute trail can cause alarm,
The local fixture stays safe and calm.
Tests now bound with lighter feet.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the local stdio fixture path is independent of the checkout path.
Description check ✅ Passed The description includes the summary, regression evidence, and validation results, but omits the required Security impact section and several checklist items.
Linked Issues check ✅ Passed The change uses a relative fixture argument, adds the non-absolute assertion, preserves negative cases, and leaves the production guard unchanged.
Out of Scope Changes check ✅ Passed The reported change is a focused test update that directly supports issue #383 and adds no unrelated production changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/383-header-cache-path

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/preset-catalog.test.ts`:
- Around line 260-262: Update the assertion around args in the test so the
executable argument is asserted to exist before passing it to isAbsolute; remove
the nullish empty-string coercion while preserving the relative-path
expectation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7c832e7-73f6-4eae-b8f6-6a24ffd7a4d0

📥 Commits

Reviewing files that changed from the base of the PR and between 49f79d0 and e8215f1.

📒 Files selected for processing (1)
  • tests/preset-catalog.test.ts

Comment thread tests/preset-catalog.test.ts Outdated
@mohanagy
mohanagy merged commit 16504c6 into development Aug 11, 2026
12 checks passed
@mohanagy
mohanagy deleted the fix/383-header-cache-path branch August 11, 2026 20:58
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.

[Test] Make the local-stdio preset fixture independent of checkout path

1 participant