Skip to content

Quarantine retired main-entry fixtures - #287

Merged
TraderSamwise merged 3 commits into
masterfrom
chore/core-sidecar-next-11
Jul 4, 2026
Merged

Quarantine retired main-entry fixtures#287
TraderSamwise merged 3 commits into
masterfrom
chore/core-sidecar-next-11

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • update generic daemon/project/tmux fixtures to use the launcher-bin entrypoint instead of the retired main entrypoint
  • keep dist/main.js only in explicit stale/legacy process fixtures and the repair recognizer
  • add an inventory guardrail for retired main-entry launch identity drift

Verification

  • yarn vitest run src/one-shot-node-inventory.test.ts src/process-args.test.ts src/project-takeover.test.ts src/daemon.test.ts src/tmux/runtime-manager.test.ts
  • yarn typecheck
  • yarn lint
  • yarn vitest run
  • yarn build
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Updated command handling expectations to match the current launcher path, reducing mismatches in service, takeover, and dashboard workflows.
    • Improved checks around legacy command references so outdated paths are caught and kept from slipping into active use.
  • Tests

    • Expanded test coverage for command parsing, process detection, and tmux respawn behavior.
    • Added inventory checks to ensure retired entrypoints remain limited to approved locations.

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 4, 2026 4:21am

@coderabbitai

coderabbitai Bot commented Jul 4, 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: 43 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: f3eda162-ff03-49ba-8c6c-41204c1d8da9

📥 Commits

Reviewing files that changed from the base of the PR and between ff451be and 15b5dd3.

📒 Files selected for processing (2)
  • src/daemon.test.ts
  • src/one-shot-node-inventory.test.ts
📝 Walkthrough

Walkthrough

Test fixtures across daemon, project-takeover, process-args, and tmux runtime-manager tests are updated to reference dist/launcher-bin.js instead of the retired dist/main.js entrypoint, using new helper functions. A new inventory test enforces an allowlist quarantining remaining references to the retired entrypoint string.

Changes

launcher-bin.js migration in tests

Layer / File(s) Summary
Daemon test mocks
src/daemon.test.ts
Adds currentProjectServiceArgs(root) helper and updates multiple execFileSyncMock return values/implementations to use launcher-bin.js-based command strings, including "-old" legacy variants.
Project-takeover test mocks
src/project-takeover.test.ts
Adds a local currentProjectServiceArgs helper and updates mocked execFileSync return values in default and prefix-matching PID-staleness tests to use launcher-bin.js-based strings.
Process-args and tmux respawn fixtures
src/process-args.test.ts, src/tmux/runtime-manager.test.ts
Updates command string fixtures to reference launcher-bin.js instead of main.js for flag-matching and tmux dashboard respawn tests.
Retired entrypoint quarantine test
src/one-shot-node-inventory.test.ts
Adds constants and an allowlist for the retired main.js entrypoint string, extends listSourceFiles with an includeTests option, updates skip logic, and adds a test asserting only allowlisted files reference the retired entrypoint.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • TraderSamwise/aimux#272: Directly related to the core actor migration removing the standalone internal entrypoint that these test updates align to.
  • TraderSamwise/aimux#277: Realigns daemon/tmux dashboard launch command expectations from dist/main.js to dist/launcher-bin.js, same as this PR.
🚥 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 captures the main change: quarantining retired main-entry fixtures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/core-sidecar-next-11

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.

🧹 Nitpick comments (2)
src/daemon.test.ts (1)

153-158: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated helper diverges from project-takeover.test.ts's version.

This currentProjectServiceArgs derives --project-id via proj-${basename(root)}, while the same-named helper in src/project-takeover.test.ts (lines 23-28) derives it via getProjectIdFor(projectRoot). Both mirror the retired main.jslauncher-bin.js migration but with different project-id logic under an identical function name — confusing for future maintainers scanning across files. Consider consolidating into a shared test-utils helper if both derivations are meant to represent the same production identity contract.

🤖 Prompt for 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.

In `@src/daemon.test.ts` around lines 153 - 158, The duplicated
currentProjectServiceArgs helper in daemon.test.ts is diverging from the
same-named helper in project-takeover.test.ts because it builds --project-id
differently. Update the daemon.test.ts helper to use the same project identity
logic as getProjectIdFor(projectRoot) (or extract both uses into a shared
test-utils helper) so the launcher-bin.js arguments stay consistent across tests
and the identity contract is defined in one place.
src/one-shot-node-inventory.test.ts (1)

13-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Undocumented self-avoidance trick is fragile.

Splitting "dist/" + "main.js" avoids this test file itself matching retiredMainEntrypoint (since this file isn't in allowedRetiredMainEntrypointFiles). Without a comment, a future reformatting/refactor could collapse this into a literal string and silently break the guardrail (the test would then fail against itself, or worse, someone "fixes" it by adding this file to the allowlist, weakening the check).

💬 Suggested clarifying comment
 const skippedDeclarationFiles = [/\.d\.ts$/];
-const retiredMainEntrypoint = "dist/" + "main.js";
+// Built via concatenation so this file's own source text doesn't match the
+// literal string below, avoiding the need to allowlist this test itself.
+const retiredMainEntrypoint = "dist/" + "main.js";
🤖 Prompt for 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.

In `@src/one-shot-node-inventory.test.ts` around lines 13 - 14, The
`retiredMainEntrypoint` self-avoidance trick in
`src/one-shot-node-inventory.test.ts` is fragile because the split string can be
collapsed by a future refactor and break the guardrail. Add a brief clarifying
comment near `retiredMainEntrypoint` explaining that `"dist/" + "main.js"` is
intentionally split so this test file does not match its own retired-entrypoint
check, and keep the existing
`skippedDeclarationFiles`/`allowedRetiredMainEntrypointFiles` logic unchanged.
🤖 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.

Nitpick comments:
In `@src/daemon.test.ts`:
- Around line 153-158: The duplicated currentProjectServiceArgs helper in
daemon.test.ts is diverging from the same-named helper in
project-takeover.test.ts because it builds --project-id differently. Update the
daemon.test.ts helper to use the same project identity logic as
getProjectIdFor(projectRoot) (or extract both uses into a shared test-utils
helper) so the launcher-bin.js arguments stay consistent across tests and the
identity contract is defined in one place.

In `@src/one-shot-node-inventory.test.ts`:
- Around line 13-14: The `retiredMainEntrypoint` self-avoidance trick in
`src/one-shot-node-inventory.test.ts` is fragile because the split string can be
collapsed by a future refactor and break the guardrail. Add a brief clarifying
comment near `retiredMainEntrypoint` explaining that `"dist/" + "main.js"` is
intentionally split so this test file does not match its own retired-entrypoint
check, and keep the existing
`skippedDeclarationFiles`/`allowedRetiredMainEntrypointFiles` logic unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9490aad4-d78a-4f42-a2b6-15b17462bda4

📥 Commits

Reviewing files that changed from the base of the PR and between e7eebef and ff451be.

📒 Files selected for processing (5)
  • src/daemon.test.ts
  • src/one-shot-node-inventory.test.ts
  • src/process-args.test.ts
  • src/project-takeover.test.ts
  • src/tmux/runtime-manager.test.ts

@TraderSamwise

Copy link
Copy Markdown
Owner Author

Independent review finding fixed in 1bef118: the retired main-entry inventory guard is now occurrence-based, catches both slash-path and path-join forms, and only allows the specific legacy/repair/artifact occurrences instead of allowlisting whole files.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

CodeRabbit summary notes fixed in 15b5dd3: daemon test fixtures now use the same getProjectIdFor path as project-takeover, and the retired-entrypoint scan has an explicit comment explaining the split string.

@TraderSamwise
TraderSamwise merged commit a553502 into master Jul 4, 2026
3 checks 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.

1 participant