GitNexus/gitnexus/test/integration
Lucas van Staden 1c4993251c
fix(php): synthesize module scope for namespace-less PHP files (.phtml) (#1801)
* fix(php): phtml scope synthesis with full-file range + O(1) Step 4 lookup (#1801, #1803)

Address PR #1801 review findings and complete #1803 fix:

scope-extractor.ts:
- Synthetic Module scope uses full-file range (computed from existing
  drafts) so positionIndex containment works for top-level references
  in ERROR-root .phtml files
- Orphan scope re-parenting done on drafts in extract() by replacing
  with new drafts — no mutation of readonly fields, no PHP-specific
  logic in shared buildScopeTree
- Dead matchCount parameter removed from ensureModuleScope

namespace-siblings.ts:
- Step 4 parsedFiles.find() replaced with pre-built Map for O(1) lookup
  (was O(n²) with 16K files = ~256M comparisons)

* test(php): add pipeline benchmark for scaling regression detection

Synthetic PHP fixture generator (N files × M namespaces × K classes)
with cross-namespace imports and calls. Measures wall-clock, peak heap,
node/edge counts at 100/250/500 file scales with worker pool enabled.

Results on current branch:
- 100 files: 982ms, 65MB (9.8ms/file)
- 250 files: 1310ms, 70MB (5.2ms/file)
- 500 files: 2006ms, 92MB (4.0ms/file)
- Scaling: sublinear (0.53x-0.77x ratio)

Gated behind GITNEXUS_BENCH=1 so it does not run in normal CI.

* chore: trigger CI

* fix: prettier formatting + update scope-extractor test for synthesis behavior

* fix: extend synthetic Module range to all captures + update integration test

Address CI failure and review findings:
- ensureModuleScope now computes range from ALL captures (scope,
  declaration, reference, type-binding) not just scope drafts. This
  ensures top-level references after the last inner scope are covered.
- Update parse-worker-scope-integration test for synthesis behavior.
- Update extract() docstring to document synthesis contract.

---------

Co-authored-by: Test <test@example.com>
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-05-24 20:37:17 +01:00
..
cli feat(core): adopt pino structured logger (#1336) 2026-05-07 20:56:25 +01:00
group feat: add IncludeExtractor for C++ cross-repo include tracking (group) (#1156) 2026-05-09 09:31:59 +01:00
mcp fix(mcp): close MCP server timeout — stdout discipline + cold-start friction (#1383) 2026-05-07 09:14:33 +01:00
resolvers feat(cpp): Add structured resolver suppression outcomes (#1785) 2026-05-24 07:34:40 +01:00
analyze-heap-oom-e2e.test.ts fix(ingestion): Raise analyze auto-heap to 16GB and tighten cross-platform OOM guidance for UE5-scale repositories (#1652) 2026-05-17 16:28:07 +01:00
analyze-wal-checkpoint-failure.test.ts fix(lbug): add WAL checkpoint-threshold control (#1772) 2026-05-22 14:46:49 +01:00
api-impact-e2e.test.ts feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
api-query.test.ts fix: Use Ladybug native read-only enforcement and prepared statement execution for Cypher query paths (#1655) 2026-05-18 06:54:24 +01:00
ast-helpers-object-literal-binding.test.ts feat(ingestion): Link object literal methods to exported bindings (#1718) 2026-05-21 17:18:27 +01:00
augmentation.test.ts fix(augment): add CONTAINS fallback when FTS indexes unavailable (#1476) 2026-05-11 16:39:10 +01:00
class-impact-all-languages.test.ts feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
cli-e2e.test.ts test(cli): stabilize eval-server host checks (#1786) 2026-05-23 16:45:35 +01:00
context-typed-property.test.ts fix(csharp): include generic typed properties in context and impact (#1399) 2026-05-09 09:07:24 +01:00
cross-file-binding.test.ts fix(ingestion): classify Python class methods as Method (#1102) 2026-04-27 09:04:50 +01:00
csv-pipeline.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
enrichment.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
expo-routes.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
filesystem-walker.test.ts fix(analyze): prevent cache-hit native workers from aborting (#1751) 2026-05-21 16:17:02 +01:00
has-method.test.ts feat(cpp): C/C++ MethodExtractor config with pure virtual detection (#617) 2026-04-01 18:07:11 +01:00
heritage-extractor-wiring.test.ts feat(ingestion): language-agnostic heritage extractor with config+factory pattern (#890) 2026-04-17 17:51:17 +01:00
hooks-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
ignore-and-skip-e2e.test.ts Extract registries into model/ module with SemanticModel interface (#786) 2026-04-12 01:06:55 +01:00
java-class-impact.test.ts feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
lbug-close-handle-release.test.ts fix(lbug): drain checkpoint result before close (#1506) 2026-05-12 14:03:45 +01:00
lbug-core-adapter.test.ts test(ci): isolate native LadybugDB and CLI e2e flakes 2026-04-30 19:45:26 +01:00
lbug-lock-retry.test.ts fix(lbug): robust Windows lock acquisition for CI integration tests (#1430) 2026-05-08 11:58:01 +01:00
lbug-open-retry.test.ts fix(lbug): robust Windows lock acquisition for CI integration tests (#1430) 2026-05-08 11:58:01 +01:00
lbug-orphan-sidecar-recovery.test.ts fix(lbug): Recover gitnexus analyze from orphan LadybugDB sidecars when main DB file is missing (#1622) 2026-05-16 11:45:32 +01:00
lbug-pool-stability.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
lbug-pool.test.ts fix: Use Ladybug native read-only enforcement and prepared statement execution for Cypher query paths (#1655) 2026-05-18 06:54:24 +01:00
lbug-readonly-init.test.ts fix(lbug): skip init lock and filesystem mutations for read-only opens (#1783) (#1784) 2026-05-24 08:05:27 +01:00
lbug-vector-extension.test.ts fix: add platform-aware semantic fallback (#1150) 2026-04-28 12:21:25 +01:00
local-backend-calltool.test.ts fix: Use Ladybug native read-only enforcement and prepared statement execution for Cypher query paths (#1655) 2026-05-18 06:54:24 +01:00
local-backend.test.ts fix: Use Ladybug native read-only enforcement and prepared statement execution for Cypher query paths (#1655) 2026-05-18 06:54:24 +01:00
markdown-processor-crlf.test.ts fix(markdown): handle CRLF line endings in section heading parser (#1469) 2026-05-14 08:58:58 +01:00
object-literal-owner-resolution.test.ts feat(ingestion): Link object literal methods to exported bindings (#1718) 2026-05-21 17:18:27 +01:00
orm-dataflow.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
parse-impl-large-fixture.test.ts fix(workers): resilient + zero-copy ingestion worker pool — prevent analyze hangs on TS-root-scale loads (#1693) 2026-05-20 20:39:35 +01:00
parse-impl-quarantine-cache-skip.test.ts fix(workers): resilient + zero-copy ingestion worker pool — prevent analyze hangs on TS-root-scale loads (#1693) 2026-05-20 20:39:35 +01:00
parsing.test.ts feat: configure eslint with unused import removal (#564) 2026-03-28 15:28:09 +00:00
php-pipeline-benchmark.test.ts fix(php): synthesize module scope for namespace-less PHP files (.phtml) (#1801) 2026-05-24 20:37:17 +01:00
pipeline-graph-golden.test.ts fix(test): isolate cli-e2e from shared mini-repo fixture (#954) 2026-04-18 12:54:59 +01:00
pipeline.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
qualified-class-lookups.test.ts Extract registries into model/ module with SemanticModel interface (#786) 2026-04-12 01:06:55 +01:00
query-compilation.test.ts [dart] Add call patterns for await, cascade, lambda, and widget-tree contexts (#801) 2026-04-13 11:21:11 +01:00
search-core.test.ts fix: Use Ladybug native read-only enforcement and prepared statement execution for Cypher query paths (#1655) 2026-05-18 06:54:24 +01:00
search-pool.test.ts fix(search): surface warning when FTS indexes are missing (#1418) 2026-05-08 17:05:18 +01:00
server-analyze.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
server-http-startup.test.ts fix(server): restore gitnexus serve startup under Express 5 (#1749) 2026-05-21 10:18:09 +01:00
setup-skills.test.ts fix(setup): correct OpenCode skills install path in status message (#1386) 2026-05-07 14:27:49 +01:00
shape-check-regression.test.ts feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
skills-e2e.test.ts feat(csharp): migrate C# to registry-primary scope-resolution (Closes #934) (#1019) 2026-04-23 12:38:13 +01:00
staleness-and-stability.test.ts feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
tree-sitter-languages.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
worker-pool.test.ts fix(analyze): prevent cache-hit native workers from aborting (#1751) 2026-05-21 16:17:02 +01:00