Skip to content

Commit bb7760c

Browse files
committed
docs: replan — archive Phase 18 audit dashboard, refine remaining checks
- Phase 18 foundation, issue-resolution engine, and Audit Dashboard UI all confirmed complete in code; archived to DONE.md - 'Next Up' #3 now scopes the remaining auditor checks (place_mismatch, name_mismatch, missing_parents, duplicate_suspect, stale_record) — types are declared but walker isn't wired - Add auditor-agent.service.ts (1233 lines) to god-file regression list - Replace stale 'adopt buildLifespan' DRY item with the one remaining duplicate (sync.service.ts)
1 parent 346fe4c commit bb7760c

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

DONE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Completed items archived from PLAN.md. For per-version release notes see `.chang
44

55
## 2026-04-28
66

7+
- **Phase 18 foundation (AI Tree Auditor)**`audit_run` / `audit_issue` / `audit_change` schema (migration 007), BFS walker with cursor serialization (pause/resume/cancel), SSE progress endpoint. Structural checks live: `impossible_date`, `parent_age_conflict`, `placeholder_name`, `missing_gender`, `orphaned_edge`, `unlinked_provider` (chain-aware), `date_mismatch`. Auto-run migrations on server startup.
8+
- **Phase 18 issue resolution engine** — accept / reject / undo with `audit_change` log; bulk operations via REST API.
9+
- **Phase 18 Audit Dashboard UI** — full audit page with issue list/filters, tree view with severity overlays, per-person `PersonAuditIssues` panel, audited/unaudited overlay, hint severity tier (gray + HelpCircle).
710
- **Phase 19.4 (initial pass)** — Place normalization (USA vs United States, UK vs Great Britain, US state abbreviations) before flagging differences. New `server/src/utils/normalizePlace.ts` + tests.
811

912
## 2026-04-25

PLAN.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ For phase-by-phase implementation history, see [docs/roadmap.md](./docs/roadmap.
88

99
## Next Up
1010

11-
1. **Reverse god-file regression**`PersonDetail.tsx` (1360), `ProviderDataTable.tsx` (1243), `database.service.ts` (1446), `multi-platform-comparison.service.ts` (1099), `api.ts` (1249), `VerticalFamilyView.tsx` (977), `favorites.service.ts` (872), `person.routes.ts` (965). Decomposition has *grown* since the audit, despite recent DRY work. Extract `usePersonData` / `usePersonOverrides` hooks, `PhotoThumbnail` / `ComparisonCell` / `ProviderRow` sub-components, and split `database.service.ts` along entity lines.
12-
2. **Critical-path unit tests**`credentials.service.ts` (encryption), `validation.ts` (input sanitization), `errorHandler.ts`, `requestTimeout.ts`, `database.service.ts`, `search.service.ts`, `augmentation.service.ts` all currently have **zero** tests.
13-
3. **Phase 18 foundation (AI Tree Auditor)**schema migration (`audit_run`, `audit_issue`, `audit_change`), structural-only checks (date logic, parent-age, placeholder names, missing gender), and SSE progress endpoint. Coverage + reconciliation checks come after.
11+
1. **Reverse god-file regression**`PersonDetail.tsx` (1360), `ProviderDataTable.tsx` (1243), `database.service.ts` (1446), `auditor-agent.service.ts` (1233 — new), `multi-platform-comparison.service.ts` (1099), `api.ts` (1249), `VerticalFamilyView.tsx` (977), `favorites.service.ts` (872), `person.routes.ts` (965). Extract `usePersonData` / `usePersonOverrides` hooks, `PhotoThumbnail` / `ComparisonCell` / `ProviderRow` sub-components, and split `database.service.ts` along entity lines. Split `auditor-agent.service.ts` into walker + per-check modules.
12+
2. **Critical-path unit tests**`credentials.service.ts` (encryption), `validation.ts` (input sanitization), `errorHandler.ts`, `requestTimeout.ts`, `database.service.ts`, `search.service.ts`, `augmentation.service.ts`, `auditor-agent.service.ts` all currently have **zero** tests.
13+
3. **Phase 18 remaining checks**implement `place_mismatch`, `name_mismatch`, `missing_parents`, `duplicate_suspect`, `stale_record` checks in `auditor-agent.service.ts` (types are declared in `shared/src/index.ts:918` but not yet wired). Reuse `multi-platform-comparison.service.ts` for the `*_mismatch` family.
1414
4. **Search N+1**`searchWithSqlite` still calls `getPerson()` per result inside `Promise.all`. Replace with a single `WHERE person_id IN (...)` batch query.
1515
5. **Phase 19 Guided Verification** — review-session schema (`verification_session`, `person_review`, `edge_review`, `provider_match_review`, `review_decision`) and root-to-ancestor BFS review queue (19.1 + 19.2).
1616

@@ -38,7 +38,7 @@ For phase-by-phase implementation history, see [docs/roadmap.md](./docs/roadmap.
3838
- [ ] Extract shared `PROVIDER_COLORS` / display constants to one module — currently duplicated across `IntegrityPage`, `TreeStatsPage`, `GenealogyProviders`.
3939
- [ ] Extract `useBrowserStatusSSE()` and `useBrowserActions()` hooks (duplicated in `IndexerPage`, `GenealogyProviders`, `BrowserSettingsPage`).
4040
- [ ] Extract `<OutputConsole>` and `<GoogleIcon>` components.
41-
- [ ] Adopt `buildLifespan()` utility (exists in `server/src/utils/lifespan.ts` but not wired anywhere) and remove the 5 duplicates in `favorites.service.ts` / `database.service.ts`.
41+
- [ ] Remove the last `buildLifespan` duplicate in `sync.service.ts:200,393,400` (other call sites now use `server/src/utils/lifespan.ts`).
4242
- [ ] Merge `registerExternalIdentityIfEnabled` and `registerProviderMappingIfEnabled` into one helper.
4343
- [ ] Replace per-platform `linkWikipedia/linkAncestry/linkWikiTree/linkLinkedIn` in `client/src/services/api.ts` with generic `linkPlatform(personId, platform, url)`.
4444
- [ ] Standardize route error handling on `asyncHandler``person.routes.ts` still uses ad-hoc `.catch(next)` (lines 69, 131, 146).
@@ -56,12 +56,11 @@ For phase-by-phase implementation history, see [docs/roadmap.md](./docs/roadmap.
5656
- [ ] Cross-platform ID linking with matching heuristics.
5757
- [ ] Conflict resolution UI with per-field value selection.
5858

59-
### Phase 18: AI Tree Auditor (after foundation)
59+
### Phase 18: AI Tree Auditor (remaining)
6060

61-
- [ ] Coverage + reconciliation checks (cross-provider data comparison via existing `multi-platform-comparison.service.ts` patterns).
62-
- [ ] Stale record refresh.
63-
- [ ] Issue resolution engine — accept/reject/undo with `audit_change` log.
64-
- [ ] Audit Dashboard UI with run control panel, issue queue, change log, health score.
61+
- [ ] Implement remaining declared checks: `place_mismatch`, `name_mismatch`, `missing_parents`, `duplicate_suspect`, `stale_record` (types declared, walker not wired).
62+
- [ ] Stale record refresh action — re-pull from provider when `stale_record` issue is accepted.
63+
- [ ] Health score on Audit Dashboard (issue density per generation, trend across runs).
6564

6665
### Phase 19: Guided Verification (remaining sub-phases)
6766

0 commit comments

Comments
 (0)