Skip to content

One living lesson per situation: deterministic consolidation (story 28.6) - #225

Merged
fabbrik merged 9 commits into
mainfrom
feat/28-6-consolidation
Oct 31, 2026
Merged

fabbrik merged 9 commits into
mainfrom
feat/28-6-consolidation

Conversation

@fabbrik

@fabbrik fabbrik commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Story 28.6 of Epic 28. Repeated verified runs that hit the same failure and fixed it the same way become one stronger, shorter lesson instead of many competing records.

  • ExperienceConsolidationService.ConsolidateAsync (and GetAgentExperienceLessons().ConsolidateAsync), on demand only. Groups records in exactly one scope (no grants) by their resolved failure signatures (28.2) and working tool sequence (optionally allowlisted argument values); at least MinimumSources (default 3) distinct runs.
  • Trust: only library-finalized, verified sources whose signature verifies under signing, with library-written, confirmed content. Each source's own validation counts once; only Admission == Verified evidence is carried; host-trusted evidence is not. Under signing, a consolidated record's starting counters count as verified only with a valid signature from the consolidation producer, capped per source.
  • Lifecycle: a derived-ID record is created and validated, then each source is superseded with compare-and-set; sources are re-read before creation; a pre-existing record at the derived ID is adopted only if it is trusted and matches exactly; concurrent passes converge; fold-in of later runs; cap and changing groups reported as Deferred; incomplete supersessions reported.
  • Erasure: a consolidated record copies its latest source's content, so erasing a source does not reach it; FindConsolidatedContainingAsync finds those copies; documented in lifecycle.md and deletion-and-retention.md.
  • Lessons view and HTML show "consolidated from N". No store, schema, port or contract change.

Tests: Core 1374 (25 consolidation), MAF 1460, SQLite 247, Storage.Postgres 967 default and RLS, package validation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy

fabbrik and others added 9 commits October 30, 2026 19:51
…tory 28.6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…gning (story 28.6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…stgreSQL (story 28.6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…ied evidence (story 28.6 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…pies (story 28.6 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
@fabbrik
fabbrik force-pushed the feat/28-6-consolidation branch from f069aee to 9b69cb1 Compare October 31, 2026 00:51
@fabbrik
fabbrik merged commit de4434c into main Oct 31, 2026
23 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