test(confidence-engine): preserve focused investigation evidence seam
This commit is contained in:
@@ -311,8 +311,8 @@ assert(helperSrc.includes("resolvedNodeIds.add(targetNodeId)") || helperSrc.incl
|
||||
// E5. Post-episode graph feeds CU synthesis: verified by composeDeepInvestigationCheckpoint's Step 2
|
||||
assert(helperSrc.includes("synthesizeCurrentUnderstanding"), "helper invokes synthesizeCurrentUnderstanding for CU synthesis");
|
||||
|
||||
// E6. Prior + appended Findings accumulated exactly once for CU synthesis
|
||||
assert(helperSrc.includes("postEpisodeFindings = [...priorFindings, ...accumulatedEpisodes]"), "findings accumulation: prior + appended concatenated exactly once");
|
||||
// E6. Prior + derived from Contribution + appended Findings accumulated exactly once for CU synthesis
|
||||
assert(helperSrc.includes("postEpisodeFindings = [...priorFindings, ...newFindingsFromContributions, ...accumulatedEpisodes]") || helperSrc.includes("postEpisodeFindings : [...priorFindings, ...newFindingsFromContributions, ...accumulatedEpisodes]"), "findings accumulation: prior + derived from Contribution + appended concatenated exactly once");
|
||||
|
||||
// E7. Next graph returned via updatedSituationGraph in checkpoint object
|
||||
assert(helperSrc.includes("updatedSituationGraph: updatedGraph") || helperSrc.includes("updatedSituationGraph : updatedGraph"), "updatedSituationGraph returned in checkpoint output");
|
||||
@@ -323,5 +323,39 @@ assert(helperSrc.includes("postEpisodeFindings: postEpisodeFindings"), "postEpis
|
||||
// E9. Provider-call accounting preserved (existing behavior)
|
||||
const extractResult = extractLiveExperimentCheckpoint(successResult(123, 456), successParams);
|
||||
assert(extractResult.providerGenerateCalls === 1, "providerGenerateCalls preserved from extraction path");
|
||||
|
||||
// ---- CONTRIBUTION SEAM VERIFICATION (Iteration 4) ──────────────────────
|
||||
console.log("\n=== CONTRIBUTION SEAM VERIFICATION ===\n");
|
||||
|
||||
// C1. composeDeepInvestigationCheckpoint accepts contributions parameter (defaults to [])
|
||||
assert(composeDeepInvestigationCheckpoint.length >= 1, "composeDeepInvestigationCheckpoint accepts at least 1 param (contributions default)");
|
||||
|
||||
// C2. Production parity: helper derives Contribution from answer when not supplied
|
||||
assert(helperSrc.includes("_deriveContributionFromAnswer"), "helper has _deriveContributionFromAnswer (mirrors production appendFocusedContribution)");
|
||||
|
||||
// C3. Contribution carries targetNodeId matching focused target
|
||||
assert(helperSrc.includes("targetNodeId: targetNodeId") || helperSrc.includes("targetNodeId : targetNodeId"), "Contribution derives targetNodeId from focused target");
|
||||
|
||||
// C4. Contribution fields match production shape
|
||||
assert(helperSrc.includes("observations:") && helperSrc.includes("answer:"), "Contribution includes observations and answer fields (production shape)");
|
||||
|
||||
// C5. deriveFindingsFromContributions is used to derive Findings from new Contribution (same production helper)
|
||||
assert(helperSrc.includes("deriveFindingsFromContributions"), "helper reuses produce deriveFindingsFromContributions for Finding derivation");
|
||||
|
||||
// C6. Effective contributions passed to prepareCompletedEpisode (not empty array)
|
||||
assert(helperSrc.includes("contributions: effectiveContributions") || helperSrc.includes("contributions : effectiveContributions"), "helper passes effectiveContributions to prepareCompletedEpisode (not empty)");
|
||||
|
||||
// C7. Post-episode graph feeds CU synthesis
|
||||
assert(helperSrc.includes("synthesizeCurrentUnderstanding"), "CU synthesis receives updated graph for full accumulated findings");
|
||||
|
||||
// C8. postEpisodeFindings includes prior + derived from new Contribution + appended episodes (exactly-once)
|
||||
assert(helperSrc.includes("newFindingsFromContributions"), "postEpisodeFindings includes newly derived Findings from Contribution");
|
||||
|
||||
// C9. next Contributions returned in checkpoint for longitudinal Episode N+1 state feeding
|
||||
assert(helperSrc.includes("postEpisodeContributions: effectiveContributions") || helperSrc.includes("postEpisodeContributions : effectiveContributions"), "postEpisodeContributions returned in checkpoint");
|
||||
|
||||
// C10. Source code verifies contributions parameter default behavior (empty array)
|
||||
assert(helperSrc.includes("contributions = []"), "contributions defaults to empty array when not supplied");
|
||||
|
||||
console.log("\n--- Total failures: " + failures + " ---\n");
|
||||
process.exit(failures > 0 ? 1 : 0);
|
||||
Reference in New Issue
Block a user