Skip to content

Zig parser: fix 6 finder bugs#110

Open
gadievron wants to merge 2 commits into
masterfrom
pr/zig-parser
Open

Zig parser: fix 6 finder bugs#110
gadievron wants to merge 2 commits into
masterfrom
pr/zig-parser

Conversation

@gadievron

Copy link
Copy Markdown
Collaborator

Zig parser: fix 6 finder bugs

Local-only branch pr/zig-parser off master 368b559. One of a coordinated 7-PR set fixing parser/reachability bugs found by the OpenAnt finder. File-disjoint from the other 6 PRs (no merge collision; any order).

Addresses 6 finder bug-ids (6 distinct fixes; 0 ride a same-PR canonical).

Bugs fixed

  • [3] zig-local-type-dispatch (zig/namespace_dispatch) — same defect as BUG-044 (zig leg) (characterized but unmerged; this lands it on master)
  • [16] zig-extraction_gap-147 (zig/extraction_gap) — genuinely-new (no prior logged entry)
  • [17] zig-builtin_filter_leak-234 (zig/builtin_filter_leak) — genuinely-new (no prior logged entry)
  • [26] zig-metadata-265-test (zig/metadata_correctness) — genuinely-new (no prior logged entry)
  • [37] zig-extraction_gap-106-structmethod (zig/extraction_gap) — same defect as BUG-095/096 (characterized but unmerged; this lands it on master)
  • [41] zig-dataflow_loss-298-alias (zig/dataflow_loss) — genuinely-new (no prior logged entry)

Dedup status (independent + judge, from raw)

4 genuinely-new · 0 duplicate-of-curated (cross-ref above) · 2 covered-by-curated · 0 intra-PR-duplicate. All re-confirmed STILL PRESENT on pristine master 368b559 (git show 368b559:).

Tests

Verified GREEN in isolation off pristine 368b559: 12 passed (tests/parsers/zig/). New per-bug regression tests. (No test_<lang>_schema_completeness.py / test_callgraph_symmetry.py parser-infra in this PR — a follow-up; master has none either.)

Notes

  • TDD per bug (RED→GREEN); independent + judge verified each fix from raw against master.
  • No behavior change outside the listed parser(s).

🤖 Generated with Claude Code

gadievron added 2 commits June 9, 2026 23:31
…lias (BUG-NEW 3,17,41)

Local-only finder-fixes-54 (base master 368b559). TDD; 5 tests in the new
tests/parsers/zig/test_call_graph_builder_u*.py. Judge (vs prepared
recommendation, independent re-derivation from raw): AGREE / SHIP-AS-IS.
CM-B builtin pre-check scoped SAME-FILE (judge-confirmed: no global cross-file
fallback; genuine-builtin non-link pinned by a negative test). Combined parser
suite: 70 passed, 10 skipped.

Local-only; not pushed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

(cherry picked from commit 4294ffe24e0814bc2668f1f6c46c3874de56b01e)
…n/container-methods (BUG-NEW 16,26,37)

Local-only finder-fixes-54. 7 new tests.
[37] fixed grammar node-type keys (variable_declaration + struct/enum/union/opaque_declaration,
members=function_declaration) so container methods extract as C.m; [16] first identifier as
fn name; [26] anchored test classification. Cross-unit: the [37] fix changes the call-graph
edge target to the now-correct qualified id m.zig:C.m -> updated 2 test_call_graph_builder_u13
assertions (judge-verified legitimate, not a weakening). Judge: AGREE / SHIP-AS-IS.
(Follow-up: dead _extract_struct_methods left for a separate cleanup.)
Local-only; not pushed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

(cherry picked from commit 1aae27a79420beb4ab1ad2f2c064124c221ec26d)
@gadievron

Copy link
Copy Markdown
Collaborator Author

Merge-order note (not a defect — flagging for landing order)

The zig parser here was authored against a different base than #85 (call_graph_builder.py) / #87 (function_extractor.py). The u13/u14 fixes must be ported onto #85/#87's grammar-aligned code, not applied as a clean replace.

Also: this PR reclassifies camelCase testX as an ordinary function (only test_/_test are tests). That makes the #75-era assertion testThing == 'test' stale — update it to test_thing == 'test'.

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