Repository navigation
Responses served from a fallback say so in degraded, and ops.incidents lists current incidents - #2047
Merged
Merged
Conversation
…cidents lists current incidents The transports attach the request's degradation notes to every op response over HTTP and MCP, merged after the op's own list and absent when empty; the MCP lean pass keeps them at the top and loom_search adds a Degraded: line to its text. The code-read fallbacks that served a smaller answer silently (review brief, symbol, coverage, search, grep, ask, pr_check legs) now record a note, outside provider health. ops.incidents (viewer, experimental, reached with loom_op) lists the failing readiness checks, providers failing within the window, workers failing 3 or more passes in a row, and the caller's org's SLO classes whose server-side failure share crosses a threshold. Each ClickHouse read is bounded and an unread source is named in degraded. Three settings: ops_incidents_window_minutes, ops_incidents_error_share, ops_incidents_min_requests. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…reads cheaply - The MCP lean pass keeps a non-empty top-level degraded, so an idempotent replay serves the list its first answer stored. - note() skips an entry the request already holds; the cap of 8 counts distinct notes. - A unit-test fixture starts every test with no note list. - ops.incidents reads each ClickHouse source at most once every 5 s per process, a failed read included and still named in degraded. The worker read keys on the enabled worker names, a 6 h window and this deployment's labels, so isolated and bench servers sharing loom.worker_status are not listed. supervisor.ALERT_THRESHOLD is public. Both statements are in the analyzer corpus. - Request counts are read only by a token over every namespace of the org that reads whole namespaces: sli_minute keeps no namespace or user. - The constructor-coverage probe caches a failed read with its kind and notes it on every answer it serves; code.search does not memoize, and code.ask does not store, an answer whose request noted anything. - enrich.bounded() notes a failed read, not a cut by its bound: the callers pass what is left of their budget. - The ops.incidents input docstring opens with one whole sentence; the docs name what an entry carries and who reads request counts. - The SDK public-surface snapshot carries ops.incidents. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… fell back is not stored - ops.incidents: a lock per (source, org) makes polls that arrive while a read runs wait for it and share its answer, so a burst of polls runs one statement per source. - Review briefs: build_for_merge and build_for_open serve a brief unstored when a read it ran fell back, since the stored copy would be served later without its degraded. The ingest worker builds each brief in degradations.scoped(), so one brief's fallback does not keep the next from being stored, and a code.refresh that waits keeps its own notes. - enrich.bounded() notes a read cut by the fixed code_enrich_timeout_s (the store answered slowly) and stays silent for a cut by the caller's remaining budget. - The broad excepts rewritten in code.grep, code.symbol and code.search say what they keep serving. - monitoring.md and the dashboard's reason for leaving out ops.incidents say what each surface shows: worker incidents name workers of every deployment process, which /v1/health?include=workers does not. - memory-architecture.md: memory.search_trace carries the note in the transport's degraded. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…graded - build_for_merge and build_for_open note git_mirror: diff_unread when git could not read the diff of a PR that changed files, and the merged brief answers stored: false; it answered stored: true for a brief nothing stored. - The overrides probe caches the failed read's kind with its fail-closed answer and notes it on every answer that serves it, as the constructor probe does. - result_lessons passes what is left of the call's deadline only when that is less than code_enrich_timeout_s, so a lessons read no deadline narrows takes the fixed bound and is noted when cut by it. - http-api.md says a cut by LOOM_CODE_ENRICH_TIMEOUT_S is listed and a cut by the request's remaining deadline is not. - The readiness leg of ops.incidents drops its except: each check already answers as failing when it raises or times out. - The narrow-token reason and the dashboard's reason for ops.incidents say what a narrowed token reads and what only this op carries. - Tests: code.search does not memoize and code.ask does not store an answer whose request noted a fallback, and both do with no note; an HTTP body without org polls the token's org. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…ts leaves draining out The read handlers of both planes note each fallback that serves a smaller answer: about 150 broad excepts after a sweep of server/code/app and server/memory/app. An answer a fallback served is not kept where a later call would read it without its notes: code.map's map, a published code status, a memory.ask precedent, a facts.traverse walk and the nightly backport rows. Caches that keep a failed read (the code status, the pending-extraction count, namespace health) name it on each answer they serve, and a later code.search page names its first page's notes. ops.incidents leaves the draining readiness check out, since every deploy drains a process. The worker streak read keeps rows whose label's first segment is exactly `deploy`, one rule for the SQL and label_family, and both incident statements run on clickhouse-local in a new test. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…low the org-wide rule degradations.unit() isolates a block's notes and then lists them in the caller's: code.search, code.ask's fresh answer, code.map, facts.traverse, memory.ask, the review-brief builds and each repository status keep an answer only when their own unit noted nothing. Every read fallback calls degradations.partial(), note with health=False fixed. code.symbol asks only the dependency namespaces the caller may read, so degraded never names one it cannot. ops.incidents reads request counts only for a caller that reads the org whole (reads_every_namespace, now shared with resolve_org_scope) with no restricted namespace hidden. Statuses sharing a failed ledger read each carry its note. A merge sha the mirror does not hold is a miss, not a failed read. The backport-gaps worker logs a fallback and reads the fix once more within the pass budget. Each worker pass and status refresh starts with no notes, and fixed-bound timeouts in memory.search and memory.for_file are noted. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
degraded is the one field a client checks without knowing each op's own disclosure fields. The fallbacks that only showed in an abstain reason, skipped, a partial_reason, a *_failed count, a section's failed or an unknown verdict now note in degraded as well, and the op's own field is unchanged: 34 code-plane sites (code.ask, code.search's legs and pick, code.grep, code.conventions, code.setting_facts, code.bisect_candidates, code.callers, code.symbol's uses legs, code.enclosing, code.review_brief's rationale, the index status lag and calibration) and the memory plane's memory.inspect sections, loom_search's failed legs, memory.search's term leg, tags, unit bodies, page blob and tag belt, and a failed projection retry. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Merged
8 of 10 tasks
…arry them too A code.search pool row keeps the notes taken when the ranking returns, so a later page no longer repeats page 1's risk block, whole-file expansion or index head. A code.grep pool row keeps its scan's notes and a memory.search parked page keeps its ranking's, and each later page names them again; a payload without the key serves as before. A search whose embedder would not build notes embedder: query_vector_dropped, so the memo does not keep it. code.ask with no embedder adds no second note. A code.map render the index head moved past is discarded with its notes. code.symbol reads each dependency's grant with row_reach and notes identity: dependency_unverified, naming no namespace, when one cannot be read. A delegated org admin's * token reads ops.incidents request counts, under the org-wide rollup rule; the docs and tests say so. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… served pass's notes loom_search's repository legs, memory.ask's code grounding and code.ask's memory context read the grant with row_reach. When it cannot be read they note identity: repo_gate_unverified, code_grounding_unverified or memory_context_unverified, with no reason or namespace, so the answer and precedent caches do not keep the smaller answer. A memory.search consistency reread runs in degradations.scoped(). When its answer is served, its notes replace the first pass's; a reread that fails or finds nothing is dropped with its notes. No delegated token reads ops.incidents request counts: org_admin is never delegated and a child is capped at admin. The test mints its child through delegation.delegate. The docs and the gate's docstring say that calls to collections the caller cannot read are counted. http-api.md now says a missing degraded key means no fallback was noted, names the caches that keep a fallback with its entries, and covers code.grep and memory.search pages. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
code.index_status and code.repos noted git_mirror: lag_unknown whenever git could not count the commits between a watermark and the clone head, so a watermark the clone did not hold yet marked the status degraded and kept it from being published. When the count fails, each sha is checked with rev-parse --verify --quiet: exit 1 (no such commit) gives lag -1 and no note, exit 128 (git cannot read the mirror) keeps the note and the status unpublished. The check is gitrepo.holds_commit, which mirror_commit_facts now uses too. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…r it read the calls - readable_subset, readable_namespaces and restricted_namespaces_hidden_from read each verdict with row_reach (or the new authz.restricted_verdict). A namespace whose grant could not be read is still left out, and the answer notes identity: fanout_unverified, code_links_unverified or restricted_unverified, naming no namespace. The request-SLI scan pins direct row_reach and restricted_verdict calls too. - ops.incidents answers requests: read, not_permitted or unread on every answer, so an ok that did not consult the org's calls says so. - memory.search parks the notes taken through the verdict, so a failed term leg is named on later pages too. - code.index_status notes lag_unknown when no clone tip is published and git cannot read the mirror's. - Code lessons note a failed file read, and a lesson path or file read cut within the fixed enrichment bound; a cut by the call's deadline stays unnoted. - code_backport_gaps notes a pass failure (FellBack) for a fix whose read falls back again, so a fix that never gets written builds a streak. - Comments and docs: the table-summary except, the brief builder's scoped(), and the ops.incidents source cache in the degraded section. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…stry notes The `read` class counted `ops.incidents` itself, so a client polling it through an outage diluted the failures it asked about and helped a quiet org clear the call floor. The request read now filters on `operation != 'ops.incidents'`. `loom_search`'s repository legs dropped silently when the registry was not read yet; they now note `identity: repo_registry_unread`. `restricted_hidden` returns whether a restricted grant could not be read, so `ops.incidents` no longer infers it from the notes inside a unit. The `deployment_scoped` reference row, the `memory.set_from_messages` `degraded` description and the dashboard's reason for leaving out the op match what the code does. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The binding gate read the grant through `row_in_scope(..., hides_answer=False)`, which turned an unreadable grant into a quiet refusal, and its except only logged. code.history, code.blame_range, code.symbol's history, code.bisect_candidates and memory.ask then answered without the tracker facts and named nothing. The gate now reads `row_reach`: an unverified refusal of a tracker Loom adds notes `identity: tracker_unverified`, one the caller named still marks the request, and a gate that raises notes `identity: tracker_gate_unchecked`. The duplicate check's fan-out, the test signal's churn namespace and a remote's indexed branches note the same way, and memory.ask notes a failed tracker facts read. The monitoring page and the incident settings' comments say `ops.incidents`' own calls are left out of the request share and the call floor. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com> # Conflicts: # sdk/go/wire/models.gen.go # sdk/rust/src/wire_models.rs
…cker notes A failed symbol-stats or unit-risk count was not cached, so every code.index_status call reran the FINAL counts. It is now kept for PROBE_ERROR_TTL_S with its kind, and every answer served from it names it in `degraded`. memory.ask's record route notes a linked tracker it could not read (`memory.ask: record_tracker_unread`) beside the answer's `Not read` line. The `degraded` comments on memory.search and memory.set, the SDK docstring and two guides say the field names a provider, a store read or a gate. The guide's `deployment_scoped` row matches the reference, and the incident share comment and two paragraphs are rewrapped. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
A kept failed count was served before the published row was looked at, so a status whose state already held the summary answered zeros and a note for up to PROBE_ERROR_TTL_S. The row in hand now answers first; the kept failure only spares the count. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The memo was cleared at 256 entries before a kept failure was served, and the failure was not written back, so the next poll reran the count the entry was there to spare. The eviction now runs only before a write. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
tests/unit/test_degraded_unnoted.py walks server/code/app and server/memory/app outside the index plane. A broad handler passes when it always raises, calls degradations.partial, note or restore, or keeps the failure's text for the answer through caller_text(e). Every other handler is listed in tests/unit/degraded_unnoted.txt with its category, and the test fails on a handler in neither place and on a stale entry. Going through the list added a note wherever the answer got smaller: memory.search's computed count, date difference and support count, its outer stage catches, graph, chunk, boost, spelling and paging legs; memory.ask's decomposition, intent, grounding and row legs; set_from_messages' judge, sweep, backfill and checks; context.pack's sections; code_index: state_unread, which judges a commit against cached heads; and the code search, grep, bisect and citation reads. Seven caches that kept a failed read as a plain value now keep its text and name it on each answer served from them. A failed re-read under scoped() is noted after the block, which drops an unserved re-read's notes. Store fallbacks that fed provider health with nothing to clear them now use partial. The rerank endpoint and Cohere record their successes, and a second test fails on a health-counted note no record_success clears. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
index_as_of serves its block from a 30 s cache. A block built while the clone's lag read failed (lag_commits -1) is kept with the failure's text and names git_mirror: lag_unknown on each answer served from it, not only on the first. code.repos' listing gate noted identity: listing_gate_unchecked for every exception, including the PermissionError and IdentityIncompleteError that list a repository request-only to a member who cannot read it. It now notes only a check that could not run, such as a failed SCIM read. code.coverage keeps a failed gap read for the counts' max age again, rather than retrying it on every call, and names it on each page served from it. The sender census's reviewed digest of sdk/python/loom/memory.py is renewed for the docstring change to `degraded`; no sender changed. The code.search pick tests stub the coverage note their fake repository cannot read. Part of: #2040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Resolve the overlap with the review-brief verdict change: - code.setting_facts keeps main's verdict and causes and notes each read that failed. - The PR overlay keeps main's count of a parse that raised. Calls or edges the extractor could not list are counted in overlay_note the same way, and the overlay is kept with that note. - The brief builders keep main's store gates inside their unit, beside the keepable gate. The reads main added note a failure: file rows, a file's language, wiring callers, the indexed head and the drift read. The repository config, read in process, is listed as a settings fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The memory stack's build and a knowledge search's render held `current()`, which flattens the scoped list: an `unkeepable` mark set in the step never reached the caller's unit, and a group held inside it was listed as a copy a later swap could not change. A held group now carries notes, inner groups and the mark, `_flat` and `keepable()` read through it, and both steps hold their `scoped()` list. Dropping the step takes all of it back. code.setting_facts gets a test that fails its test-count read: the note is listed, the count is 0 and the causes are unchanged. A merged review brief served unstored logs its failed reads, whether a read fell back and whether the tracker read failed, as the open brief does. The allowlist header names the four kinds of site the scan lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The sequential re-read returned `current()` from its `scoped()` block, so the pass that serves it restored flat text: a mark set in the re-read never reached the pass's unit. It now returns the scoped list, as the memory stack and the knowledge render hold theirs. The review brief builders bind whether a read fell back, and whether the tracker read failed, once for the store gate and its log line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The docstring of _sequential_pass broke a sentence across a short line; it is reflowed, with no change to the text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
A failed re-read answers None and is never served; its note is taken after the scope, so it stays when the caller drops that re-read's list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
…ile note Under a marked plan, loom.search's knowledge section builds the wider search while it ranks the first pass. When the renewed first pass fills the page alone, the section served no wider result but kept its render notes; it now discards the wider search before it returns. mentor.brief named profile_unread whenever the profile was None with the TTL on, but mentor_profile also answers None without a read for an empty org or namespace. The note now needs both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
loom.search, marked plan: the first ranking's eager widening that failed wrote knowledge: widened_hits_dropped, although that ranking is never served once its widening failed. Its expander now records the error and answers with the first pass; cached raises it again only for a renewed ranking that still needs the wider result, and an ordinary section names its own widening. Repository search: the notes a pass's legs make while they run (a lexical leg dropped, the extra leg's repo_docs_dropped) went straight into the request's list, so a pass left out kept them. run_repo_search now runs its legs in scoped() and holds that list on the RepoSearch; discard() empties it, and a served pass lists it through the group. A search that fails holds nothing, which replaces the finished-leg loop. code.backport_gap: its symbol, patch and history stages run under fixed walls (settings, as the op takes no caller deadline), so a stage cut by its wall is a slow read; a cut and a read that raised are now noted (code_index: symbol_presence_*, patch_presence_*, git_mirror: branch_history_*, with the exception's type). mentor: profile_read_applies(org, namespace) is the one no-read rule for mentor_profile, warm_profile, the hint and mentor.brief. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Resolve the overlap with the MCP read client and the source live read: - response_body keeps main's _note(op, ...) and lists the request's notes through on_response. - The Go, Rust, TypeScript and Ruby SDK tables and the operations and status references are regenerated: 382 operations, main's knowledge.source.live beside this branch's ops.incidents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
A stage cut or read that failed on one branch made the nightly worker read the whole fix as fallen back: no branch got a row, FellBack was noted, and the streak built. Each such outcome is the branch's own, which its row carries (a presence reason of deadline or error:*), so the worker's fallback check now leaves out backport.BRANCH_STAGE_NOTES: the six stage notes and the history leg's patch_history_timed_out. A fix-wide note (the fix ledger, the tracker, file presence) still keeps the fix unwritten. code.backport_gap keeps listing every note. The stage notes take the error itself as their reason, so a Loom error reads as its code, and branch_presence_unread is file_presence_unread. docs/reference/http-api.md now promises what holds: degraded never leaves out a fallback the served answer used, Loom takes back the notes of the work it drops at the sites it names, and it names three cases where a note of replaced work stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5240eda. Configure here.
Two more per-branch history notes made the nightly worker leave the whole fix unwritten: git_mirror: patch_history_unread (a branch's tip read raised) and patch_history_line_unread (a line probe raised). Each leaves that branch's history reason error:<type> and its row at the symbol floor. git_mirror: lag_unknown is one branch's lag, which no row stores. BRANCH_STAGE_NOTES holds all three now. file_presence_unread stays out: that branch's row would read no_index, not error:*. A worker test drives every member of the set through compute_fix and the composed read (the real stage where cheap, else a branch read that makes the note) and checks that every branch's row is written; another checks that a failed file presence read still leaves the fix unwritten with FellBack. The worker's docstrings name the exception. docs/reference/http-api.md: Loom never takes back an entry of a fallback the served answer used. The places it lists take back their renders' entries; only loom_search's repository search takes back its legs' entries too, when the whole search is dropped, and those leg entries are among the examples that stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Resolve the overlap with source worker history: the source access plan test keeps main's binding and store imports beside the degradations one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
A mirror git cannot read (`rev-parse` exits 128, as for an empty directory or none at all) answered `no_branch_ref` with no note, and a `git log -S` probe git refused answered `error:git` with no note. Only the ref's miss (exit 1) is `no_branch_ref` now; any other exit raises `MirrorReadError`, so the history stage names `branch_history_unread`. A probe exit other than 0 raises too, so the leg names `patch_history_line_unread`. `BRANCH_STAGE_NOTES` is `BRANCH_NOTES`, since an unknown lag is no stage outcome. Its comment and the worker's docstrings say what each member's row stores: a symbol-presence cut or failure stores `unknown` with `deadline` or `error:*`, a patch or history one the symbol floor, unsettled, and an unknown lag changes no row. They name the per-branch notes left out of the set: `file_presence_unread`, `backport_ledger_dropped` and `as_of_unread`. A line probe that raised leaves the branch undecided unless another probe names the pick. `docs/reference/http-api.md` says a document search that lost a mirrored document takes back the lost render's entries, and the comment on the wider pass's `discard()` says its legs' notes go too. Tests: a missing ref is still `no_branch_ref`; an empty or absent mirror raises; an empty mirror through the nightly worker names `branch_history_unread` and writes every branch's row; a refused probe on either leg is named; a branch whose ledger read failed leaves the fix unwritten with `FellBack`; and an unknown lag writes the rows written without it. Each fails without its change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
`_unreadable_ref` answered `no_branch_ref` for an empty `git_dir`, which means there is no mirror at all. Only an empty branch name answers `no_branch_ref` now; an empty `git_dir` raises `MirrorReadError`, as a mirror git cannot read does, so the history stage names `branch_history_unread`. The empty-mirror test covers an empty path and fails without the change. The comments on `BRANCH_NOTES` and the worker's docstring say a patch or history read leaves the row that presence and the record gave (a files-only fix floors on file presence, and a branch the record decided keeps that verdict), that an unknown lag changes no row, that `as_of_unread` reads `unknown(no_index)` where the row would read `not_affected`, and that a line probe that raised leaves the branch at `error:*`, or `deadline` when another probe timed out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The comment on BRANCH_NOTES and the worker's docstring listed what each note's row stores, which missed a branch the record decides and a probe that names the pick. Such a row claims only what the reads that answered show; that is the rule the worker relies on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
… is restated A failed index watermark read (`as_of_unread`) keeps the fix unwritten, now with a worker case beside the file-presence and ledger ones. `_read_fix` and the per-branch test no longer restate the rule the module docstring holds, and the left-out notes can leave such a row: on a branch the record decides, none changes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Three notes about one branch's read stay out of BRANCH_NOTES and keep the fix unwritten; the worker's docstrings now say "a note BRANCH_NOTES lists" where they said any note about one branch's read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
This was referenced Dec 4, 2026
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.

Part of: #2040
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Responses served from a fallback or a partial read name it in
degraded(provider: effect (kind)), over HTTP and MCP, and leave the key out when nothing was noted. The transports add a request's notes to every op's response; the ops whose fallbacks note are listed below. The newops.incidentsop lists the failing readiness checks, providers and workers and the caller's org's server-side failure rate, for a client to poll. Amemory.bulk_setwhose live-row lookup fails now refuses with a retryable 503 (BACKEND_UNAVAILABLE, or the store's own code) and writes nothing, instead of writing the batch as if no key existed;memory.append_batch, which refused such a batch with a 422VALIDATION_FAILEDthat a client does not retry, answers the same retryable error. Other behaviour changes:code.symbol_historyanswerstracker_unavailablewhen its tracker side fails, more review briefs are served unstored (stored: false), an answer fromLOOM_LLM_FALLBACK_MODELis no longer cached or stored as a precedent, a duplicate check that fell back or could not verify a tracker is no longer reused bycode.bisect_candidates, acode.searchwhose literal read reached its bound is no longer memoised, and theunknownoutcome of theloom.memory.writesmetric is removed.Why
Item 3 of the issue: clients could not tell when Loom was degraded. In three windows, 40% to 100% of calls failed (one window: 1,618 of 1,618), and reviews made without Loom looked normal.
degradedat every depth (DIAGNOSTIC_KEYS). Only three output models declare the field (memory.set,memory.search,memory.set_from_messages), so a note recorded by any other op was dropped:memory.delete_version's deferred check,memory.webhook'snot_announced, the run claims and write fence, and the searches insidecontext.pack. Read handlers in the code and memory planes served a smaller answer and noted nothing at about 150 places. No op reported incidents:/v1/healthis a route rather than an op, and the 1,618-of-1,618 failure rate existed only inloom_telemetry.sli_minute.server/observability/degradations.py), but it reached a response only when the model declared the field and the handler copied it. MCP then deleted it. Nothing read the incident state for a client.Scope and risk
Transport.
degradations.on_response(body)merges the op's owndegradedwith the request's notes, each once, the op's own first. It removes the key when the list is empty. It runs on HTTP inarg_check.response_body. On MCP it runs inmcp_op_resultafter the lean pass, in_success_response(the replay and explain shapes) and in_search_answer.loom_searchalso ends its text with aDegraded:line, because clients that read only the text block would otherwise miss it. The lean pass keeps a non-empty top-leveldegradedand drops the copies inside sections, so an MCP idempotent replay serves the list its first answer stored, as the HTTP replay does. The per-model fields stay, because in-process readers use them (_record_gap_miss, theunsettledcount inloom_search).One field.
degradedis the one field a client checks, without knowing each op's own disclosure fields. A fallback the op also reports in its own fields (an abstain reason,skipped, apartial_reason, a*_failedcount inretrieval_work, a section'sfailed, anunknownverdict, a block's note) is listed indegradedtoo, and the op's own field is unchanged.tests/unit/test_degraded_unnoted.pychecks this for every broadexcept(Exception,BaseExceptionor bare), everyexcept TimeoutError(orasyncio.TimeoutError) and every handler of a gateway's refusal for the caller (ModelCallRefused, or itsModelCallDeferred; found in review) inserver/code/app,server/memory/app,server/knowledge/app,server/tracker/appandserver/llm, and for every exception branch over anasyncio.gather(..., return_exceptions=True)result there: the exception side of anifor conditional expression that testsisinstance(x, Exception)orisinstance(x, BaseException), and a comprehension that filters the failures out, which always counts as un-noted. Ofserver/code/app/index/, the test scans the 38 modules the scanned apps import from outside that package and those these import in turn, read from their imports so a new one is scanned too. It stops at the ingest pass thatcode.refreshand the ingest worker run (ingest_pass,pass_stream,entry_lock,erasing) and the per-file ingest only that pass calls (ingest, its stages,round_reads,pass_fetch, the compiler tier, dependents, descriptions and embedding reuse:bootstrapimports them forindex_slice, which onlyingest_passruns), which write the index and whose notes reach no answer, like the workers and stores, which are other packages. A site passes when it always raises (araiseunder anifdoes not count), callsdegradations.partial,noteorrestore, calls a function of the same module that does (_leg_errorinloom_search), or keeps the failure's text for the answer withcaller_text(e): a kept failure noted on each answer served from it, or a failure field of the response. Every other site is listed intests/unit/degraded_unnoted.txtaspath::function::ordinal category,path::function::timeout::ordinalfor a timeout handler,path::function::refused::ordinalfor a refusal handler, orpath::function::gather::ordinalfor a gather branch. The test fails on a site in neither place, and on an entry that no un-noted site matches, so the list only shrinks; anoted_by_callerentry without the comment that says where the caller notes fails too, and so does ananswerentry without its reason. Before its fixes below, the gather rule foundcode.setting_facts' reads,code.blame_range's enclosing function and review comments,code.symbol_history's issue facts and tracker side,memory.for_file's other namespaces andloom_search's tracker namespaces, and more. Of 939 broad handlers, 61 timeout handlers, 1 refusal handler and 28 gather branches, 569 sites pass and 460 are listed: 169write, 100logged_only_nonanswer, 66telemetry, 31full_answer_fallback, 29cache_fallback, 22fail_closed(a security or privacy check that cannot be read refuses, as it does when it refuses: a crawl authority, a caller's ownership, an erasure ledger, a damaged stored namespace map; and the mirror reads below that run only for candidates or admitted documents), 18noted_by_caller(the caller names the fallback from what the handler returns, indegradedor in its own field such asoverlay_note, and the line says where), 16settings, 8deadline(a timeout of what is left of the caller'sdeadline_msor budget: the budget working, below) and 1answer(what the handler returns is the answer itself, not a fallback, and the line says why). The index modules hold 93 of those sites; 47 are listed. By dir:server/code/app321 sites (111 listed),server/memory/app511 (254),server/knowledge/app115 (59),server/tracker/app66 (21),server/llm16 (15). The scan reads each handler and gather branch on its own, so it does not see a result tested in another function,asyncio.wait, anisinstancefilter that keeps the successes, an exception test inside aBoolOp, a handler of another narrow exception (aGitError, aValidationError), or which call of a noting helper runs; the test's docstring says so. It missed the pick'sexcept ModelCallRefusedfor that reason: a narrow handler, which kept the ranking for a gateway's 403 or 429 and noted nothing (found in review). The scan now reads refusal handlers too; these dirs hold two, and the other sits in a tuple withTimeoutError, so it was already read as a timeout handler. Thebudgetandown_deadlinecategories, which no entry used, are gone;deadlinelists the timeouts of the caller's own budget the timeout rule found. The decision extractor runs from the CLI and the knowledge source sync, not from an op, so its handlers arelogged_only_nonanswer, and its CLI preview carries nodegraded. Going through the list added the notes below marked as found by the scan.Each note once.
note()skips an entry the request already holds, so the cap of 8 counts distinct notes (two bounded reads that fail alike, or the two declined-call reads, take one place).Provider health.
ops.incidentsand/v1/healthlist a provider whose last call failed until a later success clears it. The notes that fed it with nothing to clear them now usepartial:write_fence,memory.delete_version,memory.webhook,run_claims,records: projection_skippedandclickhouse: vector_leg_empty, which listed their store fallback as a failing provider to every viewer for the whole window. So do thererank:openainotes, since the LLM client counts that call. The operator's rerank endpoint (rerank) and Cohere (rerank:cohere) now record a success on a well-formed answer, and Cohere's malformed answer notes as the endpoint's does. A second test intest_degraded_unnoted.pyfails on any health-counted note whose provider norecord_successclears, sodocs/operations/monitoring.md's "a later success clears it" holds for every providerops.incidentslists.Helpers.
degradations.partial(provider, effect, reason)isnotewithhealth=Falsefixed; every read fallback calls it.degradations.unit()isolates a block's notes, likescoped(), and then lists them in the caller's too: inside itcurrent()reads only what the block noted, so a cache gate inside it judges the answer the block built, and the response still names every note.degradations.hold(entries)lists an answer's notes as one group (Held) that the answer's replacement swaps for its own; another holder of the same note keeps its copy, so swapping one group never hides a note a served answer took.current()andrestore()read the groups in place, and a unit carries a group it holds to its caller unflattened. A plain note is deduplicated and capped against the request's own notes only, so a group that lists the same note, or fills the cap, and is later swapped empty does not take that note away (found in review;unit()exits throughrestore(), so this held for every unit).degradations.unkeepable()marks what a unit builds as kept by no cache without listing anything,keepable()is the gate (no note and no mark), and a unit carries the mark to its caller.scoped()yields the block's own list, whichrestorelists in the caller's with its groups and mark.memory.ask's mirrored attempt restores that list, so a mark set in it (a literal read its code grounding cut) reachesmemory.ask's unit and no precedent keeps the answer; restoringcurrent()dropped the mark (found in review). The memory stack's build and a knowledge search's render hold theirscoped()list the same way, as it stands, andmemory.search's sequential re-read returns its own for the pass that serves it to restore: a group holds notes, inner groups and the mark, so a mark set in the step reaches the caller's unit, an inner group is still the one a later swap changes, and dropping the step takes all of them back; holding or restoringcurrent()flattened both (found in review).Code-read fallbacks noted (all through
partial: a store read that failed is not a provider failure, and provider clients record their own):code.review_brief: open head, brief build, brief on miss, mirror facts, an unread diff, the rationale section's decisions and its diff.code.symbol: the uses and mention legs (besideread_failed), declined-call counts, compiler coverage and freshness, indexed paths, constructor coverage, override coverage, override edges, inherited dispatch, hierarchy, neighbours, dependency presence (run only on the dependency namespaces the caller may read, with an unverified grant noted), body hashes, PR context, the uses leg's fan-in.code.coverage_claimandcode.test_home: the positive control, SQL name terms, and the sibling, calls and names legs.code.search, andcode.askthrough it: the risk annotation; the lexical, vector, card, concept, HyDE, definition and history legs (beside their*_failedcounts and the history section'sfailed); the pick model (llm: pick_skipped, also when the gateway refuses the pick for the caller or asks it to wait, a 403 or 429 that provider health does not count; found in review); the fuzzy-symbol vote; fan-in; atrack_pathread; the query embedder (embedder: query_vector_dropped); the whole-file expansion. A later page names the notes of the run that ranked its pool, and reads its risk block, expansion and index head itself.code.grep: neighbours, the batch pattern scan, related and forwarded definitions (beside theirpartial_reason). A later page names its scan's notes.code.ask: the question embedding (embedder), synthesis (llm, beside its abstain reason), mechanism expansion, identifier expansion (llm) and memory context.code.pr_check: each leg and the merged-text leg.code.map: the call-graph hubs and the most-called symbols. A render the index head moved past is discarded with its notes; only the served render's reach the response.code.blame_range: unread issue titles, path presence.code.backport_gap: a branch's file presence and ledger backports, the fix's ledger facts.code.bisect_candidates: the fix blame (besideskipped), the rerank (beside itsfailedstatus), frame paths, issue edges, the indexed head, cause statements, the duplicate-check fix, the fix's cause, the fusion's vector leg (embed and read), code-history candidates.code.callers(overrides, the PR overlay beside itserrorreason, the candidate sites beside their note),code.verify_citations(a name lookup),code.conventions(the head placement, extern, category census, wide-callers, coverage, setting history, stateless-number and owner reads, beside theirunknownverdicts),code.setting_facts(the control),code.files(the reference sibling),code.history(tracker facts).code.index_statusandcode.repos: compiler inference, the worker ledger, the table summaries, the directory state, a clone's lag that git could not count over a mirror it cannot read, or whose tip it could not read there when no tip is published (beside lag -1), the calibration check (beside its warning). A lag whose watermark or clone head the mirror does not hold (gitrepo.holds_commitanswers False on git's exit 1) is -1 with no note, since the commit may arrive with the next fetch; such a status is kept and published as whole.code.enclosing(sections, decorator extents, a body fetch),code.outlineandcode.verify(a reference head, a file row, a body span).code.bisect_candidates(PR records, the merge ledger, named-cause rows),code.blame_range(the branch head),code.verify_citations(error codes, the merge ledger),code.map(the embedder's model name),code.first_build(the merge ledger),code.grep(enclosing bodies, besidedefinitions_partial; declaration extents; context and source recovery),code.index_status(the state read,code_index: state_unread, so a commit judged against the cached heads says so; the worker registry; commit metadata; coverage gaps), a namespacecode.symbolorcode.greppresence could not answer (beside itsunknownrow), onboarding's worker ledger, the repository listing gate (identity: listing_gate_uncheckedfor a check that could not run, such as a failed SCIM read; a refusal lists the entry request-only with no note), an open brief's items row,code.search's outcome prior, rerank (rerank: input_order_kept), pick client (llm: pick_skipped), symbol bodies and fan-in hubs,code.impact's indexed prefixes, a class outline, co-change ranking.code.setting_facts(the declaration, history, randomizer and tests reads,code_index: setting_<read>_unread, beside the cause code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046 names incauses; a failed test count has no cause),code.blame_range(the enclosing function and the review comments, each leaving its half empty, and a merge-ledger read beside the leg'sfailed),code.symbol_history(the linked issues' facts, and the tracker side),code.bisect_candidates(each fusion window's tracker read and embed, beside the window's status, and a linked tracker's scan), andcode.review_brief's build (each section beside itsfailedsection, the function rows, caller counts, fan-in and the PR author; of the reads code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046 added, the file rows, the language of a file the PR adds, the wiring callers, the indexed head and the drift read, each beside the section'sfailedorgit_head:unread, and the repository config, read in process, is listedsettings).code.symbol_history: a tracker side that raised left the tracker namespace blank, sotracker_unavailablenever fired; it now answerstracker_unavailable: truewith the cause, and the namespace stays blank since the side did not say which it read.code.historyandcode.blame_rangeserve each PR without its review comments when that read fails (code_index: pr_reviews_unread). The PR overlay ofcode.callers,code.impactand the open review brief notes a head it could not place (pr_head_unread) and a name-table chunk it could not read (code_index: overlay_names_unread), which left the overlay binding fewer edges; a changed file whose calls or edges the extractor could not list is counted inoverlay_note(N changed file(s) whose calls could not be extracted), where it counted nothing. Like a parse past its limits, or one that raised (which code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046 counts), it fails the same way for the same content, so the overlay is kept with that note, its file stays inparsed, anddegradeddoes not list it; a second parse that fails is the machine's, and code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046 counts that file as not reached. A commit's coverage (code.index_status commit=, theat_commitreads, the history bound) notes an ancestry, commit-count or changed-path read git could not answer (git_mirror: ancestry_unread,commits_since_unread,paths_since_unread), where it answered unknown or -1. A history read on a host whose clone failed notesgit_mirror: clone_failed (<reason>)beside itsno_git_mirrorgap; one still cloning notes nothing. A failed read of the self-service registry, which keeps the last snapshot, notescode_index: registry_unread, so acode.reposlisting served from it says so.code.repos' fork lookup notescode.repos: fork_upstream_unreadon each answer served from a failed lookup it keeps.code.context_pack's task briefing notes a section that failed (code_index: task_pack_section_dropped). The review brief's risk section reports a failed fit read asrisk_failed(risk_fit.stored_fitraises), where it answeredno_fit.as_offreshness block, the repository gate ofloom_search's repository legs (identity: repo_gate_uncheckedwhen the check raises,identity: repo_gate_unverifiedwhen the grant cannot be read,identity: repo_registry_unreadbefore the process has read the repository registry), and the namespaces Loom adds on its own (below).Tracker facts noted. The binding gate (
binding._gated) answers for every tracker linked to a code namespace. When the grant cannot be read and the caller did not name the tracker, it notesidentity: tracker_unverified; when the gate raises, it notesidentity: tracker_gate_unchecked (<kind>). Neither names the namespace. That covers:code.history's tracker facts,code.blame_range's tracker side,code.symbol's history, andcode.bisect_candidates' other linked trackers;memory.ask's tracker facts, which also notememory.ask: tracker_facts_droppedwhen the facts read fails, and its record route, which notesmemory.ask: record_tracker_unread (<kind>)for a linked tracker it could not read, beside the answer'sNot readline;tracker.*search reads beside the addressed one (linked_trackers).The duplicate check's fan-out (
_may_read_tracker) notes the same way. It now marks or notes only when no way in admits the tracker, so a standard tracker whose own grant is unread but whose repository the caller reads is listed with no note.tracker.test_signal's churn on the deployment's default code namespace notesidentity: churn_unverifiedandidentity: churn_gate_unchecked.code.repo.remote_branchesnotesidentity: branch_namespace_unverifiedfor an indexed branch whose namespace it leaves unnamed. A tracker or namespace the caller named still marks the request the server's, as before.Memory-read fallbacks noted (through
partialas above; the embedder and LLM clients record their own failures):memory.search: the term leg (besidefailed), row tags (besidetags_unread), unit bodies, an unreadable page blob, the hard tag belt (beside its unverified count), the chunk, lexical, records, unmatched, session-summary, entity-summary, current-state and profile legs; recency backfill, set chunks, set expansion and sub-query embeds; the anchor pool, digest descent, key match, tiers, aggregates and temporal diffs; code links and entity aliases; the LLM query aids (the judge and the derived-intent call, failed or past their fixed bound; query entities; verb synonyms); the narrowed page, scratchpad, usage, source bodies and successors; the pending-extraction count. A later page names its ranking's notes.memory.ask: each completion leg, knowledge, the mention window, decisive chunks, identifier rows with their latest word and ranking, PR history and the items fallback, dated turns, code grounding (symbol, search, PR facts, staleness, the PR temporal gate), raw and pending evidence, the run scratchpad, trusted rows, the supersession mask.memory.getandmemory.for_file: code links, the canonical row, the caller's other namespaces (failed, or past_OWN_ROWS_SECONDS).context.pack: startup recall, authors, each optional section, the runs manifest, the knowledge scope, namespace health.memory.search: graph expansion, triple matches, recent seeds, the reinforcement fold, entity boosts, chunk windows, HyDE, query spellings, the mention boost, entity aliases, term scores, BM25 weights, a tier row, a parked row, duplicates and their canonicals, relative dates, the next page handle, the reranker config, and the read-your-writes check and its sequential reads. A failed re-read is noted after itsscoped()block, which drops the notes of a re-read that is not served.memory.ask: decomposition and each part, compound parts and entity follows, query intent and options, time cues and dated turns, literal turns, identifiers and their chase, bridge and completion rows, code grounding and PR facts, deep selection, pending evidence, the consistency and premise checks, grounding scores, the synthesis route.memory.set_from_messages: the judge, the durability check, relation backfill, the coverage sweep, ontology warnings, forget candidates, the echo and stored-fact checks.memory.for_file's other namespaces (memory.for_file: other_namespaces_dropped), andloom_search's tracker namespaces whose search raised or answered unavailable, and its duplicate check answering unavailable (loom_search: tracker_dropped).memory.ask's pending evidence notes a malformed batch it skips (memory.ask: pending_batch_dropped). The knowledge leg ofloom_searchnotes through_leg_errorin the handler itself.memory: conflict_unchecked;uncheckedcounts only the checks past the cap),memory.set's verdict peers and classifier config,memory.get's served figures,memory.recall's next cursor,memory.restore's Undo record,memory.export_evidence(a cursor that does not decode restarts at the first page),memory.stack(profile, procedures, knowledge),context.pack(decision records, each optional renderer, the checked pack's knowledge and stack sections),loom_search(the namespaces anall_minesearch could not resolve, and the profile leg, which now carrieserroras the other legs do),facts.traverseandfacts.path(the graph write marks),procedure.match(an unreadable namespace's rows),procedure.locate(failure notes),conflicts.resolve(the review count),session.brief_save(a window revised without the model, after a failed call, which re-raised only for a switched-off org, or a rejected reply), and the knowledge search's widened hits.loom_search(repository decisions, the tracker leg, and the memory, knowledge and conversation legs beside theirerror),facts.traverse(the hub policy, communities),namespace.snapshot(the type registry),procedure.match(the goal axis),memory.proposals(usage),memory.stack(knowledge),memory.inspect(each section besideskipped),ops.projection_failures.retry(a failed retry beside itserror).Knowledge, tracker and LLM fallbacks noted (found by scanning those dirs and the timeout handlers, unless marked):
LOOM_LLM_FALLBACK_MODEL's wrapper,memory.askandcode.asksynthesis among them: an answer the fallback model gave after the configured model's provider failed (llm: fallback_model_answered (<reason>)), noted once the second call has answered: a second call that fails too claims no answer.knowledge.searchand the knowledge leg ofloom_search: the lexical leg's corpus statistics, the rerank pastknowledge_search_rerank_timeout_s(rerank: input_order_kept), narrowed spans, the live results of alivesearch, and repository documents (knowledge: repo_docs_dropped;code.context_pack's docs section,repo_docs_unlisted). Also extractor formats past their timeout,knowledge.inspect's sections, job comparison and listed heads, andnamespace.tune's artifacts.knowledge: mirror_unread, the markerdocs/architecture/document-sources.mddefines, with no reason, since an error's text could name a mirror row. Nothing wrote that marker before. A read the leg issues only for candidates (the lists, the members rows, the heads) or for an admitted document drops the mirrored results with no note: candidates include documents the reader may not see, so a note there would tell a caller that a hidden document matched. Those 15 handlers are listedfail_closed. For the same reason the repository-docs search, its renewal (found in review) and the listing, which run their candidate checks insideknowledge_repo_docs_timeout_s, name no timeout under a plan that reads mirrors (repo_docs_dropped,repo_docs_unlistedstay for every other failure, found in review): a timeout there can depend on documents the caller may not see. The response's latency is that same signal and is unchanged, and so is whetherdegradedlists that leg's own render notes, which follows whether the leg answered within its bound.docs/architecture/document-sources.mdputs both out of scope (found in review); closing them is not this change's.loom_search: knowledge_leg_dropped, new here, repeats the knowledge section'serror, whichmainalready serves, and no leg timeout wraps that leg.request_work.http_mirror_unread,RequestWork.mirror_unreadandmark_mirrored(unread=...)had no reader and are removed.degradedcan also name a fallback of work the served answer replaced, which costs that answer a cache entry and hides nothing;docs/reference/http-api.mdgives examples. Eachknowledge.searchrender runs inscoped()and its notes are kept only when it is served, so a render that lost a mirrored document mid-request takes its rerank or span note with it; the served render's notes are held on theCheckedSearch, and its ordinary fallback (CheckedSearch._fallback, which repository docs,context.packandmemory.stackalso reach) swaps them for its own.memory.ask's mirrored attempt runs inscoped()too: a lost document discards it with its notes, and an attempt that raises otherwise keeps them. A search pass the answer leaves out for good takes its group back too (discard(), found in review): an ordinary render that fails, whose caller names the failure; a repository-docs leg dropped at its renewal or by its deadline; the wide pass the ordinary passages do not select; and the wider passloom_search's ordinary section does not serve. More drops take their groups back (found in review): a marked plan's eager wide pass the passages do not select, which_selectdiscards each time it leaves the pass out (a search lists its served render's notes again whenever it is read, so a later fallback that serves the pass names them); acontext.packknowledge or memory-stack section dropped for a failed read (CheckedPassages.discard(), andCheckedStack.discard()over the stack's build notes, now held as one group); both searches ofloom_search's knowledge section when the section fails, and its wider search when a marked plan's renewed first pass fills the page without it (found in review); and a repository-docs leg that answered before its base search failed. A repository search holds what its legs noted while they ran (such asknowledge: lexical_leg_droppedand the extra leg'srepo_docs_dropped) as one group around its renders' groups, so a repository search dropped whole takes those back too and a served one lists them through the group (found in review). Every other dropped pass (the passages' wide pass, acontext.packknowledge section, a repository-docs leg past its deadline) takes back its renders' notes only: what its legs noted before it rendered stays (found in review). A marked plan's first ranking whose eager widening failed names nothing, since it is never served: the renewed ranking namesknowledge: widened_hits_droppedonly if it still needs the wider result, and an ordinary section names its own widening (found in review). A search that fails as a whole keeps its other legs' groups, since a caller can still ask it for its ordinary answer, served from those renders. The ordinarymemory.askattempt reuses nothing the discarded one read: each attempt builds its own answer state and reader copy, nothing in an attempt writes the run, the premise check runs before both, and no read on that path is memoised per request, so each fallback the second attempt takes is noted in it again (checked in review).conversation.searchand the conversation leg ofloom_search: a query embed that failed answers by substring (embedder: conversation_substring_fallback).tracker: <leg>_leg_dropped (<cause>), written whereleg_statusis built, so a leg the retry recovered is not named). Also a tracker item's fixed-by files, a tracker answer's andtracker.similar's linked trackers (tracker: linked_tracker_unread), eachtracker.similarleg left unavailable, the similar-items catch-up (failed, or past its share), the test signal's churn, smells and name candidates, a source's contract and freshness views and a table its contract could not describe for a reason other than its absence (an absent table is the contract'smissing), the patch history (a tip or line probe that raised, a git call past its timeout), the item facts the code ops read (tracker: item_facts_unread), the fix candidate of bisect and backport,memory.ask's record route, and the tracker bindings and source registry when they could not be read. A damaged stored namespace map links no namespace, so every check on that source refuses (fail_closed, astest_a_source_whose_namespaces_did_not_parse_is_refusedpins); raising it into the refresh instead would keep every source's last snapshot while one row is damaged, and at boot leave the registry unloaded, so readiness would never pass.code.search: a HyDE leg cut byLOOM_CODE_SEARCH_LLM_LEG_GRACE_MSwith the request's budget left (llm: hyde_leg_dropped; found in review: the legs are awaited withasyncio.wait, which the scan cannot see). A literal read past its 0.5 s bound names nothing, as the leg's docstring says: that is the answer for a literal many functions hold, not a fault, so it is listedanswer. A slow store can cut a rare literal's read too, so the run counts the cut (retrieval_work.literal_read_cut: 1) and marks its unitunkeepable: thecode.searchmemo,code.ask's answer cache andmemory.ask's precedent store keep nothing built on it, and a decision's code discovery is deferred (found in review). A frame, name or literal lookup of the definition leg that fails countsretrieval_work.definition_leg_failed: 1, which makes the answer partial (partial_reason: retrieval unavailable: definition) as a failed lexical or vector leg does, so a decision's code discovery defers on it too; the lookup was already noted (code_index: definition_leg_dropped; found in review).code.bisect_candidates(found in review): the duplicate check pastcode_bisect_dupcheck_timeout_s(tracker: dupcheck_fix_timed_out) and the fix blame pastcode_bisect_fix_blame_budget_s(git_mirror: fix_blame_timed_out); cut by the caller'sdeadline_ms, they answerdeadlineand are not noted.code.backport_gap(found in review): it takes no caller deadline, and its symbol, patch and history stages run under fixed walls (code_backport_presence_budget_ms,code_backport_patch_budget_ms,code_backport_history_budget_ms). A branch a stage wall cut namescode_index: symbol_presence_timed_outorpatch_presence_timed_out, orgit_mirror: branch_history_timed_out; a branch whose stage read raised names the matching_unreadnote with the error asdegradedshows it (a Loom error's code and message, another error's type). Each git command pasttracker_patch_line_timeout_sstill namesgit_mirror: patch_history_timed_out.backport.BRANCH_NOTESkeeps those notes out of the nightly worker's fallback check, with a branch's history and lag notes (git_mirror: patch_history_timed_out,patch_history_unread,patch_history_line_unread,lag_unknown; found in review), so the worker writes each branch's row as the read left it, and that row replaces the branch's previous verdict. Such a row claims only what the reads that answered show (found in review). A failed read of the fix's ledger row (code_index: fix_ledger_unread) is fix-wide and still leaves the fix unwritten withFellBack. Three notes about one branch's read stay out of the set and leave the fix unwritten withFellBack(found in review):code_index: file_presence_unreadandas_of_unread, whose row can carryno_index, andbackport_ledger_dropped, whose row can readgapwhere the ledger holds the backport. A mirror git cannot read (rev-parseexits 128) answeredno_branch_refwith no note, and agit log -Sprobe git refused answerederror:gitwith no note, both onmaintoo; only a missing ref (no branch name, or exit 1) isno_branch_refnow, and either refusal raisesMirrorReadError, so the stage namesgit_mirror: branch_history_unreador the leg namespatch_history_line_unread(found in review).memory.search: the term leg pastmemory_term_leg_wait_msor its work bound, and a read-your-writes re-read pastmemory_search_fallback_max_wall_ms(read_your_writes_unchecked). Code lessons: a branch's code state that could not be read or parsed in time (code_lessons: branch_code_state_unread).memory.bulk_set(found in review): an identity-dedup read that failed writes the entries unchecked (memory: identity_dedup_unchecked), as the conflict check does.memory.get,memory.get_by_id,memory.listand the bulk get (found in review): a usage-totals read that failed keeps each row's own counters (memory: usage_totals_unread). The store notes it, aslifecycle.pydoes, since every caller that asks for the totals answers a read.git_mirror: fetch_failed). One still fetching is ordinary lag and is not noted, as for a clone.connection.list(found in review): a standing read that failed answersconnected: falseand namesknowledge: connection_unchecked; a lost standing or an unconfigured provider is a refusal and names nothing. The answer covers the caller's own accounts only.mentor.brief's writers and adoption reads (mentor.brief: writers_unread,adoption_unread), each evidence-ladder read itsskippednames (mentor.brief: <step>_unread, such ascalls_unread), and a profile whose read failed (profile_unread; a mentor turned off,mentor_ttl_seconds0, is no fallback and names nothing, nor, found in review, does an empty org or namespace, for whichmentor_profilereads nothing), andnamespace.list_mine's inherited rows, dropped when the creator's rows or the restricted set cannot be read (namespace.list_mine: inherited_rows_unread), and its metadata read, which falls back to the private defaults (metadata_defaulted).ops.incidents(found in review): a platform administrator's call whose tenancy check refuses (tenancy.ensure_heldin the restricted gate: a cell that cannot tell, or another cell's org) answersrequests: unreadwithops.incidents: requests_unread, where the op failed.Cached answers. A cache keeps an answer only when the unit that built it noted nothing and marked nothing
unkeepable, so a note the request made earlier (acode.askstep before its search, a fan-out's other namespace, a transport check) does not stop it, and enrichment applied after the cached part (lessons) stays outside. The units: a wholecode.searchrun (handle_code_search),code.ask's fresh answer and its store,code.map's build, afacts.traversewalk, amemory.askhandler, each review-brief build, each repository status. The constructor-coverage andoverridesprobes cache a failed read forPROBE_ERROR_TTL_S(30 s) with its kind, and every answer served from that entry notes it, not only the first. The same holds for theas_ofblock (git_mirror: lag_unknown): the lag cache keeps a failed lag read 60 s, and anas_ofblock built from it is kept 30 s more, so one failure can be named for about 90 s.code.coveragekeeps a failed gap read forPROBE_ERROR_TTL_Sin the process that read it (code_index: coverage_gaps_unread), with or without the coverage publisher, and publishes nothing:refresh_coveragewrites no shared row when the gap read failed, and raises for amust_landcaller, which then writes no counts, as when the row's write fails. A shared row without gap counts, as a previous build publishes it, is no answer either, and a whole row another process published while the failure is kept answers at once, as a published summary row does over a kept count failure. Every process then computes again rather than serving no gaps until the counts move, which on an idle repository was never. Acode.searchpool row keeps the notes taken when the ranking returns, before the risk block, the whole-file expansion and the index head, which each page reads for itself; each later page served from it notes them again (degradations.restore), since the pool holds what those fallbacks left. Acode.greppool row keeps the scan's notes the same way, taken inside aunitso the page's own context, definition and neighbour reads stay out. Amemory.searchpass runs in aunit, and its parked page keeps the notes taken through the verdict and the term leg's join, which place the pool's tail, before the tags and unit bodies each page fills; the key is written only when there are notes, so a blob without them is unchanged. A consistency reread runs insidescoped(): when its answer is served, its notes replace the first pass's in that pass's unit, and a reread that fails or finds nothing is dropped with its notes. Each payload is read with.get, so a page a previous build parked serves as before.code.index_statusandcode.reposkeep a status forcode_status_ttl_swith the notes its reads left, name them on each answer served from it, and do not publish such a status for the other processes; a failed table-summary read (symbol stats, unit risk) is kept forPROBE_ERROR_TTL_Swith its kind, so pollers do not rerun theFINALcounts on each call, and every status served from it names it; a published summary row in hand still answers while the failure is kept. A poll that finds its own kept failure returns before the memo's size eviction, but a write past 256 entries, for any namespace, clears the memo, kept failures included. It was kept for the ten-minute memo and named nothing. The statuses a cold listing computes together share one worker-ledger read in flight, and its future carries the read's notes, so each waiter lists them and none keeps or publishes its status as whole. A background status refresh starts its own note list. The nightlycode_backport_gapsworker reads each fix insidedegradations.scoped(); a read that fell back is logged at info with its notes and read once more while the pass is within its budget, and a fix whose read still falls back writes nothing, as for a tracker miss, so a night of fallbacks does not overwrite verdicts. A notebackport.BRANCH_NOTESlists is the exception: the row of the branch whose read made it claims only what the reads that answered show, and replaces its previous verdict. Each worker pass starts with an empty note list (_begin_pass_accounting), so one pass's notes do not hold back the next. In the memory plane, amemory.askanswer whose unit noted anything is not stored as a precedent; the pending-extraction count is no part of the answer, so its notes are kept apart and listed afterask. Afacts.traversewalk is not memoized when its unit noted anything; the pending-extraction count and namespace health cache a failed read with its kind and note it on each answer served from it. So do these caches now:code.search's coverage note, personalization directories and clone lag (a head the clone does not hold yet is unknown, not a failed read, as incode.index_status), the guard-stage read ofcode.path_guards, andmemory.search's key-axis probe, summary-entity vocabulary and namespace calibration. An open brief whose items row failed is served and not kept. The PR overlay is cached only when the parse that built it noted nothing, inside aunit; the per-file parse results it is built from keep a failed parse for their TTL, and each overlay built from one names it.code.repos' fork lookup keeps a failed read forLOOM_CODE_FORK_UPSTREAM_MISS_TTL_Swith its kind, apart from the answers, and names it on each answer served from it. The duplicate check's session memo (recent_answer, whichcode.bisect_candidates' fix stage reuses) keeps an answer only when the check's own unit noted nothing; the unit starts before the related-PR search, whose notes count too.prepare_duplicate_checkruns in a unit of its own, and a plan whose gates noted anything (identity: tracker_unverified,tracker_gate_unchecked,tracker: binding_overrides_unread) hascachefalse, since its answer may lack a tracker (found in review). Every one of these gates readsdegradations.keepable(), one gate for one rule (found in review): the PR overlay, the review briefs,facts.traverse, the duplicate check's plan and memo,code.mapand the repository status readnot current()before. Each sits inside itsunit();code.map's sits inside ascoped()whose list is its own, which it now restores whole. Onlycode.search's literal read marks a unit, and none of these units runs it, so no answer changes.Stored review briefs.
build_for_mergeandbuild_for_openserve a brief unstored (stored: false) when a read the build ran fell back, because the stored copy would later be served without itsdegraded. The ingest worker builds each brief insidedegradations.scoped(), so a brief's notes stay off the pass's list and off a waitingcode.refresh's;build_for_merge's ownunit()decides whether the brief is stored. Each section failure of the build now notes too, and so does a failed read of the function rows, caller counts, fan-in, the PR author or the index head (code_index: head_unread, served with a blankindexed_commit), so such a brief is served unstored at the ingest and on a miss alike. A brief built from the mirror, without a ledger row, reads its reviewers from the tracker before the build'sunitopens; when that read fails it notescode.review_brief: reviewers_unreadandbuild_for_mergeserves the brief unstored, since its provenance saystracker: failed. Stored, every later read would servetracker: failedwith no note and no rebuild. Acode.refreshthat waits runs the pass in its own request, and keeps that request's notes after it. A brief whose diff git could not read, for a PR that changed files, is served without its blame and diff sections: it notesgit_mirror: diff_unread (<kind>)and answersstored: false, where the merged brief used to answerstored: truefor a brief nothing stored. Amerge_shathe mirror does not hold is a miss, not a failure:mirror_commit_factsasksgitrepo.holds_commitfirst (rev-parse --verify --quiet <sha>^{commit}) and answers None when it answers False (exit 1), and a mirror git cannot read (exit 128) still raises and notesbrief_missing.GitErrorcarries git'sreturncodefor this, and the clone-lag check above shares the helper.Known cost. A brief whose read fails the same way on every build is never stored, so each call rebuilds it. code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046, which this PR merges, counts deterministic failures such as
ValidationErroras a cap rather than a failed read, which removes the main case; no cache is added for the rest. A backport fix whose read still falls back every night on a noteBRANCH_NOTESdoes not list is never written, for any branch; each such pass callsnote_failure(FellBack), so the worker's failure streak builds and the pass is run again early (Behaviour changes).degradedcan also name a fallback of work the served answer replaced, and such an answer is not cached, for example: what a dropped pass's legs noted before it rendered, unless the whole repository search is dropped; the renewed knowledge ranking'swidened_hits_droppedwhen the ordinary section is served in its place; what a repository-docs leg's legs recorded when the leg is dropped at its renewal (and that renewal'srepo_docs_droppedwhen its search is left out); and the first pass's render notes when the wider pass is served. Taking each of those back one by one did not converge; an extra note is the safe direction, and the scan guards the other one, a fallback the served answer used that nothing names. A literal read cut at its bound is the normal answer for a literal many functions hold (such as--dry-run, read asdry_run), and every cut marks its unitunkeepable, so such a query is never cached: nocode.searchmemo, nocode.askcache (each repeat pays for synthesis again), nomemory.askprecedent, and the decision preview always defers its code discovery. We accept that cost, because a memo of a cut answer would serve a partial list as whole (found in review).Slow reads are noted, budget cuts are not.
enrich.bounded()notes a read that fails, and a read cut by its fixed bound (code_enrich_timeout_s), which means the store answered slowly. The same holds formemory.search's judge and derived-intent calls (6 s) andmemory.for_file's read of the caller's other namespaces (_OWN_ROWS_SECONDS). It does not note a cut by thesecondsa caller passes.edit_readspasses what is left of the request's budget (max(0.0, until - now), often 0), andresult_lessonspasses what is left of the call'sdeadline_msonly when that is less than the fixed bound, so that cut fires on normal traffic whenever the budget runs short. A lessons read that no deadline narrows (oncode.symbol, or a search with time to spare) takes the fixed bound and is noted when cut. It is the budget working, like a token cut, and noting it would makedegradedconstant noise.ops.incidents(viewer, read, experimental). It is reached withloom_opand is not in the default MCPtools/list. Sources:errorwhen required, otherwisewarn.drainingis left out: a process shutting down still answers what it started, and every deploy drains one, so listing it would make each deploy an incident;supervisor.ALERT_THRESHOLD), the last within 6 hours, in this deployment's processes;sli_minute). The share and the call floor leave outops.incidents' own calls (INCIDENTS_OP): the op is in thereadclass, and a client polling it every 5 s through an outage would add about 180 successes to that class over the window, so 15 failed reads of 100 would read as 15 of 280 and no incident.Results are sorted errors first and capped at 20. Every answer says in
requestswhether the org's call counts were read, sinceokcovers its calls only then:read;not_permittedwhen the call names no single org or the caller does not read the org whole (most callers: a member, a narrowed, pinned or delegated token, flat or per namespace, and anyone with a restricted namespace hidden);unreadwhen the counts, the restricted set or a restricted namespace's grant could not be read.Load while polled. Each ClickHouse source (workers; request counts per org) is read at most once every 5 seconds per process, a failed read included, so clients polling through an outage add one read per source per 5 s. A lock per source and org makes the polls that arrive while a read runs wait for it and share its answer. Each read is cut at
readiness_check_timeout_s. A failed read is named in the op's owndegradedon every answer served from it, and the other sources still answer. The worker read filters onworker IN <enabled names>, the first column of the table's key, over 6 hours. It reads only rows that are unlabelled or whose label's first:segment isdeploy(DEPLOY_SEGMENT, the rulelabel_familyuses, sodeployer:xis not the deployment's), or only its own label on an isolated or a bench server, so those servers sharing the table are not listed. Readiness checks cache their own answers, and provider health is in memory. Both new statements are in the analyzer corpus.Tenant isolation. Request counts are read for the org the call acts in; a
*token that names no org reads none.sli_minutekeeps no namespace or user, so only a caller that reads the org whole reads them, by the rule the org-wide rollups use:reads_every_namespace(server/auth/context.py, now shared withresolve_org_scope), a platform admin or an org admin of the org whose claim is*. It must also read whole namespaces, and no restricted namespace of the org may be hidden from it (restricted_namespaces_hidden_from); when the restricted set cannot be read, it reads none and notesops.incidents: requests_unread. A delegated token reads none:org_adminis never delegated (delegable_role), and a child is capped atadmin(ceiling_role). A member's*token, an admin narrowed to some namespaces or pinned to one user, and a request with no token where one is required read none. The counts include calls to collections the caller cannot read. They name no collection, and only a platform admin or an org admin over*reads them, which we accept. Incode.symbol, a miss asks the dependency namespaces Loom added only where the caller may read them (row_reachper dependency), so a refusal is no note anddegradednames no namespace the caller cannot read. A grant that could not be read notesidentity: dependency_unverifiedand names no namespace, since the answer may lack one the caller can read. More gates read the grant the same way (row_reach), becauserow_in_scope(..., hides_answer=False)turned an unreadable grant into a quiet refusal:loom_search's repository legs (identity: repo_gate_unverified),memory.ask's code grounding (identity: code_grounding_unverified),code.ask's memory context (identity: memory_context_unverified), the branchescode.backport_gap,code.blame_rangeandcode.verify_citationsadd (readable_subset,identity: fanout_unverified), the code links ofmemory.get,memory.search,memory.for_file,memory.ask's staleness and code lessons (readable_namespaces,identity: code_links_unverified), the tracker gates above (identity: tracker_unverified,identity: churn_unverified,identity: branch_namespace_unverified), and the restricted namespaces an org-wide rollup leaves out (restricted_namespaces_hidden_from, through the newauthz.restricted_verdict,identity: restricted_unverified).ops.incidentscallscontext.restricted_hidden, which returns that list and whether a grant among it could not be read, so itsunreadanswer does not depend on which notes the gate takes. Each note carries no reason and names no namespace, and the noted answer is not cached or stored as a precedent. The worker, provider and readiness incidents are deployment state and are listed for every viewer of any org. That is a choice, and it widens what a viewer sees./v1/healthshows the readiness checks and providers unauthenticated, but?include=workersshows only the answering process's workers, and the deployment-wide streaks were readable only by a platform admin (/v1/admin/workers.status). A viewer now sees the deployment's failing worker names, streak counts and error classes, and no row content, org or namespace. A token of one org naming another, org-wide or narrowed, is refused: 403 over HTTP,ORG_MISMATCHover MCP. The op staysdeployment_scoped: without it the gate answers a narrowed token, which names no namespace,IDENTITY_INCOMPLETE. The flag's comment inbase.py, and its row indocs/reference/operations.md, now say such an op may also answer an org-wide aggregate its handler authorizes.Left out:
degradedon every response in the Python, TypeScript, Rust and Ruby SDKs. They do not modelignored_argseither; Go does, and it gainsdegradedthe same way.degraded.server/insights/app,server/identity/app,server/assistant/app,server/tasks/app,server/erasure/app, the store packages,server/embeddingandserver/clients. Review found request-path fallbacks in two of them, now noted (mentor.brief,namespace.list_mine, above). The rest have not been read, and scanning those dirs is a change of its own.GitError, aValidationError, a parse failure), which the scan does not read; it reads a gateway's refusal, above. Some drop part of an answer with no note, such as the PR overlay's changed-path read (ongitrepo.GitErrorfromdiff_name_onlyit falls back to the paths the cut diff names on its new side, which leaves out a deleted file (its new side is/dev/null), one with no text hunk (binary, empty or mode-only) and any past the cut), or a duplicate check ortracker.similarwhose vocabulary read raisesTrackerUnavailableand answerstracker_unavailable: truewith no note. Reading them would mean deciding, per exception class, which are refusals and which are failed reads.Also in this change. Each broad
exceptthis change rewrote, or added a note to, says what it keeps serving.docs/architecture/memory-architecture.mdno longer saysmemory.search_tracehas nodegraded. The dashboard's reason for leaving outops.incidentssays clients poll it and the dashboard shows deployment health on its own pages.docs/operations/monitoring.mdand the comments onLOOM_OPS_INCIDENTS_ERROR_SHAREandLOOM_OPS_INCIDENTS_MIN_REQUESTSsayops.incidents' own calls are left out. Thedegradedcomments onmemory.searchandmemory.set, the Python SDK's search docstring, and thedegradedrows indocs/features/memory/writing.mdanddocs/guides/debugging.mdsay the field names a provider, a store read or a gate, not only a provider.docs/development/adding-an-operation.md'sdeployment_scopedrow matches the reference. Thedegradeddescription ofmemory.set_from_messagessays it names the request's fallbacks in both modes, and in schema mode the projections it skipped. Its narrow-token reason says a narrowed token reads no request counts. The readiness leg no longer wrapsreadiness.evaluate()in anexcept, since each check already answers as failing when it raises or times out.OpsIncident.detail's comment names what each source puts there. Thedegradedsection ofdocs/reference/http-api.mdsays a missing key means no fallback was noted, not that nothing was cut; names the answers not kept, the caches that keep a fallback with its entries, listed by how long each keeps it (now withcode.index_status' symbol-stats and unit-risk counts,code.coverage's gap counts,code.search's coverage note and personalization directories, thecode.path_guardsguard stage, andmemory.search's key-axis probe, summary-entity vocabulary and namespace calibration; a failed lag read reaches theas_ofblock for about 90 s, not 30), and what a later page of each paged op names. The comment oncode.search's coverage-note cache is one comment again. The broadexcepts that gave no reason now give one. A tracker source whose stored namespace map does not parse still links no namespace, so each check on it refuses, and now logs a warning naming the org and source, never the map (found in review). The module docstring ofdegradations.pyis rewrapped (found in review).Compatibility, rollout and rollback
ops.incidents, whose answer always carriesrequests(read,not_permittedorunread).degradedcan now appear on any op's response, and MCP results now carry it.memory.set,memory.searchandmemory.set_from_messagesno longer send an emptydegraded: []. The SDKs already decode a missing key as empty (PythonNotRequired, TypeScript optional, Rustserde(default)). A raw client that indexes the key must treat a missing key as empty.LOOM_OPS_INCIDENTS_WINDOW_MINUTES(15),LOOM_OPS_INCIDENTS_ERROR_SHARE(0.1) andLOOM_OPS_INCIDENTS_MIN_REQUESTS(20).memory.bulk_set, the extraction paths that write through it (memory.set_from_messages, the observe worker) andmemory.append_batchrefuse with a retryable 503 when the batched live-row lookup fails, before anything is written:BACKEND_UNAVAILABLE(Retry-After: 1), or the store's own code, which passes as it is (POSTGRES_UNAVAILABLEon the Postgres path,OVERLOADED, or a 504BACKEND_TIMEOUT).memory.bulk_setused to write the batch as if no key existed: aread_onlykey's value was overwritten, the pin guard was skipped so a pinned key was unpinned, revisions were announced asmemory.written, and the response carried noskipped_*and no note.memory.append_batchdid not write such a batch: it answered 422VALIDATION_FAILED(could not verify fresh keys), which a client does not retry, for a coded store error too; both now answer the same retryable error. Theunknownoutcome ofloom.memory.writes, which counted the entries of such a batch, is gone, with its row indeploy/hyperdx_dashboards.md.code.symbol_historyanswerstracker_unavailablewhen its tracker side raised.code_backport_gapspass in which a fix's read still falls back is partial, where it was clean, so the supervisor runs the worker again afterworker_partial_retry_s(1 h by default), doubled for each such pass in a row and never past the 24 h interval.LOOM_LLM_FALLBACK_MODELis no longer cached bycode.askor stored as amemory.askprecedent, and acode.searchwhose HyDE leg its grace cut is not memoised: each unit noted a fallback.ops.incidentsanswersrequests: unreadfor a platform administrator whose tenancy check refuses, where the op failed with that error.code.bisect_candidates' fix stage runs its own check rather than reusing it.code.searchwhose literal read reached its bound answersretrieval_work.literal_read_cut: 1, and no cache keeps an answer built on it (code.search,code.ask, amemory.askprecedent); a decision's code discovery is deferred.code.searchwhose definition-leg lookup failed answerspartial: truewithpartial_reason: retrieval unavailable: definitionand serves no continuation cursor, andcode.ask's answer built on it is partial; itsdegradedalready named the lookup.degraded: the sharedcode.searchmemo forLOOM_CODE_SEARCH_MEMO_TTL_S(30 minutes by default); acode_review_briefsrow, which has no expiry and is served until the brief is rebuilt or erased; and, withLOOM_MEMORY_ASK_PRECEDENTSon (off by default), amemory.askprecedent while its evidence is unchanged, forLOOM_MEMORY_ASK_PRECEDENTS_MAX_AGE_HOURS(no bound by default; 1 hour on the fast path,LOOM_MEMORY_ASK_PRECEDENTS_FAST_MAX_AGE_HOURS). N reads every row N-1 writes, and nothing N writes is new to N-1.Tests
tests/unit/test_ops_incidents.py(16 tests):ok; a draining process is no incident; each source lists its incident, errors first;deploymentfor adeploy…label and only its own label for an isolated server;LOOM_OPS_INCIDENTS_ERROR_SHAREandLOOM_OPS_INCIDENTS_MIN_REQUESTS;degradedwhile the others answer;*token, a token an org admin delegated throughdelegation.delegate(minted asadmin), a narrowed or pinned org admin, a*token naming no org and no token read no request counts, and an org admin over*does;requests_unread;ORG_MISMATCH), and a viewer of the org, narrowed or not, is admitted on both;orgpolls the token's org.tests/unit/test_degradations.py(7 new tests):partialleaves provider health alone;unitcurrent()reads only its own notes, and the request lists both after it, from gathered child tasks too;on_responsemerges the lists, removes duplicates and leaves out an empty key;degradedfield carries the notes on both transports; the lean pass drops a section's copy and keeps a stored top-level list;loom_searchshows the notes in its text and its structured result.tests/unit/test_idempotency_across_transports.py: a replay carries thedegradedits first answer named, over MCP and HTTP.tests/unit/test_code_read_degradations.py:degradedtoo;code_enrich_timeout_sare noted, and one cut by a caller'ssecondsis not;overridesprobe, are noted on the next answer, served without a read;code.greppage 2 names its pool's scan notes;embedder: query_vector_droppedand is not memoized;code.mapwhose hubs and most-called reads failed names both and is not kept in_MAP_CACHE; a render whose hub read failed before the head moved is discarded with its note, and the second, whole render is served and kept;code.blame_rangeare noted;tests/unit/test_review_brief_store_needs_diff.py(4 new tests):stored: falseand notesgit_mirror: diff_unread (GitError), and so does an open brief; one with no changed file is stored and notes nothing;stored: falseand not inserted;code_index: head_unread (TimeoutError)and are not stored.tests/unit/test_ui_read_caches.py: a status whose read fell back names it on the computed and the cached answer and is not published; a whole one is published and notes nothing. Two statuses computed together while the shared ledger read fails make one read, both carryworker_ledger_unread, and neither is published. On a real repository, a lag from a watermark the clone does not hold is -1, notes nothing and the status is published; the same lag over a directory git cannot read notesgit_mirror: lag_unknownand the status is not published, whether the clone's tip was published or read from git.tests/unit/test_code_backport_gaps.py: a fix whose read falls back twice is read twice, writes no rows, counts as unavailable and logs its notes, which stay in its own scope; a fix whose second read answers whole writes its rows; a pass past its budget does not read again.tests/unit/test_worker_ledger_rows.py: a pass starts with no note.tests/unit/test_code_symbol_dependency.py: a dependency the caller cannot read is a miss with nodegradedand no namespace named; one whose grant could not be read notesidentity: dependency_unverifiedand names none; a failed run is noted.tests/unit/test_search_pages.py: amemory.searchpage parked with notes names them when served in another request; a page with none parks no key.tests/unit/test_memory_search_handler_gates.py: a note taken before validation is parked with the tail, and a tag note taken after it is not.tests/unit/test_search_read_your_writes.py: an adopted retry's notes replace the first pass's, a failed retry's are dropped and the failure is named (memory.search: read_your_writes_unchecked), and the caller's earlier note stays either way.tests/unit/test_repo_docs.py,tests/unit/test_memory_code_grounding_authz.pyandtests/unit/test_code_ask_cache_v2.py: each gate whose grant read fails answers without its part, notes it with no namespace, andcode.askdoes not cache that answer. The tests that fakedrow_in_scopefor these gates now fakerow_reach, andtest_request_sli.pyno longer lists the three call sites.tests/unit/test_repo_docs.py: a repository gate called before the registry is read answers without the legs and notesidentity: repo_registry_unread.tests/unit/test_set_from_messages_fail_closed.py: a plain-mode call whose step noted a fallback names it indegraded.tests/unit/test_code_review_brief_mirror.py: a sha the mirror does not hold, full or short, is None; a directory git cannot read raises.tests/unit/test_ops_incidents.py:requestsisreadfor an org admin over*,not_permittedfor a member, a flat and a per-namespace (ns_roles) delegated child, a narrowed or pinned admin, a*token naming no org and no token where one is required, and for a hidden restricted namespace;unreadfor an unreadable restricted set, an unverified restricted grant (restricted_hiddenanswers its flag) and a failed count read. A member and an org admin reach the op throughloom_opand seenot_permittedandread; the transport tests run the real handler.tests/unit/test_request_sli.py:readable_subset,readable_namespacesandrestricted_namespaces_hidden_fromleave out a namespace whose grant could not be read and note it, a plain refusal notes nothing, and neither marks the request. The opt-out scan now pins directrow_reachandrestricted_verdictcalls too (the latter inrestricted_hidden): the gates above that note instead of marking, and those that mark on an unverified verdict themselves. The tracker gates' callers move out of the opt-out for answers the tracker only enriches, into the gates that note. It also pinsrun.retract_credit's grant read (_retract_run): an unread grant refuses with a 503, which the request's row already counts as the server's.tests/unit/test_memory_search_handler_gates.py: a failed term leg's note is parked with the tail.tests/unit/test_code_result_lessons.py: a failed file read is noted; a slow one is noted when the fixed bound cut it and not when the call's deadline did; the lesson path read is noted only within the fixed bound.row_in_scopeforreadable_subsetorreadable_namespacesnow fakerow_reach, whichrow_in_scopealso calls:test_branch_fanout_skips_unreadable.py,test_code_blame_range.py,test_code_verify_citations_resolve.py,test_memory_code_plane_reads.py,test_code_first_build.pyandtest_code_result_lessons.py.tests/unit/test_tracker_binding.py: forcode.history,code.blame_range,code.symbol,code.bisect_candidatesandmemory.ask, a tracker whose grant could not be read is left out, notedidentity: tracker_unverifiedand does not mark the request; so are a search's linked trackers. A tracker the caller asked for marks the request and notes nothing. A gate that raises notesidentity: tracker_gate_unchecked (RuntimeError).tests/unit/test_tracker_dupcheck_fanout.py: a restricted record whose grant could not be read is left out and noted, a standard one opens through its repository, and a plain refusal notes nothing.tests/unit/test_status_summaries_published.py: two calls with a failing count run it once and both namecode_index: symbol_stats_summary_unread (TimeoutError); a published row in hand answers in that window with no note; pastPROBE_ERROR_TTL_Sthe count runs again within the ten-minute memo; a poll at a full memo still finds its kept failure, since it returns before the eviction.tests/unit/test_tracker_multi_binding.py: the record route's unread tracker is indegradedasmemory.ask: record_tracker_unread (RuntimeError), without the namespace the text names.tests/unit/test_tracker_test_signal.py: an unverified churn namespace the caller named marks the request; the deployment's default notesidentity: churn_unverified.tests/unit/test_code_repo_self_service.py: an indexed branch whose grant could not be read is listed unnamed and notedidentity: branch_namespace_unverified.row_in_scopefor the tracker gates, the churn gate and the indexed branches now fakerow_reach:test_tracker_binding.py,test_tracker_binding_op.py,test_tracker_dupcheck_fanout.py,test_tracker_test_signal.py,test_tracker_test_daily.py,test_code_repo_self_service.pyandtest_code_repo_remote_branches.py.tests/unit/test_code_backport_gaps.py: a fix that falls back on two nights fails each pass withFellBack; one whose second read answers whole does not.tests/unit/test_code_search_cursor.py: a pool row without adegradedkey, as a previous build parks it, serves its page and names no note.tests/unit/test_gitrepo_option_injection.py:holds_commitanswers True for a held commit, full or short, False for an absent one, and raisesGitErrorwith returncode 128 for a directory git cannot read; an option-shaped sha is refused before git runs.tests/unit/test_extraction_queue.pyandtests/unit/test_namespace_health.py: a cached failed read is named on the next answer too.tests/unit/test_memory_inspect.py: a section thatskippedalready names is indegradedtoo.tests/unit/test_facts_handlers.py: a walk whose hub-degree read failed says so and is not memoized.tests/unit/test_memory_ask_precedents.py: an answer a fallback served is not stored, and neither is one whose code grant could not be read, which notescode_grounding_unverified. The fixture now answers the pending-count and knowledge reads, which failed silently there before and now note.tests/unit/test_code_search_pick.py: a search whose read fell back is not memoized, and the same search with no note is. A search after an earlier note of its request is memoized, its pool row lists none of that note, and the request still names it; with a note of its own it is not memoized and its pool row lists only that note. Its fake repository now answers the fan-in read, which failed silently there before and now notes, and its coverage note is stubbed, since the fake has no counts read.tests/unit/test_identity_incomplete.pylistsops.incidentsamong the deployment-scoped ops; it and the test inventory failed CI at the previous head.tests/unit/test_code_answer_completeness.py: acode.askanswer is not stored while its unit holds a note, and is stored once it holds none.tests/unit/test_code_result_lessons.py:_bound_sis None with no deadline or one with more left than the bound; a lessons scope read cut by the fixed bound is noted, and one cut by the deadline is not.tests/unit/test_degraded_unnoted.py: the scan above, and the provider-health guard.tests/unit/test_memory_search_computed_notes.py: a date difference whose operand embed fails notesmemory.search: temporal_diff_dropped (RuntimeError), and a support count that fails notesmemory.search: evidence_support_unread (TimeoutError).tests/unit/test_code_repos_refresh_cost.py: a status whose state read fails notescode_index: state_unread (TimeoutError)while judging a commit against the cached heads.tests/unit/test_code_repos_reads_once.py: the listing gate notesidentity: listing_gate_uncheckedfor a failed SCIM read and nothing for aPermissionErroror anIdentityIncompleteError, and lists the entry request-only each time.tests/unit/test_code_ingest_fair_fetch.py: a failed lag read is named on both answers, the second served from theas_ofcache with no second read.tests/unit/test_code_page_shapes.py: a failed gap read is read once and named on both pages.tests/unit/test_coverage_published.py: a failed gap read publishes nothing and is named on the page that computed it and on the next, from the memo; pastPROBE_ERROR_TTL_Sthe next read computes again, and publishes once the gaps read. Amust_landrefresh raises on a failed gap read and publishes nothing. A shared row without its gap counts is no answer, and a whole row published while a failure is kept answers with no note and no read.tests/unit/test_bulk_identity_dedup.py: a failed live-row read refuses the batch with a 503 andRetry-After: 1, and nothing is inserted or announced.tests/unit/test_memory_append_batch.py: an unverifiable freshness answersBACKEND_UNAVAILABLE. The lookup-failed case oftest_memory_bulk_parity.pyis gone with its path, and the tests that built_BulkWriteState(existing_lookup_ok=True)no longer pass it.tests/unit/test_code_setting_facts.py: a failed control, declaration, randomizer or history read notescode_index: setting_<read>_unreadbeside the cause incauses, and a failed test count notessetting_tests_unreadwithtests_total0 andcausesunchanged (each fails without the note; the last found in review).tests/unit/test_code_symbol_history.py: a tracker side that raised answerstracker_unavailablewith no namespace, a failed issue read leaves the linked issue bare, and both are noted.tests/unit/test_code_blame_range.py: a failed merge-ledger read notescode_index: merge_ledger_unread; failed function and comment reads leave their halves empty and note each.tests/unit/test_code_review_brief_sections.py: one case for each of the twelve notes ofreview_brief_build.py(symbols_failed,function_rows_unread,caller_counts_unread,fan_in_unread,coverage_claim_failed,test_home_failed,setting_facts_failed,symbol_history_failed,blame_range_failed,tracker_failed,risk_failed,pr_author_unread) raises from its read and asserts that one note andstored: false, with nothing inserted; a mirror-built brief whose tracker read failed notesreviewers_unread, carriestracker: failedand is not stored. code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046's tests of a failed file-rows, language, wiring-callers, drift or head read now also assert its note (each fails without it).tests/unit/test_pr_post_image.py: a file whose call names or edges cannot be extracted is counted inoverlay_note, also when served from the per-file caches, stays inparsedand notes nothing (each fails without its count).tests/unit/test_mirrors.py: a read while the clone runs notes nothing, and one after it failed notesgit_mirror: clone_failed (git clone failed (exit 128)).tests/unit/test_code_repos_refresh_loop.py: a refresh that keeps the last snapshot notescode_index: registry_unread (ConnectionError), and one that reads notes nothing.tests/unit/test_code_repos_fork.py: a failed fork lookup is noted on the answer that read it and on the next, served from the kept failure, with one read.tests/unit/test_bisect_fusion.py: a window or wide-window read that raised fuses nothing and notestracker: window_droppedorwide_window_dropped.tests/unit/test_tracker_multi_binding.py: a linked tracker whose scan raised notestracker: linked_tracker_dropped.tests/unit/test_code_symbol_history.py: a tracker side that answersTrackerUnavailablenotestracker: symbol_facts_unread (TrackerUnavailable)and names its namespace.tests/unit/test_memory_append_batch.py: aPostgresUnavailableErrorfrom the lookup passes as it is, and nothing is committed.tests/unit/test_loom_search_tracker_general.py: a plan whose deadline passed before the tracker leg starts notesloom_search: tracker_dropped (TimeoutError).tests/unit/test_pending_evidence.py: a batch whosemessagesis not a list, or whose payload is not an object, is skipped and noted.tests/unit/test_coverage_published.py,test_code_page_shapes.py,test_code_status_ops.pyandtest_code_ingest_counts_post_step.py:refresh_coverageanswers the gap failure third, and the note keeps its kind (coverage_gaps_unread (TimeoutError)); the fakes use the realrefresh_coverage, and_coverage_cachedhas no branch for a repository without it.tests/unit/test_code_blame_range.py: the fake repository answers the review read, which failed silently there before and now notes.tests/unit/test_code_review_brief_mirror.py: the fake repository now answers the function-row read and takeswithin_headon its ledger read; both failed silently there before and now note, which would leave the brief unstored.tests/unit/test_memory_for_file.py: a failed read of another namespace is dropped and noted.tests/unit/test_loom_search_tracker_general.py: a tracker whose search raised is dropped and noted while the others answer.tests/unit/test_pending_evidence.py: a malformed batch is skipped and noted.tests/unit/session_content_senders.json: the reviewed digest ofsdk/python/loom/memory.pyis renewed for this PR's docstring change todegraded; no sender changed.tests/unit/test_memory_webhooks.py: the fake patchespartial, which the webhook notes now call.tests/unit/conftest.py) starts every test with no note list, so the tests pass in any order. The reviewer's repro (test_degradations.py::test_every_op_response_carries_the_requests_notes_on_both_transportsthentest_mcp_lean_pack_explain.py::test_another_ops_result_is_only_leaned,-p no:randomly) passes.tests/unit/test_ops_incidents_sql.pyruns both new statements on clickhouse-local over theschema.sqltables (LocalCH,ddl, which now takes the database forloom_telemetry.sli_minute). For the deployment, the streak read leaves out a worker that is not enabled, a pass older than 6 hours, an isolated server's row, adeployer:xrow, a streak a later version cleared, a streak whose freshest pass on another deployment process succeeded, and one under the threshold;iso:xanddeployer:xread only their own rows. The request read sums one org's class across operations, and leaves out another org, the rollup's resume marks, minutes outside the window, andops.incidents' own calls: 180 polls beside 15 failed reads of 100 leave the share at 15 of 100, and 30 polls beside 10 calls leave the call count at 10. This pins theoperation != INCIDENTS_OPfilter for both the share and the call floor, which the handler computes from the same counts. Both tables are created by the local 26.7 binary.server/core/ch.pyagainst a ClickHouse server migrated fromschemas/migrations/, on fixture rows inloom.worker_statusandloom_telemetry.sli_minute. For the deployment, the read leaves out a worker that is not enabled, a pass older than 6 hours, an isolated server's row, a streak a later version cleared, and a streak whose worker's freshest pass on another deployment process succeeded. The isolated label reads only its own row. The request read returns each org's own counts per class, and leaves out the rollup's resume marks and minutes outside the window.make format lint typecheckpasses, with the function-length gate at its baseline. All codegen is regenerated (SDKs, reference docs, settings files, reach manifest) and the settings snapshot is updated.tests/unit/test_llm_fallback.py: an answer the fallback model gave notesllm: fallback_model_answered (http_503); a healthy primary notes nothing.tests/unit/test_conversation_search_service.py: a search whose query embed raised answers by substring and notesembedder: conversation_substring_fallback.tests/unit/test_code_bisect_deadline.py: the fix blame and the duplicate check, each cut by its fixed bound, answertimeoutand are noted; cut by the caller's deadline they answerdeadlineand note nothing.tests/unit/test_code_search_deadline.py: a HyDE leg the grace cut is noted with no deadline and with time left; one a 400 ms deadline cut first is not.tests/unit/test_pr_post_image.py: an overlay whose name read failed notesoverlay_names_unreadand is not kept, so the next load reads the names again and is kept, and the third is served from the cache; a head the store cannot place notespr_head_unread. With the cache gate removed, the test fails.tests/unit/test_memory_repo.py: a usage-totals read that fails, for one row and for many, keeps the rows' counters and notesmemory: usage_totals_unread.tests/unit/test_bulk_identity_dedup.py: a failed identity-dedup read notesmemory: identity_dedup_unchecked.tests/unit/test_mirrors.py: a present mirror lacking the head notes nothing while its fetch runs andgit_mirror: fetch_failedonce the fetch failed.tests/unit/test_ops_incidents.py: a tenancy check that answersBACKEND_UNAVAILABLEorWRONG_CELLinside the restricted gate answersrequests: unread, noted, and the other sources answer.tests/unit/test_degraded_unnoted.py: the wider dirs, the timeout handlers, the import closure from the scanned modules (no hand-kept list), and thedeadline,fail_closedandanswercategories (ananswerentry, like anoted_by_callerone, needs its comment).tests/unit/test_source_access_plan.py: with a list, members, heads or owner read failing, a query that matches one hidden document answers the samedegradedas a query with no candidate, an empty one; an unconditional read that fails namesknowledge: mirror_unreadfor both.tests/unit/test_source_documents.py,tests/unit/test_source_listing.pyandtests/unit/test_source_search_pool.py: each discovery failure names the marker, and each candidate failure names nothing.tests/unit/test_degraded_fallback_notes.py: one row for each note the wider scan and this review added that no other test drove (56 rows), each driven by the failure it describes and asserting the exact note; a contract's absent table and a refused connection name nothing.tests/unit/test_tracker_duplicate_check.py: a lexical leg still down after its retry namestracker: lexical_leg_dropped (ch_transient), and one the retry recovered names nothing.tests/unit/test_tracker_similar.py: a leg down namestracker: frames_leg_dropped (TrackerUnavailable).tests/unit/test_tracker_multi_binding.py: a linked tracker that raised is left out and namestracker: linked_tracker_unread (RuntimeError).tests/unit/test_dupcheck_links.py: an answer whose links read failed names it and is not remembered, and a whole one is; a release a failedgit tag --containsleft unread namesgit_mirror: fix_release_unread (GitError).tests/unit/test_tracker_embed.py: a catch-up past its share namestracker: vector_fresh_pending (TimeoutError), and one waited for names nothing.tests/unit/test_code_search_definition_leg.py: a literal read cut by its fixed bound names nothing.tests/unit/test_llm_fallback.py: a secondary model that fails too leaves nofallback_model_answered._note_dropped, was replaced bypass, one at a time, and the test files the two rounds changed were run: each removal fails a test. Five did not at first: the term leg's two timeouts and the rerank pool had no driver and now have rows, andtests/unit/test_memory_repo.pychecked its two usage-totals reads together, where the one note listed for both hid either's absence; it now checks each read on its own.tests/unit/test_tracker_dupcheck_fanout.py, throughhandle_tracker_duplicate_check: a note the request held before the check still lets the answer be remembered (it fails with the execute unit removed), and a public record whose grant could not be read namesidentity: tracker_unverifiedand keeps the answer out of the memo (it fails without the prepare unit's gate).tests/unit/test_source_search_result.py, throughrun_checked_search: a rerank that timed out and then a lost proof serve the ordinary render with no rerank note, and a render served with its rerank note, then renewed after the document was lost, names none once its fallback answers. Both fail with the renders unscoped.tests/unit/test_source_ask_generation.py: a mirroredmemory.askattempt's note stands when it is served and goes with it when a lost document discards it (fails unscoped); one that raises keeps its note.tests/unit/test_degradations.py: a held group lists until its swap, another holder keeps its copy, a group survives its unit, and the cap reads the groups.tests/unit/test_mentor.py: two failed ladder reads namecalls_unreadandreported_keys_unread, a profile whose read failed namesprofile_unread, and a mentor turned off names nothing, nor does an empty org or namespace with the mentor on (fails without the scope check, nowmentor.profile_read_applies, the one rulementor_profile,warm_profile, the hint and the brief share).tests/unit/test_code_search_pick.py: a run whose literal read the real leg cut answersliteral_read_cut: 1and is not memoised (fails without the gate).tests/unit/test_code_search_definition_leg.py: the cut is counted, under a window and under the fixed bound.tests/unit/test_degraded_fallback_notes.py: under a plan that reads mirrors, the docs search and listing name no timeout and name any other failure (fails with the timeout noted).tests/unit/test_degradations.py: a plain note a held group also lists stays after the group's swap, throughnoteand through a unit'srestore, and a group at the cap keeps no note out (both fail with the old count); anunkeepableunit names nothing, keeps its caller's answer out of the cache and leaves a later unit keepable.tests/unit/test_code_answer_completeness.py,test_memory_ask_precedents.pyandtest_code_search_pick.py: an answer built on a literal read the real leg cut is not stored, as acode.askanswer or abstain, as amemory.askprecedent, or in thecode.searchmemo. Each fails with its gate reverted, and all three without the leg's mark.tests/unit/test_decision_code_discovery.py: a cut search defers the decision's code discovery (fails without the check).tests/unit/test_source_repo_search.py: a repository-docs leg whose renewal starts past its deadline names no timeout (fails at the previous head) and takes its render's notes with it, as does one the base's wait expired.tests/unit/test_source_search_result.py: a fallback whose render fails names nothing of the discarded render, and the ordinary passages' wide pass, failed or not selected, takes its notes with it.tests/unit/test_source_fanout_renewal.py: so does the wider pass ofloom_search's ordinary section, unused or failed, and the wider pass a marked plan's first ranking built when the renewed first pass fills the page alone. Each fails with itsdiscard()removed. A first ranking whose eager widening failed names nowidened_hits_droppedwhen the renewed first pass fills the page or an ordinary section widens again (both fail with the expander raising), and names it once when the renewed pass needs the wider result.tests/unit/test_source_repo_search.py: a pass left out takes back what its lexical leg noted (fails without the held group), and a served pass lists it once beside the request's own copy.tests/unit/test_code_backport_gaps.pyandtest_code_backport_gap_exact.py: a symbol, patch or history stage cut by its wall or whose read raised names its note (fails without the notes). A worker pass over three branches, through the composed read, in which one branch's read makes each member ofBRANCH_NOTESin turn (the real stage where cheap, else a branch read that makes the note), writes all three rows and notes noFellBack; a test checks the cases cover the whole set, a history-stage cut writes that branch at its floor, an unknown lag writes the rows written without it, and a branch's file presence or ledger read that failed leaves the fix unwritten withFellBack. The cases fail with their notes in the fallback check, and the ledger case with its note in the set. A missing ref is stillno_branch_ref, an empty or absent mirror raisesMirrorReadError, and an empty mirror through the worker namesbranch_history_unreadand writes every branch's row (both fail without the exit-1 rule); a refused-Sprobe on either leg is named (fails without the raise).tests/unit/test_tracker_source_add.py: a source whose stored namespace map did not parse logs a warning that names the org and source and not the map.tests/unit/test_code_search_pick.py: a pick the gateway refuses (403) or asks to wait (429) keeps the ranking and namesllm: pick_skipped(fails without the note);tests/unit/test_degraded_unnoted.pyreads that handler (fails with the note removed).tests/unit/test_source_search_result.py: a marked plan's eager wide pass the passages leave out names none of its notes, a later fallback that serves it names them again, and discarded passages take both passes' notes.tests/unit/test_source_checked_pack.py: a knowledge or memory-stack sectioncontext.packdrops on a failedcurrent()orordinary()names only the drop, and a stack holds its build notes for a caller that drops it.tests/unit/test_source_fanout_renewal.py: a knowledge section that fails after its wider search answered names neither search's notes.tests/unit/test_source_repo_search.py: a base search that fails after the repository-docs leg answered names none of the leg's. Each fails with itsdiscard(), the stack's group or the relisting removed.tests/unit/test_source_ask_generation.py: a mark set in a served mirrored attempt keeps the answer out of the caller's unit's caches (fails with the restored list flattened).tests/unit/test_degradations.py,test_source_checked_pack.pyandtest_source_search_result.py: anunkeepablemark set inside a held scoped list, the memory stack's build or a served knowledge render names nothing and keeps the caller's unit out of its caches. In the first two, a group held inside is still the one a later swap changes, and dropping the step takes the mark and the group back. The stack and render tests fail withcurrent()held, all three withkeepable()reading the top level only, and the first two with a group's groups flattened.tests/unit/test_search_read_your_writes.py: a mark set in the re-read a pass serves keeps the pass's unit out of its caches and names nothing (fails withcurrent()returned; found in review).tests/unit/test_decision_code_discovery.py: a failed frame, name or literal lookup defers the code discovery (fails without the counter, and withoutfailure_reasonreading it).tests/unit/test_code_search_definition_leg.py: a failed lookup countsdefinition_leg_failedbeside the other lookups' rows.tests/unit/test_mirror_request_owner.py,test_source_access.py,test_source_access_plan.pyandtest_source_listing.pyno longer readmirror_unread; the test of that flag's monotonic owner is deleted with it.main, the 424 unit test files that import a module the last four rounds touched, or thatmain's new commits changed, ran together: 11,710 pass, and the 162 that fail fail the same on a cleanorigin/mainon this machine (clickhouse-local, macOS and native-diagnostic gaps, listed below).test_code_search_definition_leg.py's clickhouse-local literal read ran on its own and fails as onmain: this machine's clickhouse-local has noenable_quantized_codec.mainagain (memory.search serves requested kinds first and summaries by their head #2044, then code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046), the 517 unit test files that import a module this round or those merges touched, or that any of them changed, ran together with the scan, note, degradation, package-contract, public-copy, doc-link and analyzer-corpus tests: 12,970 pass, and the 70 that fail fail the same on a cleanorigin/mainon this machine. The sender-census test passes. memory.search serves requested kinds first and summaries by their head #2044 removed five handlers ofpayload.pythat were listedfull_answer_fallback, so their entries are gone. code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046 overlapped this PR in three places, each resolved with a test that fails without the change:code.setting_factskeeps code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046's verdict and causes and notes each read that failed; the PR overlay keeps code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046's count of a parse that raised, and counts calls or edges the extractor could not list beside it, kept the same way; the review-brief builders keep code.review_brief answers with a verdict, and the wiring a PR adds and generic test-map suites drop out #2046's store gates inside their unit, beside thekeepable()gate. Of the brief's six new broad handlers, five note their failure and the repository config, read in process, is listedsettings;parse_with_outcome's two handlers return the error, asparse_for_ingest's did, and are listednoted_by_caller. The counts above are the merged tree's.make lint typecheckpasses, with the generated SDK files regenerated and every codegen--checkcurrent;make format-checkpasses but forChat.test.tsx, as below, and Prettier and Taplo pass on their own. The plugin manifests aremain's (1.2.171): this PR bumps no plugin version.LOAD_FAILED; a merged brief served unstored logs its failed reads, whether a read fell back and whether its tracker read failed; the memory stack and a knowledge render hold their scoped lists as they stand; the allowlist header names the four kinds of site the scan lists; and the test-count read ofcode.setting_factshas its test. The 144 unit test files that import a module this round touched ran together with the scan, note, degradation, package-contract, public-copy, doc-link and analyzer-corpus tests: 4,591 pass, and the 28 that fail fail the same on a cleanorigin/mainon this machine. The scan's counts are unchanged.make lint typecheckpasses;make format-checkpasses but forChat.test.tsx. The plugin manifests aremain's (1.2.171).memory.search's sequential re-read returns its scoped list as it stands for the pass that serves it to restore, with a test; and, once each for the store gate and its log line,build_for_mergebindsfell_backandtracker_failed, andbuild_for_openbindsfell_back. One otherscoped()block'scurrent()snapshot is restored:_pending_besidereturnscurrent()from itsscoped()block and_handle_prepared_askrestores that text, which drops nothing, since the pending-count read can take no group or mark. The backport worker's_read_fixpasses on note text only, and the remainingcurrent()snapshots feed a stored page'sdegradedfield or a result shared across requests. The scan, contract and degradation tests, the setting-facts, checked-pack, search-result and review-brief tests and the five memory-search consistency test files pass (793), withmake lint typecheckand the Ruff format check. The scan's counts are unchanged, and the plugin manifests aremain's (1.2.171).038ccbb, the next review's three wording items are fixed: the_sequential_passdocstring is rewrapped, the narrow-handler example names a deleted file (its new side is/dev/null) apart from one with no text hunk, and the round note above says which otherscoped()snapshot is restored and which names each review brief builder binds. The Ruff format check,make lint typecheckandtests/unit/test_search_read_your_writes.py(14) pass; the plugin manifests aremain's (1.2.171).6172a49, the_sequential_passdocstring says why a failed re-read's note stays: it is noted after the scope, so it stays when the caller drops the failed re-read's list, which is never served (its answer is None).tests/unit/test_search_read_your_writes.py(14) and the Ruff format and lint checks of the file pass.2b97644, two Bugbot items are fixed (found in review, above):loom_search's knowledge section discards the wider search a marked plan's first ranking built when the renewed first pass fills the page without it, andmentor.briefnames noprofile_unreadfor an empty org or namespace. Three are answered without a change: the backport history leg's git commands run under the fixedtracker_patch_line_timeout_sbound, and each past it stays noted (patch_history_timed_out); every repository-docs timeout under a plan that reads mirrors stays silent, since when the bound runs out depends on time spent in that plan's candidate checks; and calls the overlay cannot extract stay in its cachedoverlay_note, since a later read gives the same answer. The scan, the fanout,loom_search, source-search and mentor tests pass (400; the one failure,test_mentor.py::test_indexed_writes_count_memories_first_created_in_the_window, fails the same on a cleanorigin/main), withmake lint typecheck, the generators'--checkand the Ruff format check. The plugin manifests aremain's (1.2.171).e3a5d08, the next review's four items are fixed (found in review, above): a marked plan's first ranking whose eager widening failed no longer nameswidened_hits_droppedfor a ranking that is not served; a repository search holds its legs' notes with it, so a pass left out takes them back;code.backport_gapnames a stage its fixed wall cut and a stage read that raised (the stage walls are fixed settings; the first answer on that thread called them the request's wall, and a correction is posted there); andmentor.profile_read_appliesis the one no-read rule. Before the merge below, the 209 unit test files that import a touched module (fanout,loom_search, repository docs, knowledge search, backport, mentor) ran with the scan and degradation tests: 6,174 pass, and the 9 that fail fail the same on a cleanorigin/main. Mergingmainagain (the MCP read client,knowledge.source.live,repo@branchreads) conflicted only inresponse_body, which keepsmain's_note(op, ...)and lists notes throughon_response, and in generated files, regenerated for 382 operations. The plugin manifests aremain's, checked line by line (1.2.172 ismain's own bump). The scan's counts move: the eager expander's handler is listednoted_by_caller, the re-raising handlers it and the finished-leg loop replace are gone, andmain's source worker reads add two timeout handlers that raise a refusal. On the merged tree, the 267 unit test files thatmainchanged or that import a module either side touched ran with the scan, degradation, package-contract, public-copy, doc-link and agent-instruction tests: 9,195 pass, and the 9 that fail fail the same on a cleanorigin/main.make lint typecheck, the generators'--checkand the Ruff format check pass.5240eda, the next review's items are settled (found in review, above): the nightlycode_backport_gapsworker writes every branch's row again when one branch's stage was cut or failed, as onmain, sincebackport.BRANCH_STAGE_NOTESkeeps those per-branch notes (and a branch'spatch_history_timed_out) out of its fallback check, whilecode.backport_gapstill lists them; the stage notes take the error itself as their reason;branch_presence_unreadisfile_presence_unread; and the Tests bullet'sdiscard()sentence follows the items it describes. Three more notes of replaced work are not taken back. Insteaddocs/reference/http-api.md, the scope note on a replaced answer and the Known cost now say what holds:degradednever leaves out a fallback the served answer used, Loom takes back the notes of the work it drops at the sites named, and the three cases where a note of replaced work stays are named. The scan, the backport, worker, fanout,loom_search, repository-docs, doc-link, public-copy and agent-instruction tests pass (1,038), withmake lint typecheck, the generators'--checkand the Ruff format check.mainhad not moved since the merge, and the plugin manifests aremain's (1.2.172).67cfa19, the next review's items are fixed (found in review, above):BRANCH_STAGE_NOTESadds a branch'sgit_mirror: patch_history_unreadandpatch_history_line_unread, the same regression, andgit_mirror: lag_unknown, one branch's lag, which no row stores and which this PR first notes; the worker tests drive every member of the set; the worker's docstrings and the Cached answers note name the per-branch exception;docs/reference/http-api.mdand the scope note say Loom never takes back an entry of a fallback the served answer used, list what each place takes back (a document search that lost a mirrored document the lost render's entries, a discardedmemory.askattempt all of its own, a dropped pass or section its renders' entries, a droppedcontext.packmemory-stack section all of its build's entries, and the whole repository search its legs' entries too) and give the leg entries that stay as an example; thecode.backport_gapbullet says what the stage notes carry and whyfile_presence_unreadstays fix-blocking. Mergingmainagain (source worker history) conflicted only in an import block oftests/unit/test_source_access_plan.py, which keeps both sides; every generator and the analyzer corpus (LOOM_ENV_FILE= python -m tests.analyzer.corpus --write) match the merged tree, and the plugin manifests aremain's (1.2.172), checked line by line. The scan's counts move withmain's new re-raising handler inconnected_accounts.py(939 broad, 569 pass,server/knowledge/app115). The scan and the backport, worker, patch-history, knowledge search, source passages, repository-docs, source access plan, doc-link and public-copy tests pass (719), withmake lint typecheck, the generators'--checkand the Ruff format check.f8f1c1a, the next review's items are fixed (found in review, above): a mirror git cannot read and a-Sprobe git refuses raiseMirrorReadErrorand are named, wheremainand this PR answeredno_branch_reforerror:gitwith no note;BRANCH_STAGE_NOTESisBRANCH_NOTES, and its comment, the worker's docstrings, thecode.backport_gapbullet and the Cached answers note say what each member's row stores and name the per-branch notes left out (file_presence_unread,backport_ledger_dropped,as_of_unread); a line probe that raised leaves the branch undecided unless another probe names the pick;docs/reference/http-api.mdsays a document search that lost a mirrored document takes back the lost render's entries; the wider pass'sdiscard()comment names its legs' notes; and the round note above lists what each place takes back. New tests: the exit-1 rule and the raise on an empty or absent mirror, an empty mirror through the worker, a refused probe on either leg, a failed ledger read, and an unknown lag's rows; each fails without its change. The plugin manifests aremain's (1.2.172). The scan's counts are unchanged. The scan and the backport, worker, settle, fanout,loom_search, source fanout, doc-link, public-copy, agent-instruction and package-contract tests pass (822), withmake lint typecheck, the generators'--checkand the Ruff format check.83fec11, the next review's items are fixed (found in review, above): an empty mirror path raisesMirrorReadErrorlike a mirror git cannot read, and a missing ref (no branch name, or exit 1) answersno_branch_ref(the empty-mirror test covers it and fails without the change); the comments onBRANCH_NOTES, the worker's docstring, thecode.backport_gapbullet and the Cached answers note say a patch or history read leaves the row that presence and the record gave (a files-only fix floors on file presence, and a branch the record decided keeps that verdict) and an unknown lag changes no row;as_of_unreadis named as readingunknown(no_index)where the row would readnot_affected; and a line probe that raised leaves the branch aterror:*, ordeadlinewhen another probe timed out.origin/mainis at674fe4f(The MCP source worker serves account enrollment #2125), which touches onlysource_worker/,docs/architecture/mcp-source-worker.mdand a workflow, none of this PR's files and no manifest;git merge-tree --write-tree origin/main HEADmerges cleanly, so no merge is needed, and the plugin manifests aremain's (1.2.172).tests/unit/test_code_backport_gaps.pyand the other backport, settle, patch-history, scan, public-copy and doc-link tests pass (448), withmake lint typecheckand the Ruff format check.4314832, the comment onBRANCH_NOTES, the worker's docstring, thecode.backport_gapbullet and the Cached answers note no longer list what each note's row stores, which the review at83fec11found inexact for a branch the record decides and for a probe that names the pick: such a row claims only what the reads that answered show.origin/mainis at1cef2eb(Plugin hooks send their requests with node:http and node:https, not fetch #2123), which bumps both plugin manifests to 1.2.173 and changestests/unit/session_content_senders.jsonin lines this PR does not touch; this PR changes no manifest,git merge-tree --write-tree origin/main HEADmerges cleanly, and the squash merge takesmain's manifests.tests/unit/test_code_backport_gaps.pyand the Ruff format and lint checks pass.make lint typecheckpass, with the function-length gate at its baseline (52 over 50 statements, 0 over 200 lines) and every codegen--checkcurrent.make format-checkpasses but forfrontend/src/views/assistant/Chat.test.tsx, whichmainleaves unformatted and Format the assistant source-link assertion #2107 formats. Focused unit tests pass: degradations, incidents, the code and memory reads and their caches, idempotency across transports, MCP lean results,loom_search, settings, reach census, package contracts, transport layering, tunable constants, MCP listing budget, op budgets, read scope, worker status, cross-org rule, the analyzer corpus, public copy and doc links. The full unit suite ran locally too: what fails there fails on this machine alone (no/proc,pidfd_openormemfd_createon macOS, native diagnostics that need Linux, a clickhouse-local withoutenable_quantized_codec, andtest_cli_native_wrappers.py, whose 32 failures are the same on a cleanorigin/main).ops.incidentsfilter; nothing else changed.test_worker_status.py::test_native_refusal_metadata_reaches_pytest_cli_without_starting_tests(native diagnostics require Linux). It is unrelated to this change.test_cell_prepared_bot_native.py::test_normal_prepared_later_cell_proves_both_bootstrap_keys, as the Postgres 18 storage job does onmain: provisioning can start while the first cell still reads recording mode, so the bot identity endpoint refuses, and Prepared bot tests wait for enforced tenancy #2106 makes the test wait for enforced mode. Dependency review finds no dependency change, but cannot complete: a pull request head has no dependency snapshot, and the fallback refuses a comparison of 300 or more files or any change undersdk/rust/, which the regenerated Rust SDK makes, as on other pull requests that regenerate it.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code wrote the diff and its tests. The owner reviews it before merge.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code
Note
Low Risk
The visible diff is documentation, codegen output, and settings schema comments—no behavioral server logic beyond a trivial comment tweak.
Overview
This change documents and wires up reference material for two related capabilities: per-response
degradeddisclosure and deployment-wideops.incidentspolling.degraded: Adds a full Degraded answers section to the HTTP API reference (transport merge rules, MCP lean behavior, cache/keep vs take-back semantics, paging). Updates guides and architecture docs so fallbacks usesource: effect (kind)(not “providers only”), mirror failures surface asknowledge: mirror_unread, andcode.searchdocuments literal/definition-leg partiality (retrieval_work.literal_read_cut,definition_leg_failed). Generated operation pages and the docs codegen template now point every op at that section; memory op field docs and Go SDK HTTP decoding includedegraded.ops.incidents: Registers the new viewer op in the operations index (382 ops), adds monitoring/configuration docs (incident kinds, auth for org SLIs, cached ClickHouse reads),LOOM_OPS_INCIDENTS_*settings inloom.example.yamland the settings JSON schema, and the generatedops.incidentsAPI page.Other doc fixes: HyperDX write-outcome table points at
memory/app/set_commit.count_write, trims to eleven outcomes (drops bulk-pathunknown), and expandsdeployment_scopedwording for incidents-style aggregates.Reviewed by Cursor Bugbot for commit fd58ac1. Bugbot is set up for automated code reviews on this repo. Configure here.