Skip to content

The recipe: a lesson can show what the working call returned (story 28.4) - #219

Merged
fabbrik merged 10 commits into
mainfrom
feat/28-4-the-recipe
Oct 30, 2026
Merged

fabbrik merged 10 commits into
mainfrom
feat/28-4-the-recipe

Conversation

@fabbrik

@fabbrik fabbrik commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Story 28.4 of Epic 28. With host consent, a lesson shows the step that worked, not only its tool name.

  • Capture: ExperienceCaptureOptions.RecipeResultExcerpt returns a short excerpt of a returned call's result the host vouches for; sanitized, lone surrogates replaced, cut to 200 chars, stored as init-only ToolCallRecord.RecipeExcerpt (omitted from JSON when null, so unused records are byte-identical).
  • Injection: ExperienceInjectionOptions.RecipeExcerpts per-tool allowlist; the worked attempt's call renders [returned: "<excerpt>"]; failed calls never do; the recall hint uses the same rendering. AgentExperienceOptions.Recipe(tool, arguments, resultExcerpt) gives all consents in one place.
  • Signing: provenance claims v4 cover excerpts, used only under SignClaimsVersion = 4. With signing on, an excerpt no v4 signature confirms is never shown; the public writer fails closed unless given the confirmation check or an explicit no-signing opt-in.
  • Grants: a grant can name recipe excerpts (never under LessonOnly); migration 0031 (works on an unmigrated schema except issuing such a grant).
  • Contract 1.19, add-only: a new schema file (the 1.0 schema forbids unknown tool-call members) and inject fixtures; Python and Go read, keep and render excerpts (without signature confirmation, documented).
  • Quick-start --recipe; a proposed real-task amendment comparing recipe vs plain lessons (not run).

Tests: Core 1341, MAF 1439, Storage.Postgres 948 default/encrypted/RLS, contract 102, Python 1796, Go race and postgres legs, package validation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy

fabbrik added a commit that referenced this pull request Oct 30, 2026
… machine (#220)

The shared recall test host used timers that never fire, but the recall bound is measured from the clock's
timestamps, which were the system's. Under CI load (floating-dependencies, PR #219) a lookup took over 300 ms and
timed out. Tests on that clock now get a one-hour bound unless they set their own; the timeout test keeps its manual
clock.


Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fabbrik and others added 10 commits October 30, 2026 18:20
…tory 28.4)

ToolCallRecord.RecipeExcerpt (init-only), captured through
ExperienceCaptureOptions.RecipeResultExcerpt, sanitized as a result and cut
after sanitization; signed under claims v4; rendered on the Worked: attempt
as [returned: "..."] for tools in ExperienceInjectionOptions.RecipeExcerpts;
grants consent per tool (0031); AgentExperienceOptions.Recipe sets it all.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…nused records serialize as before

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…; changelog; experiment amendment proposal (story 28.4)

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
… exact-read SQL unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…g for contract 1.19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…on 4, U+FFFD for lone surrogates, no excerpt without confirmation, invisible-only keeps [returned]

Port limitation documented; contract 1.19 relocked with an invisible-only case; tests for signing end to end,
trusted-unsigned records, the v4 golden vector, 0031's CHECKs and a schema stopping at 0030.

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-4-the-recipe branch from 3265cd8 to 3d41776 Compare October 30, 2026 23:20
@fabbrik
fabbrik merged commit 97e862f into main Oct 30, 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