Skip to content

fix(parsers): final #1538 audit batch — spurious records, PHP enums, C macros/enum members - #1659

Merged
Shashankss1205 merged 1 commit into
mainfrom
fix/1538-final-batch
Aug 19, 2026
Merged

Shashankss1205 merged 1 commit into
mainfrom
fix/1538-final-batch

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Fourth and final substantive batch from the #1538 audit (#1628 C++, #1654 wrong-values, #1657 context attribution). One regression test per finding; unit suite 1406 passed / 7 skipped; all 21 goldens green (c/csharp regenerated — C recovers +14 function-like macros).

  • PHP: 8.1 enums indexed as class-likes and recognized as method owners — enum methods stop being orphans
  • C: function-like macros extracted (the parameter code existed but was unreachable), macro end_line off-by-one fixed, and enum members attributed to their own enum in one structural pass (previously the first enum claimed every member and only the first enumerator matched)
  • Elixir: definition heads no longer emit a false self-recursive CALLS edge on every function; inline , do: bodies still walked
  • Ruby: nested calls keep their own receiver/args (logger.info(formatter.render(x)) no longer records formatter.info)
  • C#: distinct same-line calls to one function are all kept; attributes actually extracted (the parent-direction check was structurally always false); line_number points at the declaration per the established convention
  • Haskell: curried application produces one call record per call site instead of one per nested apply

Together with the previous batches this addresses every section of #1538 except the 'Minor' list, which is being split into a follow-up issue.

…sing declarations

- php: PHP 8.1 enums indexed as class-likes (node_type 'enum') and recognized
  as owners, so enum methods stop being orphans
- c: function-like macros extracted (the param code existed but was
  unreachable — the query only matched preproc_def); macro end_line
  off-by-one fixed; enum members attributed to their OWN enum in one
  structural pass (the old per-enum loop with a global seen-set let the
  first enum claim every member, and the `*` quantifier matched only the
  first enumerator). Fixture recovers +14 macros.
- elixir: definition heads are no longer recorded as self-recursive calls;
  inline `, do:` bodies still walked
- ruby: nested calls no longer steal each other's receiver/args (field
  check, matching the name branch)
- csharp: same-line repeat calls kept (dedupe per call site, not per
  name_line); attributes actually extracted (attribute_list is a CHILD of
  the declaration, the old parent check was always false); line_number
  points at the declaration, not the attribute line
- haskell: curried application deduped by callee node — one call record per
  call site, while genuinely distinct same-name calls on a line survive

One regression test per finding. Unit suite 1406 passed / 7 skipped; all
21 goldens green (c/csharp regenerated).
@github-project-automation github-project-automation Bot moved this to Backlog tasks in CGC Progress Board Aug 19, 2026
@Shashankss1205
Shashankss1205 merged commit a95d2d8 into main Aug 19, 2026
1 of 2 checks passed
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
code-graph-context-pack Building Building Preview Aug 19, 2026 9:02pm

@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Code Graph Analysis

fix(parsers): final #1538 audit batch — spurious records, PHP enums, C macros/enum members (#1659)

📊 Interactive Visualization

View the blast radius graph: PR Reviewer Dashboard

📦 Artifacts

The graph JSON has been uploaded as a build artifact: pr-code-graph-1659


Generated by CodeGraphContext using FalkorDB Lite

This branch was successfully deployed

1 active deployment
Preview — d095faad Deployed Aug 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant