Implement EANCH-WP-0002 and EANCH-WP-0003 anchor hardening and DOM selectors
All checks were successful
CI Smoke / host-smoke (push) Successful in 4s
CI Smoke / container-smoke (push) Successful in 31s

WP-0002: stale vs unresolved resolution, orphaned flag/helper, bounded
fuzzy quote recovery, and PdfViewerAdapter promotion with resolveSelectors
integration. WP-0003: DomSelectionCapture, DOM create/resolve ladder,
HtmlViewerAdapter under evidence-anchor/dom, and finished workplans.

Verification: 42 anchor tests, citation-evidence typecheck + 51 tests green.
This commit is contained in:
tegwick 2026-07-09 09:18:42 +02:00
parent e4582b52fa
commit a1af0c6a45
22 changed files with 1118 additions and 105 deletions

View file

@ -4,11 +4,11 @@ type: workplan
title: "Anchor resolution hardening: stale/orphan semantics, fuzzy re-anchoring, production PDF adapter"
domain: infotech
repo: evidence-anchor
status: proposed
status: finished
owner: codex
topic_slug: citation_evidence_mvp
created: "2026-07-08"
updated: "2026-07-08"
updated: "2026-07-09"
spec_refs:
- INTENT.md
- SCOPE.md
@ -48,7 +48,7 @@ Current extracted behavior (`src/selectors/resolve.ts`):
```task
id: EANCH-WP-0002-T01
status: todo
status: done
priority: high
state_hub_task_id: "940b03ba-4b2f-4d1a-b7bc-72813817549d"
```
@ -63,7 +63,7 @@ quote/context on the result. Add unit tests covering stale vs. unresolved.
```task
id: EANCH-WP-0002-T02
status: todo
status: done
priority: medium
depends_on: [T01]
state_hub_task_id: "f75b94cd-bfb8-47f9-bd89-0d605f925290"
@ -78,7 +78,7 @@ enum unchanged unless a contract change is agreed in the umbrella wiki first.
```task
id: EANCH-WP-0002-T03
status: todo
status: done
priority: high
depends_on: [T01]
state_hub_task_id: "8548fa44-5bb3-40cf-b8f8-e745deae7dda"
@ -95,7 +95,7 @@ floor.
```task
id: EANCH-WP-0002-T04
status: todo
status: done
priority: medium
depends_on: [T03]
state_hub_task_id: "6a7163f5-39ca-48fa-8941-8459c563198f"
@ -110,7 +110,7 @@ umbrella green through the change. Update `evidence-anchor/pdf` exports and docs
```task
id: EANCH-WP-0002-T05
status: todo
status: done
priority: high
depends_on: [T02, T04]
state_hub_task_id: "1ea0885a-c541-438f-a4fd-b8be0773b373"
@ -118,3 +118,8 @@ state_hub_task_id: "1ea0885a-c541-438f-a4fd-b8be0773b373"
`pnpm test`/`typecheck`/`lint` green here; umbrella typecheck/test/build green
after any contract-visible change; `fix-consistency` clean; progress note.
**Verification (2026-07-09):**
- `evidence-anchor`: 42 tests (9 files), typecheck + lint clean.
- `citation-evidence`: typecheck clean, 51 integration tests passed.

View file

@ -4,11 +4,11 @@ type: workplan
title: "Non-PDF selectors: HTML/Markdown DOM range + structural anchoring"
domain: infotech
repo: evidence-anchor
status: proposed
status: finished
owner: codex
topic_slug: citation_evidence_mvp
created: "2026-07-08"
updated: "2026-07-08"
updated: "2026-07-09"
spec_refs:
- INTENT.md
- SCOPE.md
@ -47,7 +47,7 @@ enum — coordinate contract changes in the umbrella wiki first.
```task
id: EANCH-WP-0003-T01
status: todo
status: done
priority: high
state_hub_task_id: "de7df94f-2ddf-4920-949e-6e693131a9de"
```
@ -61,7 +61,7 @@ Land this in the engine + `SharedContracts.md` before writing anchor behavior.
```task
id: EANCH-WP-0003-T02
status: todo
status: done
priority: high
depends_on: [T01]
state_hub_task_id: "aa1bc68d-c15a-41e0-813d-c4ccec4914c9"
@ -75,7 +75,7 @@ DOM selection. Add unit tests mirroring the PDF create tests.
```task
id: EANCH-WP-0003-T03
status: todo
status: done
priority: high
depends_on: [T02]
state_hub_task_id: "2bdedc91-1ed2-41ed-b4a0-a9a0d7a6b4b0"
@ -90,7 +90,7 @@ re-render stability (structural fallback when offsets shift).
```task
id: EANCH-WP-0003-T04
status: todo
status: done
priority: medium
depends_on: [T03]
state_hub_task_id: "286267fe-d348-4494-bbe2-dd7818bcadbd"
@ -105,7 +105,7 @@ to that boundary.
```task
id: EANCH-WP-0003-T05
status: todo
status: done
priority: high
depends_on: [T04]
state_hub_task_id: "9ff39c83-eca8-46a1-9b28-8a728ddf220d"
@ -114,3 +114,8 @@ state_hub_task_id: "9ff39c83-eca8-46a1-9b28-8a728ddf220d"
Package green (`pnpm test`/`typecheck`/`lint`); engine contract change verified
in `citation-engine`; any umbrella consumer green; `fix-consistency` clean;
progress note.
**Verification (2026-07-09):**
- `citation-engine`: DomRange/Structural types + StructureMap promoted; 89 tests passed.
- `evidence-anchor`: DOM create/resolve + `evidence-anchor/dom` export; 42 tests passed.