Skip to content

feat: missing-null-guard prior + more artifact patterns + docs#500

Merged
justn-hyeok merged 1 commit intomainfrom
feat/468-priors-patterns-docs
Apr 21, 2026
Merged

feat: missing-null-guard prior + more artifact patterns + docs#500
justn-hyeok merged 1 commit intomainfrom
feat/468-priors-patterns-docs

Conversation

@justn-hyeok
Copy link
Copy Markdown
Collaborator

Bundle of three small follow-ups from today's session. Single PR to keep self-review cost to one cycle.

A. Finding-class priors: new `missing-null-guard` class

Observed on PR #499's own self-review as an FP — reviewer claimed `activeReviewers` lacked a null guard while the actual code has one at function entry (line 31). Four patterns cover:

  • `missing null (guard|check)`
  • `(no|without|lacks) null (guard|check)`
  • `null/undefined check`
  • `undefined reference`

Multiplier 0.7, same as missing-validation (same structural FP shape). 3 new tests.

C. Chunker: more `BUILT_IN_ARTIFACT_PATTERNS`

Rounding out the #498 expansion with ecosystem-specific generated artifacts:

  • Python: `.pyc`, `pycache/`, `.whl`, `*.egg-info/`
  • Go: `vendor/`
  • Rust: `target/debug/`, `target/release/`
  • Java: `.class`, `.jar`, `*.war`
  • Ruby: `.bundle/`
  • Binary: `.avif`, `.bz2`, `*.wasm`

14 new pattern-match tests.

E. Docs: HALLUCINATION_FILTER_DESIGN.md

The original doc described the 3-check Layer-1 design from #428. Now 7 checks exist (added #462, #468 main, #499). Replaced the check list with the current set and documented the `FINDING_CLASS_PRIORS` tuning point + witness-based echo dampener so future contributors can find them.

Test plan

  • 3 new `finding-class-scorer` tests + existing 17 pass
  • 14 new artifact-pattern tests + existing 79 pass
  • Full suite: 3425 → 3442 passing
  • `pnpm typecheck` clean

Three small follow-ups bundled to keep self-review cost to one cycle.

A. Finding-class priors: new `missing-null-guard` class
   Observed on PR #499's own self-review as an FP (claimed missing
   guard on a value that's already guarded at function entry). Adds
   4 patterns covering "missing null check", "no null guard",
   "null/undefined check", "undefined reference". Multiplier 0.7 —
   same as missing-validation, same structural FP shape. 3 new tests.

C. Chunker: more BUILT_IN_ARTIFACT_PATTERNS
   Python (*.pyc, __pycache__, *.whl, egg-info), Go (vendor/),
   Rust (target/debug, target/release), Java (*.class, *.jar, *.war),
   Ruby (.bundle/), plus *.avif, *.bz2, *.wasm binary assets.
   14 new pattern-match tests.

E. Docs: HALLUCINATION_FILTER_DESIGN.md
   Original doc still described the 3-check Layer-1 design from #428.
   Replaced the check list with the current 7-check set (from #428,
   #462, #468 main, #499), documented the FINDING_CLASS_PRIORS table
   and witness-based echo dampener for discoverability.

Tests: 3425 → 3442 (+17). Typecheck clean.
@github-actions github-actions Bot added the size/M <200 lines label Apr 20, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ CodeAgora: ACCEPT

no issues | 5 reviewers

There were no reported findings, no discussions, and no unresolved or escalated issues, so there is no evidence of defects to block the change; based on the available review record, the change appears safe to merge.


CodeAgora · Session: 2026-04-20/001

@justn-hyeok justn-hyeok merged commit c4bc2b2 into main Apr 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M <200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant