Commit Graph
496 Commits
Author SHA1 Message Date
robbond 0698a1a61e feat(confidence-engine): add saveFocusedInvestigationEvidence persistence operation (Experiment 8)
Add exported saveFocusedInvestigationEvidence(checkpoint, identity, metadata,
outputPath) to the canonical experiment helper. Validates output path, exactly
one valid deconstruction contribution, required identity fields, and exact input
values. Writes formatted JSON, reads back, verifies deep structural equality.
Rejects ambiguous checkpoints instead of silently selecting a contribution.

Deterministic test covers: positive file write, structured evidence completeness,
input fidelity, identity fidelity, return values, missing path rejection, missing
contribution rejection, ambiguous contribution rejection. All OS temp files cleaned
in finally blocks.

Zero live model calls. Zero browser calls. No production code modified.
2026-10-09 14:33:33 +01:00
robbondandClaude Code aa57d8589c feat(confidence-engine): verify disk persistence of focused-investigation evidence serializer (Experiment 7, Iteration 7)
Extended deterministic test to write serialized evidence record to
OS temp directory, read back from disk, parse JSON, and assert deep
structural equality. Verified: five structured arrays preserved with
correct lengths; exact inputs unchanged; identity fields intact; null
metadata fields survive round-trip. Temp file cleaned in finally block.

Zero live model calls. Zero browser calls. No production code or
canonical-helper modifications. Experiment 4 original structured
output remains unavailable.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: robbond <rob@rdbsolutions.co.uk>
2026-10-09 14:29:36 +01:00
robbond 7d7a9e8d29 feat(confidence-engine): add serializeFocusedInvestigationEvidence evidence serializer and deterministic test
Apparatus-level pure serialization function that preserves all five
focused-deconstruction arrays (observations, uncertainties, assumptions,
relationships, possibleFollowUpQuestions) plus exact inputs and execution
metadata from the existing checkpoint — without modifying production code.

Deterministic verification: syntax check pass, 79/79 assertions pass
(including 28 new evidence-ser tests), zero live calls.

Experiment 4's missing structured output cannot be reconstructed (never
persisted by the apparatus). No new semantic evidence produced.
2026-10-09 14:25:26 +01:00
robbond 7fd05745e8 feat(confidence-engine): record Experiment 4 synthetic HS-03C focused investigation results — PARTIAL fidelity, semantic narrowing observed
Controlled synthetic experiment (Iteration 4): fixed recruitment scenario with
synthetic answer showed partial preservation of the broader feasibility uncertainty.
The model correctly preserved timing estimates as observations but narrowed the
investigation to hiring pipeline logistics rather than cross-area launch feasibility.
2026-10-09 14:12:35 +01:00
robbondandClaude Code d12615075d feat(confidence-engine): expose focused-investigation inputs in composed checkpoint
Add focusedInvestigationInput {targetDescription, question, answer} to
composeDeepInvestigationCheckpoint() return object. These are the actual
invocation values: targetDescription from situationGraph node, question
is previousQuestion (NOT node.openQuestion), answer is function param.

Deterministic verification: syntax check passed; source-inspection test
assertions E10/E11 added and pass (0 failures). Call-count ownership:
up to 3 live generateReconstruction calls (focusedDeconstruct +
reconsiderCompletedEpisode + synthesizeCurrentUnderstanding).

No provider, graph, or production behavior changed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-09 13:47:54 +01:00
robbond d0f357877d feat(confidence-engine): present canonical uncertainty description as initial display
Changed the facilitator-view-adapter to prefer node.description over
node.openQuestion for unresolved unknown items. This is a reversible
presentation change only — graph identity, reasoning-state ownership,
openQuestion generation, and resolved-unknown presentation are unchanged.

Owning test assertions updated to reflect new display contract:
- open-question-presentation.test.js: assertion target shifts from
  question text to description text
- facilitator-view-adapter.test.js: deduplication tests use distinct
  descriptions so nodes remain distinguishable after the change

Documentation: hypothesis experiment record and handoff return note.
2026-10-09 11:37:43 +01:00
robbond b71e3a8267 docs(confidence-engine): record uncertainty-led investigation hypothesis 2026-10-09 10:26:49 +01:00
robbondandClaude Code 35a6303ce8 test(confidence-engine): enable longitudinal synthesis checkpoint selection
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 10:49:51 +01:00
robbondandClaude Code 57c88b713a test(confidence-engine): establish longitudinal synthesis checkpoints
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 10:33:59 +01:00
robbondandClaude Code 8d9df8c939 test(confidence-engine): expose current understanding experiment output
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 10:16:34 +01:00
robbondandClaude Code ce7df91a42 test(confidence-engine): enable live current understanding experiment execution
Extend the CU synthesis experiment helper with a --live flag that
uses the production provider (getProvider from lib/llm/provider.js)
for live model invocation. Preserves deterministic mode unchanged.

Adds 10 new deterministic tests verifying live-mode wiring via
injected mock provider: fixture pass-through, single invocation,
schema correctness, immutability, persistence safety, and regression
of existing deterministic behaviour. Zero network calls in all tests.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 09:59:03 +01:00
robbondandClaude Code 425e1e7805 test(confidence-engine): capture original current understanding regression fixture
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 09:52:57 +01:00
robbondandClaude Code dd875b5535 test(confidence-engine): add current understanding synthesis experiment helper
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-08 09:49:09 +01:00
robbond 97c7482177 docs(confidence-engine): checkpoint report learning semantics 2026-10-02 17:20:29 +01:00
robbond 30648ca5b3 docs(confidence-engine): checkpoint plausible zero-state verification 2026-10-02 07:12:36 +01:00
robbond 8dc6e58d43 docs(confidence-engine): checkpoint verified three-part report 2026-10-01 17:13:10 +01:00
robbond 7c1d657761 docs(confidence-engine): record product-launch epistemic A/B result — 4-iteration loop complete
Controlled A/B (zero-Findings scenario, Qwen): unresolved uncertainty exposure
did not contaminate supported understanding or plausible interpretation.
No production changes. No report semantic changes.
2026-09-30 17:22:52 +01:00
robbond cf09a72739 feat(confidence-engine): add --variant hidden|visible to overview experiment helper for controlled A/B
- Helper now supports --variant visible which appends unresolved Open Questions
  as a separate NON-EVIDENCE section to the baseline prompt (built via production
  buildOverviewSynthesisPrompt)
- Default (--variant hidden, or no flag) remains production path
- No production code changed; apparatus-only extension
- Deterministic A/B control proven by existing 34/34 test suite
2026-09-30 17:20:28 +01:00
robbond 9a56176323 fix(confidence-engine): supply overview-specific output schema to generateReconstruction
synthesizeInvestigationOverview() called provider.generateReconstruction(prompt, modelName)
without an output contract. Without a structured-output schema the provider defaults to its
initial-reconstruction format which lacks { understanding, plausibleInterpretations }, causing
'Missing or invalid required fields' validation failure.

Add overviewOutputSchema (JSON-schema matching validateOverviewResponse contract) and pass as
third argument, matching the proven pattern in synthesizeCurrentUnderstanding().

53/53 tests PASS. Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-30 17:05:47 +01:00
robbond 6d9a7e7603 test(confidence-engine): add canonical overview experiment helper 2026-09-30 16:14:59 +01:00
robbond 3d0c90e64c fix(confidence-engine): unwrap overview provider response
Production: synthesizeInvestigationOverview() now passes providerResult.response
to validateOverviewResponse() instead of the raw envelope, matching the proven
pattern in current-understanding-synthesis.js.

Regression: fakeProvider returns real-provider envelope shape { response, providerApiPath }
and four new regression tests verify unwrapping succeeds with valid response
and fails correctly with invalid response inside the envelope.

Handoff: documented defect confirmed, fix applied, and owning regression added.
2026-09-30 16:06:14 +01:00
robbond 8d268efb12 test(confidence-engine): support zero-finding report experiment case
- Add nullish coalescing on fix.findings ?? [] so absent findings
  array in a fixture is represented as zero Findings [] for the A/B
  input apparatus.

- Append product-launch second controlled case (live-product-launch-
  start-response.json) with zero Findings to the epistemic comparison
  test suite. All 34 tests pass deterministically.

- Update docs/current-handoff.md to record the zero-Findings case.
2026-09-30 13:25:22 +01:00
robbondandClaude Code d387b66c03 test(confidence-engine): clarify controlled report experiment boundary
Retained deterministic input-control test proving that A/B apparatus
correctly holds supportedEvidence, findings, plausibleInterpretations,
scenarioState, and providerConfig constant while only varying unresolved
question visibility. Added buildOverviewSynthesisPrompt identity proof
that full vs filtered graph produce identical prompt text.

Corrected handoff semantics: deterministic input filtering does NOT prove
model output behaviour; live two-call semantic comparison remains required.
Preserved prior imperfect live evidence with correct qualification about
uncontrolled plausibleInterpretations divergence.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-30 12:30:36 +01:00
robbondandClaude Code ada83de1db test(confidence-engine): control report epistemic comparison inputs
Deterministic test (17 cases) proves A/B inputs are correctly controlled:
- supportedEvidence identical in A and B
- findings identical in A and B
- plausibleInterpretations identical (fixed canonical interpretation) in A and B
- scenarioState identical in A and B
- providerConfig identical in A and B
- only unresolvedQuestions visibility differs (A=hidden, B=canonical)
- unresolved questions excluded from evidence and plausible interpretations
- fixed interpretation carries NON-EVIDENCE epistemic status

Also corrects Loop 2 documentation to reflect that three-category
invariance was NOT established (plausibleInterpretations differed
between calls despite identical input), retaining only the narrower
valid finding: no unresolved Open Question was promoted to evidence.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-30 11:44:51 +01:00
robbond 2dc1cb0fe6 docs(confidence-engine): record tester readiness findings 2026-09-11 10:34:53 +01:00
robbond 2349ef9d59 docs(confidence-engine): close pre-tester security review 2026-09-10 14:21:10 +01:00
robbond a6796c6f73 fix(confidence-engine): bound focused investigation input 2026-09-10 13:23:39 +01:00
robbond 2cb2d556fd fix(confidence-engine): sanitize reasoning error responses 2026-09-10 11:39:13 +01:00
robbond b9d49ff277 fix(confidence-engine): correct legal footer layout 2026-09-10 06:40:30 +01:00
robbond 27ded883e5 feat(confidence-engine): add tester legal pages 2026-09-10 06:18:28 +01:00
robbond ed033e71d5 fix(confidence-engine): sanitize focused reasoning outage 2026-09-09 17:34:56 +01:00
robbond 4d78c81773 fix(confidence-engine): prioritise mobile sign-in 2026-09-09 14:20:27 +01:00
robbond efdb0a29d1 docs(confidence-engine): record first-time framing increment 2026-09-09 14:04:36 +01:00
robbond fdb6c86ee2 docs(confidence-engine): checkpoint deployed product platform 2026-09-09 13:37:03 +01:00
robbond 2c535080d2 build(confidence-engine): add manual Jenkins deployment 2026-09-09 12:44:55 +01:00
robbond e6c78f87fe build(confidence-engine): add production container packaging 2026-09-09 06:35:15 +01:00
robbond d6df1d210e feat(confidence-engine): use server investigation persistence 2026-09-08 19:21:05 +01:00
robbond 6dd447e56a feat(confidence-engine): add authenticated investigation persistence 2026-09-08 17:15:46 +01:00
robbond b949eea831 feat(confidence-engine): define investigation persistence schema 2026-09-08 16:56:07 +01:00
robbond 30bf44f2e5 feat(confidence-engine): establish authenticated product boundary 2026-09-08 16:30:07 +01:00
robbond 24d9e466f6 docs(confidence-engine): checkpoint commercially testable product loop 2026-09-08 10:40:21 +01:00
robbond 0b5a38f83d fix(confidence-engine): persist done-for-now episode closure 2026-09-07 18:36:38 +01:00
robbond 7af708159e docs(confidence-engine): record Terra journey boundary fixes 2026-09-07 15:51:18 +01:00
robbond 7548a6af59 fix(confidence-engine): supply synthesis output schema 2026-09-07 13:44:57 +01:00
robbond 3f2e2e05ae fix(confidence-engine): define focused relationship contract 2026-09-07 13:28:38 +01:00
robbond 14630cf6b7 experiment(confidence-engine): trace focused deconstruction failures 2026-09-07 13:08:08 +01:00
robbond 0cbe49913e experiment(confidence-engine): trace live openai schema boundary 2026-09-07 12:51:13 +01:00
robbond 0d27d4935b fix(confidence-engine): enforce openai strict object invariants 2026-09-07 12:22:03 +01:00
robbond e289f0be1f fix(confidence-engine): handle propertyless openai object schemas 2026-09-07 10:59:28 +01:00
robbond 0eadef6e3b fix(confidence-engine): honor openai alternate output schema 2026-09-07 10:18:41 +01:00