Repository navigation
Closed
Labels
ai-taskenhancementNew feature or requestpriority: laterUseful improvement, lower sequencing pressuretooling
Description
Part of #353. Foundation dependency #354 is complete.
Audit result
Valid, not duplicated, and partially implemented by open PR #468.
The resolver cannot work through scan_repo until #483 maps C/C++ extensions. Two original assumptions also need correction:
- The C preprocessor searches the header spelling exactly;
#include "foo"does not implyfoo.h, so extension probing can fabricate edges. - Angle brackets do not mean “system-only.” Projects commonly resolve
#include <project/foo.h>through configured include directories.
Fixed include/ and src/ guesses cannot reproduce compiler search order when multiple candidates exist.
Resolver scope
- Register resolvers for the scanner's
candcpplanguage ids. - Extract both quoted and angle-bracket include directives from real tree-sitter output while preserving which form was used.
- Resolve quoted includes against the including file's directory using the exact normalized spelling.
- Resolve quoted and angle-bracket includes against configured include directories when repository context is available.
- Emit an edge only for a repository-owned, unambiguous exact target.
- Reject repository escapes, unresolved headers, macro-computed includes, and external/system headers.
- Do not synthesize header extensions.
- Reuse the shared registry, orchestrator, edge model, and optional dependency behavior.
Generated headers, compiler macros, conditional build variants, and full CMake/Bazel/MSBuild interpretation may remain documented non-goals.
Dependencies and boundaries
- [Bug]: activate C/C++, PHP, and C# resolver dispatch in scan_repo #483 owns mapping supported C/C++ source and header extensions in the scanner; this issue is not end-to-end complete without it.
- [Task]: add scan-local resolver preparation for repository-aware import edges #484 owns per-repository resolver context and should include compiler include directories, preferably from
compile_commands.json, with a conservative fallback when unavailable. - This issue owns C/C++ extraction and include-resolution semantics.
Until configured include paths are available, ambiguous conventional-root matches must under-edge rather than create a guessed high-confidence edge.
Acceptance criteria
- feat(repo-map): add C/C++ include resolver to the import-edge layer (#359) #468 is merged after exact-spelling and angle-bracket behavior are corrected.
- [Bug]: activate C/C++, PHP, and C# resolver dispatch in scan_repo #483 activates the registered resolvers through
scan_repo. - Quoted relative includes resolve by exact path.
- Project angle-bracket includes resolve only through proven include roots.
- Extensionless includes do not probe
.h/.hppvariants. - Ambiguous, external, macro, and repository-escape includes emit no edge.
- C and C++ registration, extraction, resolution, and scanner integration use real fixtures.
- Existing Python behavior and no-extra degradation remain unchanged.
Metadata
Metadata
Assignees
Labels
ai-taskenhancementNew feature or requestpriority: laterUseful improvement, lower sequencing pressuretooling
Activity
sumithr commentedon Jul 13, 2026
Batch finish-pass (2026-07-13): full proof posted on the linked PR (per-file review, fix rounds where applicable, behavioral verification through the real entrypoints, integrated-tip check). Under this issue's audit-refreshed acceptance criteria the slice is PARTIAL; the proof's AC-ledger section names exactly what is delivered vs what remains (audit-gated items, mostly #483/#484-scoped). The merge-vs-park decision is pending in the batch go-ahead; if merged as a partial, the PR's Closes reference will be softened so this issue stays open for the remainder.
feat(repo-map): add C/C++ include resolver to the import-edge layer (#…
chore(main): release 0.55.0 (#499)
sumithr commentedon Jul 13, 2026
Drift reconciliation against live
main(work-issue step 1, 2026-07-13):The audit note above says #468 merges "after exact-spelling and angle-bracket behavior are corrected". PR #468 is merged (commit 3034810), but the merged resolver still contains the two behaviors this issue's own audit rejects:
CppResolver._probestill probes.h/.hpp/.hh/.hxxfor an extensionless include (#include "config"matchesconfig.h), violating "Extensionless includes do not probe.h/.hppvariants" and "Do not synthesize header extensions". PR feat(repo-map): add C/C++ include resolver to the import-edge layer (#359) #468's evidence section lists the "extensionless probe" edge as expected, so this was merged as-is, not corrected._INCLUDE_ROOTS = ("include", "src")still resolves quoted includes through fixed conventional roots, which the audit calls out ("Fixed include/ and src/ guesses cannot reproduce compiler search order") and which must under-edge until [Task]: add scan-local resolver preparation for repository-aware import edges #484 supplies configured include directories.Also reconciled:
CPP_CONFIG.extensionsomits.hh/.hxxeven though the resolver probes them, the exact metadata mismatch #483 flags.Implementing against reality on the branch for #483 + this issue: correct the quoted-include semantics to exact-spelling, importer-relative resolution (no extension probing, no conventional-root guessing, under-edge direction), keep angle-bracket includes emitting no edge until proven include roots exist (#484), reconcile the extension metadata, and activate scan dispatch per #483.
sumithr commentedon Jul 14, 2026
AC ledger for #359, audited against PR #530 (branch feat/issue-483-scanner-activation) with fresh local evidence: full suite 3175 passed, 0 failed, 100% coverage with the treesitter extra; ruff/mypy/format clean.
Boundary notes: quoted includes beyond the importer's own directory and angle-bracket resolution through configured include directories (compile_commands.json) stay under-edged until #484 supplies scan-local repository context, per this issue's own dependency section.
sumithr commentedon Jul 14, 2026
AC verification (pre-merge, PR #530)
Per-AC evidence, checked against the branch (
feat/issue-483-scanner-activation, heade8d5500) rather than the PR self-description, plus merge-boundary verification.scan_repotests/test_repo_map_scan_activation.py(every test drives realscan_repo); live run emits C/C++/PHP/C# nodes and edgestest_cpp_resolver_resolve_relative_to_including_file,test_scan_cpp_quoted_relative_include_emits_exact_edges; live edgefile:src/main.cpp -> file:src/util.htest_scan_angle_bracket_includes_emit_no_edge; live<vector>produced no edgetest_cpp_resolver_resolve_extensionless_does_not_probe_header_variants,test_scan_extensionless_include_does_not_probe_header_variants; live#include "config"produced no edge toconfig.htest_cpp_resolver_resolve_does_not_guess_include_root,test_cpp_resolver_resolve_external_not_found_yields_nothing,test_cpp_resolver_extract_macro_include_dropped,test_cpp_resolver_resolve_escaping_repo_root_yields_nothingcpp_projectmini-repo, real-file tmp_path scanstest_scan_without_extra_still_classifies_activated_languagespins the single-warning degradationMerge-boundary verification
scan_repofrom the branch reproduced the original zero-C/C++-nodes state on base002da7b, then showed the fix on the branch (exact edge set, all true-negatives holding).sumo-qa-reviewing-before-mergepass over all changed files: SAFE.knowledge_loadersset, already killed onmainby merged test(mutation): kill the 47 knowledge_loaders survivors from PR #302 #522).feat(repo-map): activate C/C++, PHP, and C# resolver dispatch in scan…
feat(repo-map): activate C/C++, PHP, and C# resolver dispatch in scan…