Skip to content

fix(kernel): cache the Python unpacked-bases regex - #606

Merged
bompus merged 1 commit into
fork/consolidatedfrom
fix/kernel-rule-cached-regex
Oct 31, 2026
Merged

bompus merged 1 commit into
fork/consolidatedfrom
fix/kernel-rule-cached-regex

Conversation

@bompus

@bompus bompus commented Oct 31, 2026

Copy link
Copy Markdown
Owner

What changed

  • member_fn_ref.rs:1082 (python_unpacked_bases) compiled a name-parameterized regex on every class header, tripping the kernel-no-adhoc-name-regex rule that feat(kernel): port the remaining upstream resolution drift #587 added. The variable name is the only part that varies, so the pattern now goes through KernelResolver::cached_regex and compiles each shape once.
  • No behavior change: the same pattern and match logic, only the compilation is shared.

Why

check:kernel-rules is red at 0d4c48dc/73bac2e9, which fails npm test's pretest for every checkout. This clears it.

The four gitignore-pattern-parity failures were a separate, local-only issue: the installed ignore was 7.0.5 while package.json/package-lock.json pin ^7.0.14. npm ci resolves all four; no repository change.

Tests

  • npm run check:kernel-rules: 3/3 pass; the scan is clean.
  • python-self-call-not-import (includes the "method behind unpacked bases" case): 63/63.
  • kernel-golden-dumps: 8/8, graph outputs unchanged.
  • Full npm test: 957 files, 11,344 passed, 46 skipped, 0 failed (pretest and the gitignore suite included).

README / docs

No user-visible surface changes; no README or site rows move.

check:kernel-rules failed at member_fn_ref.rs:1082: python_unpacked_bases
compiled a name-parameterized regex on every class header. The variable
name is the only part that varies, so route the pattern through
KernelResolver::cached_regex and compile each shape once.

Rule scan: 3/3. python-self-call-not-import: 63/63. Golden dumps: 8/8.
Full npm test: 957 files, 11,344 passed, 46 skipped, 0 failed.
@bompus bompus added the author:deepseek Pull request written by a deepseek model label Oct 31, 2026

@bompus-ai-review bompus-ai-review 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.

Bompus AI Review (Claude Fable 5.1, max reasoning): 0 finding(s).

@bompus
bompus merged commit ae735a0 into fork/consolidated Oct 31, 2026
3 checks passed
@bompus
bompus deleted the fix/kernel-rule-cached-regex branch October 31, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:deepseek Pull request written by a deepseek model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant