Skip to content

Badges and holes

View as Markdown

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"
}

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.

HoleConstantToneLabel drawnReasonFix
truncatedHoleTruncatedlosstruncated; with a byte count and no cause, shortened by the recorder: <n> cuta 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
strippedHoleStrippednotecontent not captured by this appcontent 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 storageturn content on: drop otel.NoContent() from the destination, or weft.Content(false) from the agent
redactedHoleRedactednoteredactedthe destination’s Redact hook rewrote this content before it was storednone. 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_tokensHoleMaxTokenslossmax_tokensthe step finished on the output token limit: the response was cutraise max_tokens: weft.Params(weft.RequestParams{MaxTokens: …})
interruptedHoleInterruptedlossinterruptedthe run stopped reporting: no finish arrived and nothing was heard from it for over 30 snone
gapHoleGaplossgapa record the run counts is missing: a destination dropped it on the waythe 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_recordedHoleNotRecordednotenot recorded; a request pane reads request not recorded by weft v0.9.0 or earlierthe 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 lostupgrade weft and re-run
derivedHoleDerivednotederivedcomputed by the reader, not stored as emitted: the record that would say it is absentnone
hiddenHoleHiddennotehidden by your token's access; with a count, · N child runsyour token’s access does not reach this: a read-only panel token reads no system prompt or tool cataloguse a playground token
compactedHoleCompactednotecompactedthe 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).

HoleRaised on
truncatedAn 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)
strippedA 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
redactedOnly where the UIs read a raw weft.content = redacted mark
max_tokensA 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
interruptedThe run document, step documents and the header, from the read-time status
gapLost 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_recordedA 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
derivedA 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)
hiddenA 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
compactedA 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

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.

CauseConstantHoleRaised whenReasonFix
""CauseDefaultanyNo sharper causethe hole’s own reasonthe hole’s own fix
no_spansCauseNoSpansnot_recordedThe run’s records arrived and no span did; in a run tree, finished child runs with a row and no spanthe run was recorded without a tracer: no attempt spans, no answering modelinstall a tracer (otel.Install records spans)
result_capCauseResultCaptruncatedThe core’s tool-result cap cut the content before any destination saw ita tool result was cut by its result cap: the model saw a prefix and the markerraise the tool’s weft.MaxResultBytes
log_capCauseLogCaptruncatedThe app-log reader scanned its 10,000 candidates (obsdb.MaxLogCandidates) before attributing linesthe app-log reader’s cap was reached before attribution: later lines of this run may be missinglog less in the run’s trace (a busy subagent or sibling run counts too)
no_public_idCauseNoPublicIDnot_recordedGET /api/sessions/{id}/public_id on a session whose turns carry nonethe 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_onlyCauseDevTokenOnlyhiddenA panel token asked a route that answers the dev token onlya panel token reads its one public id, never a session’s: this route answers the dev token onlyask with the server (dev) token, or use the public id the panel token was minted for
not_servedCauseNotServednot_recordedThe panel asked a Studio with no requests capabilitythis Studio does not serve the request record (no requests capability): the run may hold oneuse a Studio that serves it (upgrade it, or enable the requests group)
response_capCauseResponseCaptruncatedA route reads at most so much in one response; nothing was lostthe 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_offCauseRawOffnot_recordedAn attempt has no wire record (ADR 0028 §12); raw_badge on /requests rowsno 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 themrun under WEFT_ENV=dev (or otel.DevMode()) with otel.RawBodies(true) and a first-party adapter (an injected google client is not captured)
stock_spansCauseStockSpansderivedThe run was built from stock OTel GenAI spans (record contract §9)derived from spans · no eventsstock 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_loggerCauseNoLoggernot_recordedA weft run’s spans were stored and none of its records, and its root says none were emittedthe app exported spans only: they arrived, none of its records did — no events, transcript or request recordswire the logs too: pass weft.LoggerProvider(lp) beside weft.TracerProvider, or use otel.Install (it wires both)
tail_lostCauseTailLostgapThe root span is stored and reads succeeded, events are stored and run_finish is not, and the root carries no event countthe run’s root span ended but its run_finish record never arrived: a destination dropped the record tail, so the last steps’ records are missingthe queue fix
events_lostCauseEventsLostgapThe root’s weft.run.events says M were emitted and fewer were stored; replaces tail_lost and no_logger wherever the root carries the countmore 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 tailthe queue fix
messages_lostCauseMessagesLostgapThe 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 offmore 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_capCauseMetadataCaptruncatedThe 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.

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.

BadgeOn a run when
not_recordedinstructions_hash is "" and request_count is 0: written before ADR 0028, no request, prompt or tools records exist (requests_badge)
interruptedThe read-time status is interrupted
max_tokensstop_reason is max_tokens
strippedAn event record is marked stripped or none
truncatedAn event record carries weft.content.truncated_bytes > 0
truncated, metadata_capThe root span carries weft.metadata.dropped > 0
gapThe 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_lostAs in Causes; raised only once the run stopped settling
compactedThe run holds a run-scope view (weft.messages.reason = compacted)
derivedThe 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_loggerA 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.

ShapeFieldsWhere
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 wordrequests_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_badgeBeside the value it qualifies
Rawraw: null, raw_badge: "not_recorded", raw_reason, raw_fixEach /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.

SymbolWhat it is
obsdb.Hole, obsdb.HolesThe hole type and the ten values in table order
obsdb.HoleCause, obsdb.HoleCausesThe cause type and the fourteen named causes
obsdb.HoleNote, obsdb.HoleNoteForA hole’s reason and fix; a cause’s, falling back to the hole’s

obsdb.HoleError is the error DB.Prompt, DB.Tools and DB.OtherLogs return when a record is absent, with the hole that says why.

MemberMeaning
Kindprompt, tools or logs
HashThe prompt or catalog hash asked for; empty for logs
Holenot_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 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 is priced at read time (Cost). A run row carries these; they are not holes, but the UIs draw them the same way.

ValueFieldMeansDrawn as
unpricedcost_badgeNo 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
unknowncost_badgeThe 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
scriptedcost_badgeA 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
exactcacheThe adapter reported cache splits—
not_reportedcacheNo cache split: every input token priced at the input rate; cost_reason adds no cache split reported; a cached prompt may be overstatedcache 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).

WordWhereMeans
settlingA run row’s settling: true; a panel chipThe root span is stored and the last records may still arrive (up to 30 s): the story can stop short until they land
⑂ ?Runs listchildren_unknown: the child runs could not be read with the row
≥ on E / WRun header’s problem glyphslogs_capped: the warning and error counts are floors
not comparableCompareA side did not record this column (its holes say why): the two were not compared
(content not captured)Run titlesThe prompt was not recorded (content off)
spans not reported yetThe run treeA running run’s step or call that no span covers yet
usage at finishA running child run’s usage, in the story’s subagent block and the panelThe 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 linesA 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-onlyPanel and run page verbsA 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.

Package: weft/obsdb