Commit Graph
440 Commits
Author SHA1 Message Date
robbond e8d401e506 fix(confidence-engine): extract raw openai response text 2026-09-06 11:45:24 +01:00
robbond 0bb2f01100 experiment(confidence-engine): isolate reconstruction observation 2026-09-06 10:31:45 +01:00
robbond 215c783d11 experiment(confidence-engine): complete openai reconstruction apparatus 2026-09-06 10:06:06 +01:00
robbond a45dd903cf experiment(confidence-engine): add alias-capable experiment runtime 2026-09-06 08:29:31 +01:00
robbond 1daf2bb6ce experiment(confidence-engine): expose reconstruction provider seam 2026-09-06 08:01:29 +01:00
robbond 860ee6fc5b experiment(confidence-engine): add openai provider apparatus 2026-09-06 07:50:47 +01:00
robbond 653934559c experiment(confidence-engine): reinforce outcome preservation salience 2026-09-06 07:17:15 +01:00
robbond 5c9f94ca13 experiment(confidence-engine): preserve supplied outcome categories 2026-09-06 07:08:57 +01:00
robbond 726746f22d fix(confidence-engine): extend reconstruction chat timeout 2026-09-06 06:16:36 +01:00
robbond 7070342fb1 fix(confidence-engine): preserve successful chat detection 2026-09-05 19:41:01 +01:00
robbond cd1c6f4fc5 chore(confidence-engine): expose reconstruction fallback path 2026-09-05 19:13:39 +01:00
robbond c7a0a79d0f feat(confidence-engine): constrain reconstruction chat output 2026-09-05 18:44:47 +01:00
robbond 8c5b47bcf5 chore(confidence-engine): upgrade to zod 4 2026-09-05 18:21:15 +01:00
robbond 46b9bd8b03 fix(confidence-engine): retain successful provider path 2026-09-05 17:12:31 +01:00
robbond dabd9e2245 fix(confidence-engine): expose failed provider path 2026-09-05 17:00:33 +01:00
robbond 677f5e5757 fix(confidence-engine): use configured model for chat detection 2026-09-05 16:46:24 +01:00
robbond 8c3edfec7d fix(confidence-engine): log case-start failures 2026-09-05 14:37:29 +01:00
robbond 72324e63c8 fix(confidence-engine): enforce relationship endpoint references 2026-09-05 14:09:25 +01:00
robbond 84fc53f017 fix(confidence-engine): expose reconstruction validation issues 2026-09-05 13:48:48 +01:00
robbond e5de8564a4 fix(confidence-engine): preserve intervention fit dependency 2026-09-05 13:33:01 +01:00
robbond 55e935066c fix(confidence-engine): project unexplained transitions 2026-09-05 13:15:11 +01:00
robbond e1839147b1 fix(confidence-engine): clarify relationship direction 2026-09-05 12:55:39 +01:00
robbond fb49df87aa feat(confidence-engine): expose initial reconstruction evidence 2026-09-05 12:39:17 +01:00
robbond 7472b6ecb0 feat(confidence-engine): preserve initial reconstruction relationships 2026-09-05 11:53:58 +01:00
robbond 13fbceee7a feat(confidence-engine): strengthen initial reconstruction contract 2026-09-05 10:43:57 +01:00
robbond 844ec0eb8c docs(confidence-engine): correct v0.61 experiment 5 closeout 2026-09-04 18:23:02 +01:00
robbond 863f7dcbf2 docs(confidence-engine): record v0.61 repeated decomposition experiment 2026-09-04 18:04:16 +01:00
robbond 65c5ded9ab docs(confidence-engine): restore v0.61 decomposition objective 2026-09-04 17:17:53 +01:00
robbond 6218a3ed6d docs(confidence-engine): correct v0.61 accessibility evidence 2026-09-04 16:51:35 +01:00
robbond 898c3dcaaf docs(confidence-engine): record v0.61 intervention accessibility experiment 2026-09-04 16:32:55 +01:00
robbond 42da768e66 docs(confidence-engine): record v0.61 intervention-fit experiment 2026-09-04 16:11:38 +01:00
robbond 95d9965420 docs(confidence-engine): correct v0.61 experiment interpretation 2026-09-04 16:05:05 +01:00
robbond 580b2a122e docs(confidence-engine): record v0.61 decomposition experiment 2 2026-09-04 15:56:00 +01:00
robbond 642554038e test(confidence-engine): prove direct helper production seam 2026-09-04 14:33:02 +01:00
robbond 928954ee4a test(confidence-engine): verify direct decomposition helper 2026-09-04 14:02:36 +01:00
robbond 41ea2cb6b9 test(confidence-engine): add direct initial decomposition apparatus
Establishes reusable apparatus for asking: given scenario text X,
what structured initial decomposition does current production path produce?

- Direct curl/Postman via existing /api/cases/start route (no new API)
- Thin CJS helper at scripts/start-case-experiment-helper.cjs for Claude
  experiments (imports startCase directly, zero code duplication)
- Zero-live-call verification: all four seam checks confirmed by existing
  tests (cases-start-route.test.js, start-case-summary.test.js)
- No browser state, no persistence mutation, no Investigation ID required
  by the route itself

Files:
  + scripts/start-case-experiment-helper.cjs (new helper script)
  M docs/current-handoff.md (§v0.61 apparatus documentation)
2026-09-04 13:36:25 +01:00
robbond e6f2249413 docs(confidence-engine): close v0.60 multi-investigation work 2026-09-04 12:19:20 +01:00
robbond cc3a5dabd4 feat(confidence-engine): v0.60j preserve investigation on restart 2026-09-04 10:18:22 +01:00
robbond 4bc998ee3f test(confidence-engine): verify v0.60h report identity 2026-09-04 09:34:03 +01:00
robbond 2af5971987 feat(confidence-engine): v0.60h migrate report route to use route [id] identity 2026-09-04 08:17:01 +01:00
robbond df142ca76c feat(confidence-engine): v0.60g2 render investigation portfolio 2026-09-04 07:58:04 +01:00
robbond 7ba1771bcf feat(confidence-engine): v0.60g1 list investigation summaries
Recover to clean v0.60f then implement only the storage listing contract.

- Add listInvestigations() to provider: enumerate by prefix, project lightweight summary (id, scenario, updatedAt, investigationRevision, reportExists, reportGeneratedFromRevision), sort by updatedAt desc
- Add application-facing wrapper in investigation-storage.js
- Add 8 deterministic tests covering all listing invariants (coexistence, correct IDs, lightweight projection, legacy exclusion, unrelated exclusion, independent update, ordering, malformed skip)
- Fix MockStorageMap WebStorage API compatibility (.length + .key(i))
- Portfolio NOT migrated — that is v0.60g2
2026-09-04 06:45:26 +01:00
robbond 4b55ad1eae feat(confidence-engine): v0.60f allocate investigation identity on create
Replace Portfolio's static "+ Create new investigation" link (href:
/investigations/case-1) with a <button> that allocates an opaque
application-owned durable ID via crypto.randomUUID() and navigates
via router.push to /investigations/{id} without persisting any empty
Investigation.

INVESTIGATION_ID constant retained only for card links (Continue
investigation / View report) — not migrated in this increment.

Test: deterministic Create New activation test verifies UUID allocation,
navigation to generated ID route, and zero saveInvestigation calls.
2026-09-03 19:20:28 +01:00
robbond 01e141aa66 feat(confidence-engine): v0.60e route investigation identity
Migrate the Investigation page route to own durable investigation identity
via its route [id] segment, passing that ID through to ScenarioForm for
hydration and persistence.

- Remove hardcoded INVESTIGATION_ID constant from page.jsx
- Use params.id as routeId; loadInvestigation(routeId) loads by identity
- Pass investigationId prop into ScenarioForm in both branch paths
- Session restore calls loadInvestigation(investigationId)
- All 4 save call sites include id: investigationId in snapshot
- Missing identified Investigation starts clean (no singleton fallback)
- Legacy singleton is not migrated/fallback-loaded
- Portfolio remains unmigrated; Report remains unmigrated; Restart untouched

Deterministic tests: 34/34 pass (scenario-form-persistence + investigation-storage)
Build: PASS
Live Playwright: all criteria verified at /investigations/v060e-live
2026-09-03 19:02:37 +01:00
robbond 827411f254 refactor(confidence-engine): v0.60d clarify investigation storage identity
Replace bare re-export in investigation-storage.js with explicit wrapper
functions that own the canonical identity contract: snapshot.id is the sole
save identity authority. The provider never allocates or changes IDs.

7 new deterministic tests prove: identified snapshots persist under their
own id key, explicit competing id arguments are ignored, A/B remain
independently addressable, unknown IDs return null, and legacy singleton
compatibility is preserved for unmigrated callers.

No application callers modified. UI/routes not migrated.
2026-09-03 18:29:00 +01:00
robbond 8c85120b1c feat(confidence-engine): v0.60c identity-aware investigation storage
- loadInvestigation(id) selects by durable ID when provided, null for unknown
- saveInvestigation(snapshot, id) persists under provider-chosen key derived from id
- clearInvestigation(id) removes specific investigation by identity when provided
- localStorage representation: confidence-engine-investigation:<durable-id>
- Backward-compatible singleton path preserved for existing unmigrated callers
- 6 new targeted tests proving two independently addressable Investigations
2026-09-03 18:09:03 +01:00
robbond f23d442eb3 docs(confidence-engine): resolve v0.60 investigation creation ownership 2026-09-03 17:44:17 +01:00
robbond 06a200bb03 docs(confidence-engine): define v0.60 investigation storage contract 2026-09-03 17:35:55 +01:00
robbond f06138de32 feat(confidence-engine): v0.59b-c — report freshness on Report page + Portfolio
v0.59b — Report page freshness UI:
- Shows Current / Update available beside the generated report
- Manual Update report action with duplicate prevention guard
- Explanation copy about investigation changes since generation
- Persists generatedFromRevision during update flow

v0.59c — Portfolio Report freshness state:
- Surfaces Current / Update available alongside existing View report link
- Derives solely from revision provenance (zero model calls)
- No Update report action on Portfolio (manual update owned by Report page)
- Neither state shown when no Report exists
- Updated makeSnapshot with investigationRevision for realistic test data
2026-09-03 14:41:02 +01:00
robbond 99b3d26817 feat(confidence-engine): v0.59a — correct Investigation revision provenance
Semantic revision tracking ensures every meaningful persisted
Investigation change advances investigationRevision exactly once,
while Report generation records (but does not advance) the current
revision as generatedFromRevision for provenance integrity.

Corrections:
- updateFindingDisposition: add setInvestigationRevision(+1) for
  semantic transitions (eligible→not_relevant, restore)
- updateFindingProposition: add no-op guard + setInvestigationRevision(+1)
- onRestart/ContinueLaterBanner/reset button: add setInvestigationRevision(0)
- onSituationGraphChange (Re-open seam): already had revision +1 in dirty impl

Established behaviour preserved:
- Re-open via reopenResolvedUnknown → onSituationGraphChange → revision +1
- Empty Done via handleDoneForNowPromotion → revision +1
- Report generation records generatedFromRevision, advances by 0
- Autosave passes revision but does not increment it
- clearInvestigation() ownership intact

Tests: targeted Vitest suite (17 tests) covering all provenance boundaries.

Durable rule documented in current-handoff.md §v0.59a.
2026-09-03 13:39:40 +01:00