Skip to content

test: session graph fixtures and builders (PR-1 fast loop)#100

Merged
HumanBean17 merged 2 commits into
masterfrom
feat/test-suite-fast-loop
May 13, 2026
Merged

test: session graph fixtures and builders (PR-1 fast loop)#100
HumanBean17 merged 2 commits into
masterfrom
feat/test-suite-fast-loop

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Scope

Implements PR-1 (fixture fast loop) from plans/PLAN-TEST-SUITE-FAST-LOOP.md: session-scoped Kuzu builds per static corpus, shared tests/_builders.py helpers, Tier 1/2 test migrations, Tier 3 per-test builds delegating to _builders, and tests/README.md updates (merge gate intent, three tiers, consumer matrix, iteration/skills pointers).

Out of this PR: GitHub Actions workflow and branch protection (PR-3). No production code. No ontology bump / no re-index.

Highlights

  • tests/_builders.py: build_graph_tables_to, build_kuzu_to, and build_kuzu_*_into wrappers (thin façade over production passes).
  • tests/conftest.py: Bank session graph pass1–5 + write, no pass6; session DB paths for call_graph_smoke, route_extraction_smoke, cross_service_smoke, fqn_collision_smoke, http_caller_smoke; graph_tables_cross_service_smoke for read-only in-memory tests; TYPE_CHECKING for GraphTables on the session tables fixture.
  • Singleton safety: kuzu_graph_route_extraction_smoke and call-graph roundtrip tests use KuzuGraph(path) where appropriate instead of fighting KuzuGraph.get.
  • test_mcp_v2.test_find_client_by_target_service: Seeds from list_clients() rows with real target_service (display fqn first token was wrong once pass5 added more clients). Documented in README as a test fix, not fixture scope creep.
  • Tier-3 mutable copies: test_cross_service_resolution_flag.py and test_client_role_rename.py still copy/mutate cross_service_smoke under tmp_path; they now call _builders instead of inlining passes.

Consumer matrix

See tests/README.md (section CI merge gate and fixture tiers) for the bank-chat / test_call_invariant rows and pass-depth rationale.

Validation

.venv/bin/ruff check tests/
JAVA_CODEBASE_RAG_RUN_HEAVY=0 .venv/bin/python -m pytest \
  tests/test_call_graph_smoke_roundtrip.py tests/test_ast_graph_build.py tests/test_kuzu_queries.py \
  tests/test_call_edges_e2e.py tests/test_call_invariant.py tests/test_feign_not_exposer.py \
  tests/test_call_edge_matching.py tests/test_client_hint_recovery.py tests/test_brownfield_routes.py \
  tests/test_brownfield_clients.py tests/test_client_node_extraction.py tests/test_assign_endpoint_client_extraction.py \
  tests/test_mcp_v2.py tests/test_call_graph_receiver_resolution.py tests/test_cross_service_resolution_flag.py \
  tests/test_client_role_rename.py -q

Result: 188 passed, 3 skipped (expected skips in test_mcp_v2). Full pytest tests should still be run before merge once CI exists (PR-3) or locally for confidence.

Timing

Before/after wall-time for a full pytest tests run was not captured in this environment; worth a quick note in a follow-up comment after you run it locally.

HumanBean17 and others added 2 commits May 13, 2026 12:29
@HumanBean17 HumanBean17 merged commit d83cd30 into master May 13, 2026
HumanBean17 added a commit that referenced this pull request May 13, 2026
whole effort landed: PR-1 (#100), PR-2 (#101), PR-3 (#102). per
.cursor/rules/agent-workflow.mdc, move propose / plan into the
completed/ trees once the *whole* effort is landed — not after
each PR.

- propose/TEST-SUITE-FAST-LOOP-PROPOSE.md → propose/completed/
  (status header flipped to "locked — implemented across PR-1..PR-3")
- plans/PLAN-TEST-SUITE-FAST-LOOP.md → plans/completed/
  (status flipped to "completed"; tracking footer notes merged PRs
   and the PR-1 → PR-2 → PR-3 landing-order divergence)
- update inbound links:
  - tests/README.md iteration-subset paragraph: point at the
    completed/ paths; drop the now-stale "once the merge gate from
    PR-3 exists" wording since it now exists.
  - .cursor/skills/plan-prompts/SKILL.md: bump the two cross-refs
    in the "Tests to run (iteration loop) — required subsection".
- automation/cursor_propose_only/README.md: swap the autopilot
  example --proposal arg to TIER2-INCREMENTAL-REBUILD-PROPOSE.md
  so the copy-pasteable command keeps pointing at an active propose.

Co-authored-by: Cursor <cursoragent@cursor.com>
HumanBean17 added a commit that referenced this pull request May 13, 2026
…loop) (#102)

* add github actions test workflow and update merge-gate doc (PR-3 fast loop)

implements PR-3 from plans/PLAN-TEST-SUITE-FAST-LOOP.md.

- .github/workflows/test.yml: pytest tests -v on pull_request and on
  push to master; python 3.11; pip install -r requirements.txt +
  pip install -e . (registers the java-codebase-rag cli entry point
  for shutil.which checks in tests/test_java_codebase_rag_cli.py);
  JAVA_CODEBASE_RAG_RUN_HEAVY=0.
- workflow + job both named "test" so the check-context string is
  deterministic (verify with `gh pr checks` before applying branch
  protection per plan resolved-decisions table).
- tests/README.md: tighten the "Merge gate (mechanical)" paragraph
  to point at the now-real workflow file; drop the "until that lands"
  hedge; document `enforce_admins: false` break-glass policy. tier
  tables, consumer matrix, and iteration-subset paragraph untouched
  (PR-1 / PR-2 own those).

note: PR-1 (#100) and PR-2 (#101) merged before PR-3, contrary to
the plan's stated PR-3 → PR-1 → PR-2 order. branch protection still
requires the dummy-failure validation step before the gh api call
that locks master.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix doc: actual check-context is "test" not "test / test"

verified with `gh pr checks 102` after the first workflow run on this
branch — github collapses the context when workflow name and job name
match. update tests/README.md merge-gate paragraph to use the verbatim
string so the gh-api branch-protection call in the PR body works.

Co-authored-by: Cursor <cursoragent@cursor.com>

* move test-suite-fast-loop propose + plan to completed/

whole effort landed: PR-1 (#100), PR-2 (#101), PR-3 (#102). per
.cursor/rules/agent-workflow.mdc, move propose / plan into the
completed/ trees once the *whole* effort is landed — not after
each PR.

- propose/TEST-SUITE-FAST-LOOP-PROPOSE.md → propose/completed/
  (status header flipped to "locked — implemented across PR-1..PR-3")
- plans/PLAN-TEST-SUITE-FAST-LOOP.md → plans/completed/
  (status flipped to "completed"; tracking footer notes merged PRs
   and the PR-1 → PR-2 → PR-3 landing-order divergence)
- update inbound links:
  - tests/README.md iteration-subset paragraph: point at the
    completed/ paths; drop the now-stale "once the merge gate from
    PR-3 exists" wording since it now exists.
  - .cursor/skills/plan-prompts/SKILL.md: bump the two cross-refs
    in the "Tests to run (iteration loop) — required subsection".
- automation/cursor_propose_only/README.md: swap the autopilot
  example --proposal arg to TIER2-INCREMENTAL-REBUILD-PROPOSE.md
  so the copy-pasteable command keeps pointing at an active propose.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 deleted the feat/test-suite-fast-loop branch May 23, 2026 18:36
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