Skip to content

fix(knowledge): bind declared candidate state and retrieval evidence - #197

Merged
drewstone merged 3 commits into
mainfrom
fix/declared-state-evidence
Sep 8, 2026
Merged

fix(knowledge): bind declared candidate state and retrieval evidence#197
drewstone merged 3 commits into
mainfrom
fix/declared-state-evidence

Conversation

@drewstone

@drewstone drewstone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

KB improvement previously copied and hashed only the default pages, raw evidence, and source registry. Custom page layouts and research records could therefore remain outside the measured candidate. This change adds an explicit stateScope for the pages directory and opt-in canonical claim ledgers/events, then uses that scope consistently for snapshots, indexes, resume, selected candidates, promotion, and transaction recovery. Default snapshot identities remain unchanged.
The public normalizer lets Runtime carry the same canonical scope into portable candidates.
The Eval peer range admits 0.176 while retaining the tested 0.174 floor.

Configured createKnowledgeTools receipt capture now persists and reuses the exact visibility artifact before delivering a receipt. Receipts contain the existing artifact reference, and conflicting stored bytes fail before delivery. Structural scoring remains distinct from caller-provided downstream evaluation.

Validation:

  • Linux full suite: 866 passed, 12 skipped; final five-case scope suite passed after adding interrupted-promotion and custom research-writer coverage.
  • Source and public-contract typechecks, lint, build, skill/path/API-surface checks, publint, and ESM declaration checks passed.
  • Packed 15.0.0 lifecycle with registry Eval 0.175.0 passed: clean install, declarations, five entrypoint imports, skill, CLI, and re-pack.
  • Version gate passed; 15.0.0 follows the repository rule for changed exported shapes. Target merge check passed.

Additional compatibility validation:

  • Source and contract types passed against published Eval 0.175 and the genuine packed Eval 0.176 candidate (a6210768).
  • Packed lifecycle checks passed with Eval 0.175 and the retained 0.174 floor.
  • An isolated Knowledge 15/Eval 0.176 consumer refused ledger-less execution before dispatch and verified two evidence receipts from four deterministic executions.
  • Resolution assertions confirmed one shared physical Eval and Interface installation across the consumer, Knowledge, and Eval.
  • Linux CI passed on final commit d208244. The local focused set passed 15 cases and explicitly skipped six Linux-only candidate workflows.
  • The official GEPA and SkillOpt packed-package job passed on final commit d208244 after aligning its peer-range assertion.

The scope excludes derived indexes, locks, transaction journals, retrieval artifacts, and external providers. Applications must separately bind external mutable state and retain visibility files with their receipt records. No paid inference, release publication, or production mutation was performed.

@drewstone
drewstone merged commit 31a672f into main Sep 8, 2026
2 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