Repository navigation
ledger: the flight recorder, one terminal reason per model opportunity - #468
Merged
Merged
Conversation
…minal reason The keyboard mints an opportunity id per model request; the app echoes it on every response line with a decision receipt (reason, generated, model timings); the keyboard writes one text-free event per opportunity, shown or silent with guardReason. SuggestionDecisionReason covers the app's pre- and post-inference gates and the keyboard's own verdicts, with raw values aligned to the Lab's, so online-report slices silence by reason without translation. The engine returns a Decision; suggestion() stays as a wrapper. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
Step 2 of the ruler work. Before this, the outcome ledger began when a ghost became visible, so Tilde could not say why it stayed quiet. Now:
GhostBrainRequest.opportunityID); the app echoes it on every response line.reason(SuggestionDecisionReason),generated,generatorMilliseconds,firstStableWordMilliseconds, alongside the register and source from ledger: served register, candidate source, authored-character denominator, one production event type #467. All optional on the wire; older peers keep working.guardReason,generated,policyHidden,deadlineMissed, andoutcomeofhiddenorunavailable, validated by the Lab plan rules.superseded-by-typing,not-at-growing-edge). Raw values matchLabDecisionReason; the bridge maps them with no defaulting.LlamaCompletionEngine.decidereturns aDecision;suggestion(...)is a wrapper, so existing streaming tests are unchanged.Dictionary lookups that find nothing are deliberately not opportunities (no model, one per keystroke). Docs: fifth rule in
docs/tilde-lab.md, cut-over note innext-on-device.md, lab log.Test plan
SuggestionDecisionReasonTests(mapping, classes, silent event shape, receipt round trip)LabProductionEventBridgeTests: silent opportunities validate and reach the report as hidden / unavailable / late, sliced by reasondecidetest: shown with timings vs empty output./script/proof.sh fastgreentilde-lab online-report --instrumentafter a day🤖 Generated with Claude Code