Repository navigation
feat(kit): the answer may carry a session record; the receipt shows it and prints no root it was not given - #55
Draft
Adam Poulemanos (bashandbone) wants to merge 1 commit into
Conversation
…t and prints no root it was not given The contract's answer gains an optional `session` member beside `document` with two optional strings: `classifier_id` and `engine_version`. An answer without it stays valid. `receipt(doc, session)` reads the classifier id and the engine version from its `session` argument and falls back to the answer's own `session` (own string members only). It shows the engine version in its footer. The footer no longer prints "session root: computed by the engine at seal". No engine computes one today. A root is printed only when the host gives one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Receipt is the audit view. It showed "classifier id not set" for every live answer, because the engine's answer had no place to say who ran it, and its footer printed "session root: computed by the engine at seal" although no engine computes one. The kit must show only what it was given.
What changed
packages/core/src/types.ts,docs/CONTRACT.md: the answer may carry an optionalsessionmember besidedocument, with two optional strings,classifier_idandengine_version. An answer without it stays valid. The contract version string is unchanged (an added optional member).packages/kit/src/render.ts:receipt(doc, session)reads the classifier id and the engine version from itssessionargument and falls back to the answer's ownsession. Only own string members count, and the argument wins when it carries a value. The engine version is shown in the footer.Scope
Stacked on #54 (base branch
feat/engine-transformation-kinds). No fixture changes. The engine side that writessessionis on the engine's demo branch, not in a reviewed engine PR yet.Tradeoffs
session; a host on it shows the classifier id only if it passessessionitself.Verification
vp run check: exit 0 (2 warnings, in files this change does not touch).vp run test: exit 0, 4 of 4 packages.Maintainer decisions
The matched decisions are matched by file path. None speaks about the receipt's header or footer or about a session record. MD-0004: the session record is the engine's statement in the answer, not kit state. MD-0021: the new tests are DOM tests under happy-dom.
🤖 Generated with Claude Code