Skip to content

fix(kernel): unblock npm test on the default branch - #584

Merged
bompus merged 1 commit into
fork/consolidatedfrom
fix/default-branch-gates
Oct 29, 2026
Merged

bompus merged 1 commit into
fork/consolidatedfrom
fix/default-branch-gates

Conversation

@bompus

@bompus bompus commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

`npm test` runs again on `fork/consolidated`: its first step, `check:kernel-rules`, was failing, so no test ran at all.

  • `pascal_scope.rs`: five `Regex::new(&format!(..))` sites built a regex from a runtime string on every call, which the kernel rule forbids. They now go through the shared `cached_regex`.
  • `index-recovery-off-thread.test.ts`: the list of indexes dropped for a bulk load named `idx_edges_synthesis_site`. That index was removed in fef3776 and nothing creates it, so the test's 8 window-index cases could never pass; the name is removed from the list.

Checks (head of this branch): `npm run check:kernel-rules` exit 0; `cargo check --release` exit 0; `index-recovery-off-thread` plus the 8 Pascal test files: 92 passed, 0 failed.

Not covered: the other default-branch test failures (explore ordering, Java records, JS receiver, Pascal function-ref, UI), which are separate. README rows checked: none affected.

Summary by CodeRabbit

  • Bug Fixes

    • Improved stability when resolving Pascal declarations by handling pattern-matching errors without an abrupt failure.
  • Tests

    • Updated recovery checks to match the current set of resolution-window indexes.

… drop the removed synthesis-site index from the recovery test

check:kernel-rules rejects Regex::new built from a runtime string, which stopped npm test before any test ran; five Pascal scope sites now use cached_regex. index-recovery-off-thread listed idx_edges_synthesis_site, which fef3776 removed and nothing recreates, so its 8 window-index tests could not pass.
@bompus

bompus commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 43e5684 and 4db84e6.

Files selected for processing: 2
  • __tests__/index-recovery-off-thread.test.ts
  • codegraph-kernel/src/resolve/pascal_scope.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The PR changes dynamic regex construction in Pascal scope checks to use cached_regex and removes idx_edges_synthesis_site from the recovery test’s expected resolution-window indexes.

Changes: Pascal scope regex construction

Layer / File(s) Summary
Cache Pascal scope patterns
codegraph-kernel/src/resolve/pascal_scope.rs
pascal_declared_in_routine and pascal_declared_type_text use cached_regex for dynamic patterns and propagate errors instead of unwrapping them.

Recovery index expectations

Layer / File(s) Summary
Update recovery index expectations
__tests__/index-recovery-off-thread.test.ts
WINDOW_INDEXES no longer includes idx_edges_synthesis_site.

Possibly related PRs

  • bompus/codegraph#583: Adds a fixture that rejects runtime Regex::new patterns; this PR updates the matching constructions in pascal_scope.rs to use cached_regex.

Priority: Normal

Merge Risk: Minimal · up to 4db84

No actionable merge-blocking risk is established for these narrowly scoped changes. Merge after normal checks pass.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(kernel): unblock npm test on the default branch" matches the main change. The PR removes a runtime-built regex pattern in pascal_scope.rs by routing it through cached_regex, and it remo…
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.
Suppressions Explained Passed PASS. The pull request changes only regex construction and removes one index name from a test list. No changed line adds or broadens a lint, type-check, or compiler suppression directive.
User-Visible Changes Documented Passed PASS: The pull request changes only internal Pascal regex construction and a test fixture's index list. The diff adds, removes, or renames no CLI command or flag, MCP tool argument, supported language…
Full details: Title check

Explanation

The title "fix(kernel): unblock npm test on the default branch" matches the main change. The PR removes a runtime-built regex pattern in pascal_scope.rs by routing it through cached_regex, and it removes idx_edges_synthesis_site from the recovery test's index list. The title names the kernel scope and the goal (unblocking npm test), but it does not name the specific fixes. It is a fair summary of the PR objectives, which state that the changes address two causes that block tests on fork/consolidated.

Full details: User-Visible Changes Documented

Explanation

PASS: The pull request changes only internal Pascal regex construction and a test fixture's index list. The diff adds, removes, or renames no CLI command or flag, MCP tool argument, supported language or framework, agent target, or config key. No README.md or site documentation update is required.

Finishing Touches: 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@bompus
bompus merged commit 9888e4a into fork/consolidated Oct 29, 2026
6 of 7 checks passed
@bompus
bompus deleted the fix/default-branch-gates branch October 29, 2026 19:49
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