Commit Graph

473 Commits

Author SHA1 Message Date
5d3c340243 test(ingest): stub recompute_searchable in FU-1 fixture (FU-2a interaction)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:59:11 +00:00
358d82e90e feat(retrieval): require practice_area only for internal/cases; enable searchable filter + health visibility (GAP-13, FU-2a)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:57:27 +00:00
6dbcb7e798 feat(ingest): recompute searchable on ingest + metadata completion (GAP-13, FU-2a)
Wire db.recompute_searchable into the ingest pipeline (after statuses are set) and into
extract_and_apply (after fields are persisted to DB, success path only).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:47:51 +00:00
4b8bbc3794 feat(data-model): V21 searchable flag + recompute_searchable (GAP-13, FU-2a)
Add SCHEMA_V21_SQL (searchable boolean column + index on case_law), wire it
into _run_schema_migrations, and implement _compute_searchable (pure predicate)
+ recompute_searchable (idempotent async backfill/update). All 5 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:46:29 +00:00
cd0f6cda0a feat(ingest): atomic ON CONFLICT upsert in create_*_case_law (GAP-03, FU-2a)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:44:31 +00:00
2b91173f25 feat(ingest): write-time canonical case_number normalization (GAP-06, FU-2a)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:42:47 +00:00
bcd226ac1a test(ingest): failing tests for idempotent ingest + searchable (FU-2a)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:41:34 +00:00
a16f8cd933 docs(plan): FU-2a idempotent-ingest implementation plan (7 tasks, TDD)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 20:04:49 +00:00
a8b780765d docs(spec): FU-2a idempotent-ingest design + split FU-2b migration to #67
FU-2 split (chair decision 2026-05-30): FU-2a = pure-code (GAP-03 ON CONFLICT
upsert, GAP-06 write-time type-aware normalization, GAP-13 materialized
searchable flag); FU-2b (#67) = data-migration for GAP-07/08 (identifier
reconciliation + dedup) deferred as separate chair-involved task.

DB check 2026-05-30: ~52/56 internal_committee rows hold full citation in
case_number, >=1 duplicate (8047-23). Architecture verified vs 3+ sources
(PostgreSQL ON CONFLICT, DDD write-boundary normalization, materialized
validity flag). No identifier migration in FU-2a.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:56:07 +00:00
44ae739031 Merge pull request 'FU-1: איחוד מסלול-הקליטה למסלול קנוני אחד (GAP-01/02/04/05)' (#11) from fix/fu1-unified-ingest into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m51s
2026-05-30 19:37:33 +00:00
90728ccb3e docs(spec): FU-1 documented drift notes + mark TaskMaster #59 done
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:28:04 +00:00
3c431403f6 refactor(ingest): drop obsolete queue_halachot flag + dead imports (FU-1 review)
pipeline always queues both extraction kinds (INV-ING3); remove the
now-meaningless queue_halachot param from ingest_internal_decision and
migrate_from_style_corpus. Also trim chunker/extractor/rerank from the
precedent_library module-top import (chunking/extraction moved to ingest.py).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 19:26:53 +00:00
5104db8f4e refactor(ingest): ingest_internal_decision delegates to canonical pipeline; queue metadata too (GAP-02, FU-1)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:19:10 +00:00
d7eb1b2824 refactor(ingest): ingest_precedent delegates to canonical pipeline (FU-1)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:16:29 +00:00
be4f7bbe99 feat(ingest): canonical ingest_document pipeline (FU-1) 2026-05-30 19:13:15 +00:00
d4663eba8f feat(ingest): IntakeSpec + shared helpers for canonical pipeline (FU-1)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 19:11:27 +00:00
9ae2d47d03 test(ingest): failing tests for unified pipeline (FU-1)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 19:09:37 +00:00
15f42bc91c docs(plan): FU-1 unified-ingest implementation plan (6 tasks, TDD)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:05:14 +00:00
357a5238c4 docs(spec): FU-1 unified-ingest design + FU-3 backfill task (#61.2)
Design for unifying the two parallel ingest paths (ingest_precedent /
ingest_internal_decision) into one canonical pipeline parameterized by an
IntakeSpec config object — Template Method skeleton + Strategy injection.
Closes the GAP-02 root cause (missing metadata queue on internal path) by
making a skipped step structurally impossible.

Architecture choice verified against 3+ authoritative sources (refactoring.guru
Template-Method/Replace-Conditional, Fowler FlagArgument, Strategy pattern).
DB check (2026-05-30): no migration needed — 0/56 internal rows lack metadata,
0 invalid enums; multimodal backfill (42 rows) tracked as TaskMaster #61.2 / FU-3.

Covers GAP-01/02/04/05 · provides INV-ING1/ING3/G2/G4 · TaskMaster #59.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:00:30 +00:00
df437c2462 tasks(legal-ai): mark FU-4 (62) + FU-6 (64) + subtasks done (merged+deployed)
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m34s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:30:26 +00:00
a53d8eef14 merge: GAP-12 — domain-scope search_decisions (INV-RET1)
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
Derive practice_area from case (case row → number-prefix fallback); block only when a
case is present but undeterminable; case-less/exploratory search stays cross-domain.
Verified offline (test_search_domain_scope.py 5/5). Closes PR #10.
2026-05-30 18:29:45 +00:00
0c8d415044 fix(retrieval): scope search_decisions by domain — derive from case, block only on undeterminable case (GAP-12, INV-RET1)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:23:41 +00:00
bd6edb8937 merge: FU-6 — code-enforced QA gates (GAP-15/16)
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m38s
export_docx hard-blocks on critical QA failures (gates on stored qa_results, no LLM
re-run); neutral_background severity consistency fix; export HTTP endpoint returns 409
on block (UI shows error, not false success). Verified offline (test_export_qa_gate.py 5/5).
Closes PR #9.
2026-05-30 18:14:40 +00:00
a61495f5ef fix(api): export endpoint returns 409 when QA gate blocks (FU-6 UX — avoid false success toast)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:03:21 +00:00
084b31cd9b fix(qa): enforce critical-QA gate on export + fix neutral_background critical-but-passed (GAP-15/16, INV-QA3/EX3)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:58:50 +00:00
1473bdf3c2 merge: FU-4/GAP-10 corpus-isolation fix
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m39s
Enforce source_kind on halacha_filters (db.py) — closes cross-corpus halacha leak (#56).
Verified by offline regression test (mcp-server/tests/test_precedent_corpus_isolation.py).
2026-05-30 17:53:46 +00:00
f51036bd98 merge: System Spec-set + gap-audit (sub-projects 1+2)
Adds docs/spec/ (14-file living system spec, 11 invariants) + gap-audit (23 findings
→ 8 fix-units) + TaskMaster tasks 59-66. Closes PR #8. Docs/tasks only — no runtime code.
2026-05-30 17:53:46 +00:00
1af689a969 fix(retrieval): enforce source_kind on halacha_filters — close cross-corpus leak (GAP-10, INV-RET1)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:46:59 +00:00
80d1c5ff27 tasks(legal-ai): reconcile #56 (cancel→superseded by 62.1) + #57 (link to FU-3)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:43:12 +00:00
d72d5429ed tasks(legal-ai): 8 fix-unit tasks (59-66) + 23 GAP subtasks from gap-audit
Granularity (epic-per-fix-unit + subtask-per-gap) and dependency-aware/WSJF
prioritization both backed by ≥3 authoritative sources (SAFe/Pichler/OWASP/CVSS;
Wake-INVEST/Cohn/Agile-Alliance/Atlassian/SAFe).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:38:31 +00:00
28bed4906c docs(spec): gap-audit — 23 findings mapped to invariants + proposed fix-units (sub-project 2) 2026-05-30 17:27:06 +00:00
ebfda74575 docs(spec): X1 — canonical case_number = official assigned number (no month invention); mixed-form reconciliation is a migration task 2026-05-30 17:23:14 +00:00
e3880aef4e docs(spec): sign-off fixes — 06 index row (G2,G9), refresh stale §7 note, fix X3 G9 anchor niqqud
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:15:00 +00:00
380998da17 docs(spec): X5 — file:line/name precision (log_search_bg, user param, active_draft_path) 2026-05-30 17:09:33 +00:00
8c4b8cf19e docs(spec): X5-audit-provenance
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:05:43 +00:00
b0351958db docs(spec): X4-agents map + reserved process-agents section
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:59:31 +00:00
c881665b7c docs(spec): constitution index — X3 enforces G2,G9 (operational)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:56:39 +00:00
7fd6d8cb95 docs(spec): X3 — replace out-of-repo memory links with plain mentions (self-containment) 2026-05-30 16:56:20 +00:00
951f2366e6 docs(spec): X3-integration-deploy
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:53:01 +00:00
a0004f0274 docs(spec): constitution — document third authority model (project-operational)
X2/X3/X4 invariants are facts about this system's own integration/ops (no external
authority); they use מקור-סמכות=project runbooks, tied to a global engineering invariant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:49:58 +00:00
f0fd405f4e docs(spec): X2-multi-company sync rules
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:47:19 +00:00
b0e4e14832 docs(spec): X1-identifiers canonical model
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:41:37 +00:00
b46d25f605 docs(spec): 07-learning loop
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 15:21:34 +00:00
0fd06659da docs(spec): 06-export DOCX contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 15:16:00 +00:00
c0ef90d722 docs(spec): 05-qa-review — clarify neutral_background dual return path (critical fallback w/ passed=True); fix line ref
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 15:12:30 +00:00
c1872aa214 docs(spec): 05-qa-review — QA gates + human gates 2026-05-30 15:09:42 +00:00
1582556b0b docs(spec): 04-analysis-writing — 12 blocks + reasoned-decision invariants
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 15:03:56 +00:00
5e80bf560d docs(spec): constitution index — add G9 to 03-retrieval row (consistency)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 15:00:30 +00:00
72737df154 docs(spec): 03-retrieval corpora + retrieval invariants
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 14:57:11 +00:00
998194462f docs(spec): 02-data-model entities + completeness contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 14:50:06 +00:00