aac383acb7
feat(sync): --verify exits non-zero on drift; adapter mismatch = loud drift (GAP-21, FU-8a)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 11:14:44 +00:00
adc196ac20
docs(plan): FU-8a process→code guards implementation plan (3 tasks, TDD)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 10:51:31 +00:00
e8431a2adf
docs(spec): FU-8a process→code guards design (GAP-21/22) + split GAP-23 to #69
...
GAP-21: sync_agents --verify exits non-zero on drift; adapter_type mismatch
counted as drift (loud), not silent skip — makes it an enforceable gate (INV-MC1).
GAP-22: fitness-function pytest guarding against raw Paperclip HTTP + direct
agent_wakeup_requests INSERT (INV-INT1/INT3). Repo pre-scanned: 0 existing
violations → clean forward-fence. Verified vs 3+ sources (architectural fitness
functions; drift-verify non-zero exit). GAP-23 (spec→agents) split to #69 .
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 10:48:15 +00:00
43873adc90
Merge pull request 'FU-2b: internal case_number reconciliation tooling (GAP-07/08)' ( #15 ) from fix/fu2b-identifier-reconciliation into main
Build & Deploy / build-and-deploy (push) Successful in 1m39s
2026-05-31 08:59:13 +00:00
8477fd87e7
docs(scripts): register fu2b reconciliation script (FU-2b)
2026-05-31 08:58:32 +00:00
e46868feda
feat(fu2b): flag PROC_MISMATCH (case_number prefix vs proceeding_type) for chair
...
Dry-run surfaced 2 rows with בל"מ prefix but proceeding_type=ערר. Since the
migration strips the prefix, a wrong proceeding_type would silently lose the
בל"מ signal — must be chair-adjudicated, not auto-applied. Chair table now
flags 4 rows: 2 DUP_CHECK (8047-23) + 2 PROC_MISMATCH.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 08:57:42 +00:00
ab8d17fdd8
feat(fu2b): chair-gated internal case_number reconciliation script (GAP-07/08)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-31 08:54:38 +00:00
a41fcedc28
test(fu2b): failing tests for bare-number extraction (FU-2b)
2026-05-31 08:52:48 +00:00
c2de69272d
docs(plan): FU-2b identifier-reconciliation implementation plan (chair-gated, TDD)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 08:09:22 +00:00
105d9626ca
docs(spec): FU-2b internal identifier reconciliation design (GAP-07/08) + split external to #68
...
Deterministic migration of ~52 internal_committee rows whose case_number holds
a full citation → normalized bare number (citation_formatted already correct).
DB analysis (2026-05-31): clean 1-token extraction, 0 key-collisions, 0
citation↔case_number mismatches, no month-padding dups. Chair-gated reversible
migration (backup→dry-run→approve→apply). One edge for chair: 8047/23 ערר vs בל"מ.
External (#68/FU-2c) split out — its citation_formatted is inconsistent.
Verified all 11 case_law FKs use id(UUID), not case_number → rename is FK-safe.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 06:12:43 +00:00
fc502a6441
Merge pull request 'FU-3: re-index on content change (GAP-09)' ( #14 ) from fix/fu3-reindex-on-change into main
Build & Deploy / build-and-deploy (push) Successful in 1m37s
2026-05-30 22:13:54 +00:00
7e35a24d80
test(reindex): cover empty-text raise path (FU-3 review)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:13:18 +00:00
7341ee8275
tasks(legal-ai): mark FU-3 ( #61 ) done; 61.1 done, 61.2 cancelled (not-applicable)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:10:27 +00:00
8a0c206ecd
feat(reindex): precedent_reindex MCP tool (GAP-09, FU-3)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 22:09:44 +00:00
f008820ec8
feat(reindex): health-check stale_embedding_case_law count (GAP-09, FU-3)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 22:08:27 +00:00
63abf83e76
test(reindex): fix mark_indexed stub arity in FU-1 fixture (FU-3)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:07:39 +00:00
c8de42150e
test(reindex): stub db.mark_indexed in FU-1/FU-2a ingest fixtures (FU-3 interaction)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:07:18 +00:00
c7c7a1e119
feat(reindex): reindex_case_law from stored text + mark_indexed on ingest (GAP-09, FU-3)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 22:06:17 +00:00
96ae83081f
feat(reindex): V23 content/indexed hashes + helpers + write content_hash (GAP-09, FU-3)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:04:43 +00:00
e522555b1a
test(reindex): failing tests for content-hash re-index (FU-3)
2026-05-30 22:02:16 +00:00
8b3f191c8b
docs(plan): FU-3 re-index on content change implementation plan (6 tasks, TDD)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 22:00:02 +00:00
a62116a571
docs(spec): FU-3 re-index on content change design (GAP-09) + close #61.2 not-applicable
...
content_hash/indexed_hash change detection + reindex_case_law from stored
full_text (no re-OCR) + drift health-check. Verified vs 3+ sources (content-
hash change detection, RAG re-embed-on-edit). #61.2 multimodal backfill closed:
42 rows are text-ingested (document_id NULL, no source PDF) — page-images
impossible without a PDF to render.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:52:40 +00:00
63dc08c963
Merge pull request 'FU-7: audit-trail + provenance (GAP-17/18/19/20)' ( #13 ) from fix/fu7-audit-provenance into main
Build & Deploy / build-and-deploy (push) Successful in 1m36s
2026-05-30 21:43:33 +00:00
9bfb912bdf
fix(audit): _collect_block_sources mirrors None-doc-types (provenance accuracy, FU-7 review)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:40:42 +00:00
d28f7b8398
tasks(legal-ai): mark FU-7 ( #65 ) done; FU-2a ( #60 ) done
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:37:46 +00:00
677f29ddec
feat(audit): blocks_stale drift flag + health-check visibility (GAP-17, FU-7)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 21:36:56 +00:00
7e2f4b2872
feat(qa): citation→corpus resolution as non-blocking warning (GAP-20, FU-7)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:35:24 +00:00
769f5020eb
feat(audit): block→source provenance via write_block audit event (GAP-19, FU-7)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:33:36 +00:00
1f483383b9
feat(audit): log document_upload/extract_claims/export_docx (GAP-18, FU-7)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 21:31:09 +00:00
a121f79d6a
feat(audit): log_action_safe + V22 blocks_stale + citation resolver (FU-7)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 21:29:26 +00:00
bffd2ec701
test(audit): failing tests for audit-trail + provenance (FU-7)
2026-05-30 21:27:54 +00:00
2994a884e9
docs(plan): FU-7 audit-trail + provenance implementation plan (7 tasks, TDD)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:26:30 +00:00
99cd6bc4dd
docs(spec): FU-7 audit-trail + provenance design (GAP-17/18/19/20)
...
Reuse audit_log.log_action with details JSONB (X5 §4, no new table) for
end-to-end audit + block→source provenance. GAP-17 drift = blocks_stale flag
+ health-check (not fragile DOCX→blocks reparse). GAP-20 = structural
case_law_id resolution (not Hebrew citation NLP). Verified vs 3+ sources
(append-only lineage event; GitOps drift detect-don't-auto-remediate).
Pure-code, no migration.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 21:15:50 +00:00
3b758850e0
Merge pull request 'FU-2a: idempotent ingest + write-time normalization + searchable flag (GAP-03/06/13)' ( #12 ) from fix/fu2a-idempotent-ingest into main
Build & Deploy / build-and-deploy (push) Successful in 3m15s
2026-05-30 21:06:32 +00:00
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
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