Tasks: Docker-Backed Integration Tests for densify_extraction¶
Each task references one or more
FR-*/NFR-*/AC-*IDs from spec.md. CI'sscripts/spec_validator.pyenforces that every requirement is referenced by at least one task.
Conventions¶
- Status:
[ ]todo /[~]in-progress /[x]done. - Owner: GitHub handle or
@copilot/@agent:<role>.
T-001 — Write the three integration tests¶
- Refs: FR-1, FR-2, FR-3, AC-1, AC-2, AC-3, AC-5, NFR-AUDIT-1, NFR-COVERAGE-1, NFR-IDEMPOTENT-1, NFR-ISOLATION-1
- Owner: @copilot
- Status:
[x] - Files:
backend/tests/db/test_citation_resolver_integration.py(new)- Steps:
- Import
resolve_citationsanddensify_extractionfromlaw_ai.core.neo4j.citation_resolver. - Add three
@pytest.mark.integration @pytest.mark.asynciotests using the spec-013 fixturesneo4j_integration_driver+clean_neo4j_db:test_resolve_citations_hits_real_neo4j_alias_match— seed(:Case {id: 'brown', aliases: ['347 U.S. 483']}), callresolve_citations(session, ["347 U.S. 483"]), assert mapping contains{"347 U.S. 483": "brown"}(AC-1).test_densify_extraction_idempotent— seed the same case, build anExtractionResultwith one citation, calldensify_extractiontwice in fresh sessions, assert both calls return the same non-Nonetarget_case_id(AC-2, NFR-IDEMPOTENT-1).test_resolve_citations_no_match_returns_none— without seeding any matching alias, callresolve_citations(session, ["999 U.S. 999"])and assert the mapping value isNone(AC-3).
- Verify:
cd backend && pytest -m integration -v -k citation_resolver_integrationexits 0 with three green tests (AC-4).cd backend && pytest -q(no-m integration) does not collect or run any of the new tests (AC-5).mypy law_ai --strictclean (no production-code changes; tests are not strict-typed).
T-002 — Wire into make test-integration and CI¶
- Refs: FR-4, AC-4, NFR-PERF-1
- Owner: @copilot
- Status:
[x] - Files:
Makefile(no change —test-integrationalready runspytest -m integration -v).github/workflows/integration-tests.yml(no change — runs the same selector on the same paths)- Steps:
- Confirm by inspection that the new file is picked up by both entry points (no path filter excludes
tests/db/). - Run
make test-integrationlocally with Docker available; capture the green output in the PR description. - Verify:
make test-integrationexits 0 locally.- The "Integration Tests" workflow on GitHub Actions runs the new tests and is green on this PR.
T-003 — Update BACKLOG.md to mark BL-20260429-10 done¶
- Refs: spec metadata; constitution §11
- Owner: @copilot
- Status:
[x] - Files:
- BACKLOG.md
- Steps:
- Move
BL-20260429-10from Claimed to Done with the resolution line: "Shipped via specs/014-densify-extraction-integration-tests." - Run
python scripts/backlog_lint.py— must exit 0. - Verify:
python scripts/backlog_lint.pyexits 0.python scripts/spec_validator.pyexits 0.
Done-When (Definition of Done)¶
- All tasks
[x]. - All
AC-*from spec.md covered by passing tests. make lint && make testgreen.make test-integrationgreen locally and in CI.- LegalBench delta: 0 pp (no reasoning change; spec NFR-LegalBench).
BL-20260429-10moved to Done in BACKLOG.md.## Follow-ups Discoveredsection below populated.
Follow-ups Discovered¶
Append-only. Mirror each item into BACKLOG.md with a
BL-YYYYMMDD-NNid. CI (scripts/spec_validator.py) checks this section exists. CI (scripts/backlog_lint.py) checks the BACKLOG mirror.
- BL-20260526-01 — test-gap, low — Add a mutation variant test seeding two cases with overlapping aliases to assert
head(collect(c.id))determinism matches BL-20260429-12 (spec-002 follow-up). Surfaced in: specs/014-densify-extraction-integration-tests. - BL-20260526-02 — test-gap, low — Add an integration test asserting
test_citation_resolver_integrationtests are NOT collected bypytest -q(no-m integration) in the CI environment, confirming AC-5 isolation contract. Surfaced in: specs/014-densify-extraction-integration-tests.
pre-existing items (BL-20260429-11, BL-20260429-21) that are intentionally out of scope. →