Badges and holes
A hole is Studio’s word for a place where a record is missing, cut, withheld or computed rather than stored. Holes come from one closed table of ten, obsdb.Hole (ADR 0028 §11), and Studio, the devtools panel and the JSON API draw each one as a badge with a reason and, where one exists, a fix. A hole may carry a cause that sharpens its words. This page lists every hole, every cause, the run-level rules from the record contract, the cost badges and the other words the UIs draw. Read a run in Studio shows them in place.
A read-scoped panel token asking for a run’s request records gets a hole as its refusal (captured; the long words are the table’s):
{ "error": { "code": "forbidden", "message": "the request record carries the system prompt and the tool catalog: a read-scoped panel token does not read it" }, "badge": "hidden", "reason": "your token's access does not reach this: a read-only panel token reads no system prompt or tool catalog", "fix": "use a playground token"}The ten holes
Section titled “The ten holes”obsdb.Holes() returns them in this order, which is also the order every surface lists them in. The words are obsdb.HoleNote’s, copied into studio/testdata/holes.golden.json and the web app’s lib/honesty.ts, which tests hold equal. A note tone means withheld, inferred or by design; a loss tone means something was lost or cut. obsdb.Hole and its ten constants arrived in 0.10.0.
| Hole | Constant | Tone | Label drawn | Reason | Fix |
|---|---|---|---|---|---|
truncated | HoleTruncated | loss | truncated; with a byte count and no cause, shortened by the recorder: <n> cut | a destination’s size cap cut this content before it was stored (weft.content.truncated_bytes) | raise the destination’s cap: otel.Content(otel.ContentConfig{MaxBytes: …}), -1 for unlimited |
stripped | HoleStripped | note | content not captured by this app | content not captured by this app: the destination stripped it (weft.content = stripped) or the agent captured none (weft.Content(false), weft.content = none): prompts, catalogs, messages, tool arguments and results were dropped before storage | turn content on: drop otel.NoContent() from the destination, or weft.Content(false) from the agent |
redacted | HoleRedacted | note | redacted | the destination’s Redact hook rewrote this content before it was stored | none. Reserved: weft’s pipeline does not mark a redaction, and no Go reader sends it; the UIs badge it only from a non-weft writer’s weft.content = redacted |
max_tokens | HoleMaxTokens | loss | max_tokens | the step finished on the output token limit: the response was cut | raise max_tokens: weft.Params(weft.RequestParams{MaxTokens: …}) |
interrupted | HoleInterrupted | loss | interrupted | the run stopped reporting: no finish arrived and nothing was heard from it for over 30 s | none |
gap | HoleGap | loss | gap | a record the run counts is missing: a destination dropped it on the way | the queue fix: raise the destination’s queue, otel.QueueSize(n) (Studio’s default 16,384), or otel.Blocking() under WEFT_ENV=dev (or otel.DevMode()); the app’s WARN “weft/otel: destination queue full” names it, weft doctor the drops (weft.records.dropped) |
not_recorded | HoleNotRecorded | note | not recorded; a request pane reads request not recorded by weft v0.9.0 or earlier | the weft that wrote this run kept no such record (v0.9.0 or earlier keeps no request, prompt or tools records, ADR 0028): nothing was lost | upgrade weft and re-run |
derived | HoleDerived | note | derived | computed by the reader, not stored as emitted: the record that would say it is absent | none |
hidden | HoleHidden | note | hidden by your token's access; with a count, · N child runs | your token’s access does not reach this: a read-only panel token reads no system prompt or tool catalog | use a playground token |
compacted | HoleCompacted | note | compacted | the model saw a compacted view: compaction replaced part of the transcript for this request. A step document says “a PrepareStep replaced part of the transcript for this step’s request” | open the compaction record |
A hole name the table does not know is drawn verbatim with the loss tone. Both surfaces draw loss in the same mustard, never red: --ev-error in Studio (with a 40% border) and --weft-warn in the panel, #875c04 light and #e3b341 dark. A note-toned badge is a neutral outline in Studio (border-border text-muted-foreground) and a dim tag in the panel (.weft-tag).
Where each hole appears
Section titled “Where each hole appears”| Hole | Raised on |
|---|---|
truncated | An event, prompt or catalog a destination cut (step cards, the export). A tool result past its cap (result_cap), and a run whose metadata was dropped (metadata_cap, the run document). The logs page past 10,000 lines (log_cap); a response past its read cap (response_cap: the span tree past 10,000 spans, a diff past 500 steps, an export tree past 200 runs) |
stripped | A run whose first event is marked stripped or none (the run document); a step’s request, messages and tool calls; a transcript that cannot rebuild for lack of messages (409 on transcript?step= and wefttest exports); a missing prompt or catalog of a content-off run |
redacted | Only where the UIs read a raw weft.content = redacted mark |
max_tokens | A step that stopped on the output limit, and its tool calls, none of which ran (“call never executed”); the run header from stop_reason; the export’s run-level holes; a diff side’s marks |
interrupted | The run document, step documents and the header, from the read-time status |
gap | Lost records (causes below); missing event positions; a step with no request record or chat span; a log line naming an unstored span; a trace whose root span never arrived (root: null, badge: "gap" on /api/traces) |
not_recorded | A run written before ADR 0028 (requests_badge); a batch with no step stamped; a request with no wire bodies (raw_badge); the logs route with no slog bridge, the fix naming otel.Slog(); a run with no spans; a session with no public id |
derived | A run built from stock OTel GenAI spans (derived: true, requests_badge: "derived"): every block of it, and 400 refusals to replay or fixture it; a batch whose input flag was inferred; messages no request record placed; an attempt joined by time; a replay whose prefix view is unknown (weft.replay.view). On a step: a chat span counting more tool calls than the step lists, a requested model inferred from the run’s, a request record with no attempt number (listed by its request index, or joined to the attempt the spans time) |
hidden | A read token’s view of a system prompt, catalog or compaction-view messages (inside a 200). Its 403s on requests, tools, logs, manifests, otlp and wefttest exports and fixtures; a panel token’s child runs, tree descendants and export subtrees outside its public id, counted, never named; every panel token’s session-to-public-id lookup |
compacted | A step whose request saw a compaction view (its compaction block and messages_in); the export when the run holds a run-scope view; a diff side’s marks |
Causes
Section titled “Causes”obsdb.HoleCause names why a hole was raised when the hole’s own words are too general. obsdb.HoleCauses() lists the fourteen below; obsdb.HoleNoteFor returns a cause’s words, falling back to the hole’s. A tree hole (spans?tree=1, an export’s subagent_holes) carries a cause field; run and step holes carry only the cause’s words.
| Cause | Constant | Hole | Raised when | Reason | Fix |
|---|---|---|---|---|---|
"" | CauseDefault | any | No sharper cause | the hole’s own reason | the hole’s own fix |
no_spans | CauseNoSpans | not_recorded | The run’s records arrived and no span did; in a run tree, finished child runs with a row and no span | the run was recorded without a tracer: no attempt spans, no answering model | install a tracer (otel.Install records spans) |
result_cap | CauseResultCap | truncated | The core’s tool-result cap cut the content before any destination saw it | a tool result was cut by its result cap: the model saw a prefix and the marker | raise the tool’s weft.MaxResultBytes |
log_cap | CauseLogCap | truncated | The app-log reader scanned its 10,000 candidates (obsdb.MaxLogCandidates) before attributing lines | the app-log reader’s cap was reached before attribution: later lines of this run may be missing | log less in the run’s trace (a busy subagent or sibling run counts too) |
no_public_id | CauseNoPublicID | not_recorded | GET /api/sessions/{id}/public_id on a session whose turns carry none | the session’s turns carry no weft.public_id (a thread session is created without thread.PublicID) | thread.Create(…, thread.PublicID(id)), or set weft.public_id on every turn |
dev_token_only | CauseDevTokenOnly | hidden | A panel token asked a route that answers the dev token only | a panel token reads its one public id, never a session’s: this route answers the dev token only | ask with the server (dev) token, or use the public id the panel token was minted for |
not_served | CauseNotServed | not_recorded | The panel asked a Studio with no requests capability | this Studio does not serve the request record (no requests capability): the run may hold one | use a Studio that serves it (upgrade it, or enable the requests group) |
response_cap | CauseResponseCap | truncated | A route reads at most so much in one response; nothing was lost | the run has more steps than this response reads: the later ones were not compared, nothing was lost (each route states its own cap) | open the later steps one by one (runs/{id}/steps/{n}) |
raw_off | CauseRawOff | not_recorded | An attempt has no wire record (ADR 0028 §12); raw_badge on /requests rows | no wire bodies recorded for this attempt: otel.RawBodies is off (the default; refused outside WEFT_ENV=dev or otel.DevMode()) or the adapter does not report them | run under WEFT_ENV=dev (or otel.DevMode()) with otel.RawBodies(true) and a first-party adapter (an injected google client is not captured) |
stock_spans | CauseStockSpans | derived | The run was built from stock OTel GenAI spans (record contract §9) | derived from spans · no events | stock OTel GenAI spans carry no weft events or request records: set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true for the messages and tool arguments (Studio reads them from the span attributes) and gen_ai.conversation.id on the invoke_agent span for a session; weft’s own records need a weft SDK (Go today) |
no_logger | CauseNoLogger | not_recorded | A weft run’s spans were stored and none of its records, and its root says none were emitted | the app exported spans only: they arrived, none of its records did — no events, transcript or request records | wire the logs too: pass weft.LoggerProvider(lp) beside weft.TracerProvider, or use otel.Install (it wires both) |
tail_lost | CauseTailLost | gap | The root span is stored and reads succeeded, events are stored and run_finish is not, and the root carries no event count | the run’s root span ended but its run_finish record never arrived: a destination dropped the record tail, so the last steps’ records are missing | the queue fix |
events_lost | CauseEventsLost | gap | The root’s weft.run.events says M were emitted and fewer were stored; replaces tail_lost and no_logger wherever the root carries the count | more event records were emitted than stored (weft.run.events on the root span): a destination dropped them, its queue full or an export failed. Counted: “N of M events were lost”, with how many are the run’s tail | the queue fix |
messages_lost | CauseMessagesLost | gap | The root’s weft.run.messages says N were emitted and some, but fewer, were stored. None stored is never called lost: it reads like content off | more transcript batches were emitted than stored (weft.run.messages on the root span): a destination dropped them, its queue full or an export failed — messages are missing. Counted: “K of N transcript batches were lost: …” | the queue fix |
metadata_cap | CauseMetadataCap | truncated | The core dropped metadata pairs over its limits, whole, never cut (weft.metadata.dropped) | metadata pairs over the core’s limits were dropped whole. Counted (obsdb.MetadataCapReason): “N metadata pairs dropped (limit 64 keys, 128-byte keys, 1 KiB values): no span or record of the run carries them” | send fewer or smaller pairs (weft.Metadata: 64 keys, 128-byte keys, 1 KiB values) |
The five other holes (stripped, redacted, max_tokens, interrupted, compacted) have no cause.
Run-level badges
Section titled “Run-level badges”The record contract §7 states when a reader puts each badge on a whole run. These are the rules the export’s and the fixtures’ holes follow. GET /api/runs/{id} raises the counted ones, interrupted, stripped, derived, not_recorded and truncated with cause metadata_cap; max_tokens, a cut event and compacted it leaves to the step or event they belong to, and the run header adds max_tokens and interrupted itself.
| Badge | On a run when |
|---|---|
not_recorded | instructions_hash is "" and request_count is 0: written before ADR 0028, no request, prompt or tools records exist (requests_badge) |
interrupted | The read-time status is interrupted |
max_tokens | stop_reason is max_tokens |
stripped | An event record is marked stripped or none |
truncated | An event record carries weft.content.truncated_bytes > 0 |
truncated, metadata_cap | The root span carries weft.metadata.dropped > 0 |
gap | The event counter has a hole below its high-water mark; when the root carries weft.run.events, Studio folds this into events_lost’s words |
gap, events_lost / messages_lost / tail_lost | As in Causes; raised only once the run stopped settling |
compacted | The run holds a run-scope view (weft.messages.reason = compacted) |
derived | The run was built from stock spans: that run’s alone, never a weft run whose records are missing |
not_recorded (logs route only) | The root span is stored without weft.logs.bridged and no app log line is attributed to the run: a hint beside the empty page, the fix naming otel.Slog(); never on a derived run |
not_recorded, no_logger | A weft run (not derived, not running) whose spans are stored and no record, whose root says none were emitted |
redacted is reserved, and hidden is decided by the reader’s scope, not by the data.
Wire shapes
Section titled “Wire shapes”| Shape | Fields | Where |
|---|---|---|
| Hole | {hole, reason, fix?, count?} | holes on a run document, its children, a step, a diff and its sides, the logs page, an export |
| Tree hole | {hole, cause?, reason, fix?, runs?, count?} | spans?tree=1’s holes, an export’s subagent_holes |
| Inline badge | {badge?, reason?, fix?} | A block that is itself missing: a step’s request, messages_in, the transcript, tools and requests pages, a trace row, and every 403, 409 and 400 refusal about a hole |
| One word | requests_badge, a batch’s badge, a missing prompt’s or catalog’s {hash, badge}, an attempt’s and a tool call’s badge, attempts_badge, the preview’s system_badge, messages_badge, tools_badge | Beside the value it qualifies |
| Raw | raw: null, raw_badge: "not_recorded", raw_reason, raw_fix | Each /requests row without wire bodies |
A hole never goes out without a reason. fix is absent where no fix applies: redacted, interrupted, and derived without a cause (a derived run’s hole carries stock_spans’ fix). count is set on a hidden hole for child runs, and on a tree’s not_recorded with its first 100 run ids in runs. The UIs merge marks of one hole into one badge with the first one’s words, summing a truncation’s bytes, and sort them in table order. In the panel, every badge is a <span data-hole="…"> whose title is “reason — fix: fix” and whose screen-reader text repeats both; badges are drawn by src/panel/badges.ts and nowhere else.
Go types
Section titled “Go types”| Symbol | What it is |
|---|---|
obsdb.Hole, obsdb.Holes | The hole type and the ten values in table order |
obsdb.HoleCause, obsdb.HoleCauses | The cause type and the fourteen named causes |
obsdb.HoleNote, obsdb.HoleNoteFor | A hole’s reason and fix; a cause’s, falling back to the hole’s |
obsdb.HoleError
Section titled “obsdb.HoleError”obsdb.HoleError is the error DB.Prompt, DB.Tools and DB.OtherLogs return when a record is absent, with the hole that says why.
| Member | Meaning |
|---|---|
Kind | prompt, tools or logs |
Hash | The prompt or catalog hash asked for; empty for logs |
Hole | not_recorded (written before ADR 0028, or logs of a run with no span), stripped (a content-off chain) or gap (the request names the hash and the record is absent) |
Error() | obsdb: not found: <kind> <hash> (<hole>), or without a hash obsdb: not found: <kind> (<hole>) (obsdb: not found: logs (not_recorded)) |
Is(target) | True for obsdb.ErrNotFound, so errors.Is(err, obsdb.ErrNotFound) matches |
obsdb.StepMessagesError
Section titled “obsdb.StepMessagesError”obsdb.StepMessagesError is the error obsdb.MessagesAsOf and obsdb.AssembleStep return when a step’s messages do not rebuild from the records. Step is the step, Hole is gap (a named record is missing or does not fit) or stripped (no messages stored at all), and Msg says which. Error() reads obsdb: step <n>: <msg>; Is(target) matches obsdb.ErrStepMessages. Studio answers it as 409 with the hole as the badge on transcript?step=N and fixtures; the preview answers 409 with the message only. A reader badges the hole and never guesses.
Cost badges
Section titled “Cost badges”Cost is priced at read time (Cost). A run row carries these; they are not holes, but the UIs draw them the same way.
| Value | Field | Means | Drawn as |
|---|---|---|---|
unpriced | cost_badge | No pricing row matches the model; cost_reason is <provider>/<model> has no price or the run reported no model to price | —, the reason as its title; pages say once “N runs unpriced: no row for …” with a link prefilling a row in Settings |
unknown | cost_badge | The figure could not be computed: running: usage arrives at run end, the run's end (run_finish or its invoke_agent span) never arrived: its usage is not recorded, stock spans reporting no usage, or children that could not be read | —, the reason as its title |
scripted | cost_badge | A scripted model no row matches (wefttest, weft/runtime/scripted): an exact 0, cost_known: true, a scripted model: nothing bills it, an exact $0 | $0 · scripted |
exact | cache | The adapter reported cache splits | — |
not_reported | cache | No cache split: every input token priced at the input rate; cost_reason adds no cache split reported; a cached prompt may be overstated | cache not reported |
cost_usd is null when not known, never 0. Delegated cost carries no badge on the wire; its reason sums the children (“2 of 3 child runs unpriced: no price for …”). A total with an unknown part reads ≥ $x · k of n runs priced; unpriced_models lists at most five, then (+n).
Other words
Section titled “Other words”| Word | Where | Means |
|---|---|---|
settling | A run row’s settling: true; a panel chip | The root span is stored and the last records may still arrive (up to 30 s): the story can stop short until they land |
⑂ ? | Runs list | children_unknown: the child runs could not be read with the row |
≥ on E / W | Run header’s problem glyphs | logs_capped: the warning and error counts are floors |
not comparable | Compare | A side did not record this column (its holes say why): the two were not compared |
(content not captured) | Run titles | The prompt was not recorded (content off) |
spans not reported yet | The run tree | A running run’s step or call that no span covers yet |
usage at finish | A running child run’s usage, in the story’s subagent block and the panel | The record sets usage only when a run ends, so a running child’s zeros are not yet known |
[synthesised by Repair] | The Request pane’s message lines | A tool result weft.Repair wrote (no result recorded: the call was interrupted) for a call whose result never arrived: no tool ran. Matched on the text; never on story call rows or the panel’s call rows |
app-owned turn · read-only | Panel and run page verbs | A refusal, not a hole: the app’s own turn, with the fix the API’s 403 carries |
The footer of the panel states the run’s content in one line: content off · <why>, content on · N events shortened (<n> cut), or content on.
See also
Section titled “See also”- Read a run in Studio
- Studio HTTP API
- The record contract
- Control what content leaves the process
- Glossary: hole
Package: weft/obsdb