Skip to content

memory: audit final informational views and capture request evidence - #3293

Merged
Hillary Mutisya (hillary-mutisya) merged 3 commits into
mainfrom
memory/prompt-quality-and-evaluation
Nov 19, 2026
Merged

Hillary Mutisya (hillary-mutisya) merged 3 commits into
mainfrom
memory/prompt-quality-and-evaluation

Conversation

@hillary-mutisya

@hillary-mutisya Hillary Mutisya (hillary-mutisya) commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Require field-level factual support for the exact Wiki or project brief being accepted or published, including merged human edits. A candidate-level approval or a Boolean editorial verdict is not a substitute for checking the delivered artifact.

Behavior

  • Audit factual fields, typed details, coverage statements and relationship assertions against original indexed fragments. Canonical field/span IDs bind diagnostics to exact output text.
  • Allow one malformed-checker-contract retry and one factual artifact repair, then recheck the actual output. Provider failures, cancellation and repeated rejection remain explicit failures.
  • Apply the same proof requirements to construction, maintenance, consolidation, separation destinations, manual saves, conflict resolution and publication. Preserve protected content and multi-section consolidation structure. Rejected separation children cannot become accepted; restart reuses only proof-backed accepted children.
  • Bind project citations to individual section roles instead of spreading aggregate citations across unrelated sections. Keep temporal qualifications and project, incident, capacity and decision states distinct without turning internal inference rules into extra source claims.
  • Capture physical request attempts, results, usage and reservations when explicitly enabled. Add frozen schedule execution, interrupted-checkpoint reconciliation and reviewed measurement/release contracts. Bind citation aliases to the exact captured construction request and score topic hierarchy edges using production node identities.

Compatibility and operational considerations

  • Preserve the current choice-only Wiki decisions, accepted-article semantic review and planning-recovery behavior.
  • Injected adapters must supply the complete informational-support-v1 report. The optional repairInformationalSupport hook is separate from editorial repair; an old Boolean approval cannot bypass factual checking.
  • Keep the nested project citation wire format and nullable no-gap representation. Legacy injected responses with separate per-role citation bindings are supported; aggregate-only responses are rejected.
  • Existing content remains readable. Saving or publishing an artifact without its exact support proof requires validation or rebuilding.
  • Factual checking adds model work and remains subject to existing request limits. A model assessment is not a guarantee of truth.
  • Request capture is opt-in and contains source-bearing payloads. Treat retained captures as source data; execution requires explicit authorization and owned output roots. Missing usage or cost stays unknown.

Reviewer map

  1. informationalSupport.ts, viewSynthesis.ts, viewSynthesisSchemas.ts: audit inventory, diagnostic binding and bounded repair.
  2. viewBuilds.ts, fileMemoryService.ts, viewStore.ts, viewPublication.ts: final-output checking and write/publication invariants.
  3. informationalProject.ts, informationalWiki.ts: exact citation attribution and construction contracts.
  4. aiclient/requestBudget.ts, aiclient/restClient.ts, viewExamples: dispatch accounting and explicit capture.
  5. tools/memory-maintenance-qualification/quality-*.mjs: evidence-bound scoring, interrupted execution and reviewed comparison contracts.

Validation

Validated commit 3dbfe36bbf0bd53317575daac04753babdbd5830 on Windows with Node 26.13.0 and pnpm 11.9.0:

  • Full workspace build passed.
  • Memory service: 503/503 tests, 26 suites.
  • Offline diagnostic tools: 558/558 tests, 41 files.
  • AI client request accounting/capacity/provider adapters: 108/108 tests, 3 suites.
  • Memory client: 83/83 tests.
  • View examples: 89/89 tests, 5 suites.
  • All four changed-source ratchets and changed-file formatting passed. No thresholds, baselines or skips were relaxed.

Reproduce from ts in PowerShell, using the repository's existing dependencies:

pnpm run build

$serviceSuites = @(
  'evidenceWindow', 'informationalProjectPrompt', 'informationalProjectRegression',
  'informationalProjectSchema', 'informationalSupport', 'informationalWiki',
  'maintenanceFoundation', 'nextWaveLatency', 'schemaRequestAdmission',
  'topicGeneration', 'viewEditorialTemporal', 'wikiAdmission', 'wikiConsolidation',
  'wikiContribution', 'wikiGrouping', 'viewSemanticReview', 'viewSeparation',
  'viewSeparationService', 'wikiPlanningRecovery', 'wikiConsolidationRecovery',
  'wikiDecision', 'viewEditorial', 'viewStore', 'topicFrozenPreparation',
  'topicWorkReuse', 'topicGenerativeDecision'
)
$pattern = '(' + ($serviceSuites -join '|') + ')[.]spec[.]js$'
pnpm --filter @typeagent/memory-service run jest-esm --runInBand "--testPathPattern=$pattern"
pnpm --filter @typeagent/aiclient run jest-esm --runInBand '--testPathPattern=(requestBudget|outputCapacity|providerAdapter)[.]spec[.]js$'
pnpm --filter @typeagent/memory-client run test:local
pnpm --filter wiki-views run test:local

$diagnostics = @(Get-ChildItem .\tools\memory-maintenance-qualification -File |
  Where-Object { $_.Name -match '[.]test[.](mjs|mts)$' } |
  Sort-Object Name | ForEach-Object { $_.FullName })
node --test --test-concurrency=2 @diagnostics

pnpm run code-lint -- --ratchet --base origin/main
pnpm run code-complexity -- --ratchet --base origin/main --cyclomatic 25 --cognitive 30 --new-file-cyclomatic 25 --new-file-cognitive 30
pnpm run code-circular -- --ratchet --base origin/main --exceptions-file tools\scripts\code\circular-baseline-exception.json
pnpm run code-debt -- --gate --base origin/main
pnpm run prettier:changed

The local Windows broker build needed process-local NuGet plugin/cache-path normalization; no shared configuration was changed. The test results above are deterministic engineering checks, not model-quality or performance claims.

CI fixture portability follow-up

Commit 7d207109c4448579e6f6507a5064946625f69ca4 corrects test fixtures only; production behavior is unchanged.

Initial remainder lanes exposed a shared helper importing ../src/projectBrief.js: plain Node could not resolve the compiled path, and the MCP Jest runner mapped it into the wrong package. Shared informational helpers now use the repository's existing typed, module-relative compiled-import convention. Browser and configured MCP fixtures also supply the complete factual-support contract; MCP assertions include the additional factual-check stage.

After the correction, the full workspace build, 4/4 browser HTTP/parent-IPC gateway tests, 66/66 affected service tests, 3/3 configured MCP protocol tests, all four ratchets and formatting pass. The broader 1,341-test result above belongs to the initial integrated commit; it is not presented as a fresh full rerun on this fixture-only follow-up.

Additional reproduction commands from ts:

Push-Location packages\agents\browser
node --test test\viewDraftGateway.test.mjs
Pop-Location
pnpm --filter @typeagent/memory-service run jest-esm --runInBand '--testPathPattern=(informationalProjectSchema|informationalProjectRegression|informationalSupport)[.]spec[.]js$'
pnpm --filter @typeagent/memory-mcp-server run jest-esm --runInBand '--testPathPattern=viewInventoryProtocol[.]spec[.]js$'

Audit final informational output, bound factual repair, preserve exact section citations, and capture dispatch and checkpoint evidence for reviewed offline evaluation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve choice-only decisions and editorial recovery while enforcing exact factual proof for separation destinations. Reconcile interrupted checkpoints, native topic edges and integration fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Load shared compiled helpers relative to their own module rather than another package root. Supply complete field support in browser and configured MCP fixtures, and assert the factual-check stage without changing production gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hillary-mutisya
Hillary Mutisya (hillary-mutisya) merged commit e6e2d50 into main Nov 19, 2026
109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant