Skip to content

ledger: the flight recorder, one terminal reason per model opportunity - #468

Merged
r3dbars merged 1 commit into
mainfrom
claude/tilde-autocomplete-strategy-c88fd9
Sep 2, 2026
Merged

r3dbars merged 1 commit into
mainfrom
claude/tilde-autocomplete-strategy-c88fd9

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 2, 2026

Copy link
Copy Markdown
Owner

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:

  • Opportunity id. The keyboard mints a random id per model request (GhostBrainRequest.opportunityID); the app echoes it on every response line.
  • Decision receipt. Terminal response lines carry 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.
  • One event per opportunity. Shown ghosts keep their id and gain the model timings. Silent opportunities write an undisplayed event with guardReason, generated, policyHidden, deadlineMissed, and outcome of hidden or unavailable, validated by the Lab plan rules.
  • Vocabulary. App pre-inference gates, app post-inference verdicts (cleaner, echo, grounding, empty, timeout, protocol), keyboard verdicts (superseded-by-typing, not-at-growing-edge). Raw values match LabDecisionReason; the bridge maps them with no defaulting.
  • Engine. LlamaCompletionEngine.decide returns a Decision; 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 in next-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 reason
  • Engine decide test: shown with timings vs empty output
  • ./script/proof.sh fast green
  • Install on the daily driver; read tilde-lab online-report --instrument after a day

🤖 Generated with Claude Code

…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>
@r3dbars
r3dbars merged commit 60eca98 into main Sep 2, 2026
1 check 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