Skip to content

Land real fixes from PR #153 (infra/rig-audit-fixes) - #155

Merged
snorreks merged 1 commit into
mainfrom
chore/land-pr-153-infra-fixes
Aug 16, 2026
Merged

snorreks merged 1 commit into
mainfrom
chore/land-pr-153-infra-fixes

Conversation

@snorreks

Copy link
Copy Markdown
Contributor

Summary

PR #153 (infra/rig-audit-fixes) predates C-401's dialogue-streaming rewrite already on main, so merging it as-is would revert that work — that's why GitHub flags it CONFLICTING. This PR cherry-picks only the genuinely new, non-conflicting fixes from that branch, verified file-by-file against current main.

Landed:

  • infra_report: stamp events with runId, filter reads by it — a review prompt no longer surfaces infra issues from unrelated past runs
  • herdr/worktree: assertManagedWorktreeTarget guards the rmSync fallback from ever deleting the repo root or a non-worktree dir
  • git_worktree: stagedPaths failure now aborts the commit instead of silently assuming nothing was staged
  • contract_pipeline: launcher pane-run failure surfaces real herdr stderr instead of polling out the full 180s timeout
  • Windows path-separator fixes: hub/svelte.config.js (SvelteKit tsconfig alias generator), asset_manifest_node.ts (asset category matching)
  • macro_simulation.test.ts: fixed cross-test entity-id collisions from un-truncated module-level state
  • development_ports: NORDCLAW_RESERVED_RANGES/EPHEMERAL_PORT_START guardrail constants
  • chrome_devtools.ts: inObject.hasOwn (was matching prototype-chain keys)
  • Discord: guild+role allow-list + rate limiting on issue-creation before any GitHub call, webhook PATCH abort timeout, category-reference validation in the sync planner, parent_id: null fix (was dropped from JSON as undefined), managed roles excluded from generated sync plans
  • Misc test fixes: session.test.ts, infra_report.test.ts, exec_boundary.test.ts

Explicitly excluded: anything under apps/e2e or dialogue-related frontend files (stale vs. C-401, main is ahead there), cosmetic-only diffs, and the spatial_grid.test.ts import reorder (C-402's own in-flight change carries that).

Test plan

  • moon run :typecheck --affected — 32/32 projects pass
  • bun test on all touched suites (scripts, constants, frontend-engine) — 157/157 pass
  • biome check on all changed files — clean

🤖 Generated with Claude Code

PR #153 predates C-401's dialogue-streaming rewrite already on main, so a
literal merge would revert that work — GitHub correctly flags it as
conflicting. This cherry-picks only the genuinely new, non-conflicting
fixes from that branch:

- infra_report: stamp events with runId and filter by it, so a review
  prompt only surfaces infra issues that actually happened during that
  run (previously any historical issue from any past run leaked in)
- herdr/worktree: assertManagedWorktreeTarget guards the rmSync fallback
  from deleting the repo root or a non-worktree dir; realpath + Windows
  case-insensitive same-path check
- git_worktree: stagedPaths no longer swallows a failed protection check
  into an empty array (was silently assuming nothing was staged)
- contract_pipeline: launcher pane-run failure surfaces real herdr
  stderr instead of polling out the full 180s timeout
- hub/svelte.config.js + asset_manifest_node.ts: Windows backslash vs
  forward-slash path bugs (SvelteKit tsconfig alias generator, asset
  category matching)
- macro_simulation.test.ts: module-level SoA arrays weren't truncated
  between tests, causing entity-id collisions across test files
- development_ports: NORDCLAW_RESERVED_RANGES/EPHEMERAL_PORT_START
  guardrail constants, machine-checked by the port-collision test
- chrome_devtools.ts: `in` operator on OFFSETTABLE_PORTS matched
  prototype-chain keys like "constructor" — swapped for Object.hasOwn
- discord: guild+role allow-list gate and per-user rate limiting on
  issue-creation modal submissions before any GitHub call; abort timeout
  on the webhook PATCH; category-reference validation in the sync planner
  (a typo used to silently move a channel to top level); parent_id: null
  instead of undefined so top-level moves aren't dropped from the JSON
  payload; managed (bot/integration) roles excluded from generated sync
  plans since Discord forbids editing them
- session.test.ts / infra_report.test.ts / exec_boundary.test.ts: test
  fixes (assertion actually exercises the intended branch; "corrupted"
  fixture was actually valid JSON; lint-rule-compliant escaping)

Explicitly NOT included: anything under apps/e2e or the dialogue-related
frontend files (stale relative to C-401, main is ahead), cosmetic-only
diffs (trailing newlines, import reordering), and the spatial_grid.test.ts
import reorder (C-402's own in-flight change will carry that).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@snorreks, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d68ab95-390f-4ead-b42e-debeabbad1bf

📥 Commits

Reviewing files that changed from the base of the PR and between d0d4dd9 and 1afa9b6.

📒 Files selected for processing (28)
  • .pi/.gitignore
  • .pi/extensions/chrome_devtools.ts
  • apps/backend/firebase/.env.example
  • apps/backend/firebase/src/controllers/api/discord_interactions.ts
  • apps/backend/firebase/src/lib/discord/rate_limit.ts
  • apps/backend/firebase/src/lib/discord/respond.ts
  • apps/backend/firebase/src/lib/discord/types.ts
  • apps/frontend/hub/svelte.config.js
  • packages/backend/configs/src/lib/environment.ts
  • packages/frontend/engine/src/__tests__/asset_manifest.test.ts
  • packages/frontend/engine/src/__tests__/macro_simulation.test.ts
  • packages/frontend/engine/src/assets/asset_manifest_node.ts
  • packages/shared/constants/src/lib/development_ports.test.ts
  • packages/shared/constants/src/lib/development_ports.ts
  • scripts/src/lib/agents/contract_pipeline.ts
  • scripts/src/lib/agents/contract_pipeline/orchestrator.ts
  • scripts/src/lib/agents/git_worktree.ts
  • scripts/src/lib/discord/audit.ts
  • scripts/src/lib/discord/diff.test.ts
  • scripts/src/lib/discord/diff.ts
  • scripts/src/lib/discord/sync.ts
  • scripts/src/lib/discord/types.ts
  • scripts/src/lib/env/exec_boundary.test.ts
  • scripts/src/lib/herdr/session.test.ts
  • scripts/src/lib/herdr/worktree.ts
  • scripts/src/lib/local_setup/index.ts
  • scripts/src/lib/ops/infra_report.test.ts
  • scripts/src/lib/ops/infra_report.ts

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.

@snorreks
snorreks merged commit 2c3f9b1 into main Aug 16, 2026
2 checks passed
@snorreks
snorreks deleted the chore/land-pr-153-infra-fixes branch August 16, 2026 22:25
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