Repository navigation
feat(issue-radar): the crew ledger becomes a projection of the crew log - #12303
Conversation
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Shipped crew feature's write path goes dark by default: every record call 409s until the operator sets an experimental flag they never opted into. Watch
Suggestions
[DESIGN-REVIEWED] 690630b |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS Recording now requires default-off Not justified as shipped
What this change shipsInventory (10 items) — 8 justifiedIntent: keep an Issue Radar crew's only cross-restart memory from silently drifting by making it a fold of the crew log instead of a second hand-locked store — a FIX, at cause level (the second document is deleted, not guarded). More than 10 items; the 10 most noticeable kept.
[FIRST-PRINCIPLES-REVIEWED] b0378d2 |
GPT 5.6 Review — ✅ human override acceptedHuman judgment by @chenmingwei23 overrides the GPT 5.6 finding for This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsNo findings. The one candidate — that [OPUS-REVIEWED] 690630b Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
8917432 to
73ff8b5
Compare
73ff8b5 to
43c6581
Compare
43c6581 to
26f058c
Compare
26f058c to
233a524
Compare
buluoray
left a comment
There was a problem hiding this comment.
Verified at 1115c429. The conversion itself holds up — one item below is a gap in the disposition's reasoning rather than in the code, and I think it wants an answer before this merges.
What checks out:
- The carry is not a read-time fallback, it is a write-time migration:
_prepare_write->_carry_legacy_forward(crew_store.py:1654), andread_ledger(:1140) folds the log only. Legacy files are never deleted, only.carryingbegun-markers are unlinked, so nothing is destructible by a failed carry. - No new empty-vs-absent divergence.
_radar_new_itememitsci_state:{},labels_applied:[],tried:[],pr_number:None— byte-identical to the legacy reader'sor {}/or []shape, so the consumer sees what it always did. - Atomicity with the real zero-entry legacy shape: a partial carry never marks
.carried, re-runs on the next write, and refuses the triggering write with a retryable 503 rather than folding a short record. - Field enumeration is complete; the one bounded loss is
triedclamped to the newest row, with the dropped count disclosed in the entry's event text rather than silently. - Replay is deterministic — unit join order comes from the fsynced
.unit-orderfile (recorded append order), not completion order, and the per-itemlast_updatedigest collapses a retried append. - The skip index keeps first-decision-wins, and
deferredorders concurrent passes by the writer's own observation so a backward clock cannot displace an established decision. - The line-id formula lives only in
_radar_event_id, and ci_state bounding is single-sourced throughprojection.radar_ci_state. No drift-risk duplication.
The item I would like an answer on. The accepted tradeoff is recorded as "reads fold the empty record," which reads as benign — but I traced where that empty record goes, and it reaches the crew's own decision input:
crew_snapshot calls open_slot_count (crew_runtime.py:293) and list_work_items(open_only=True) (:275), and hands both into compose_nudge (:424). crew_runtime makes no write call anywhere on that path, so nothing on the way to the nudge triggers _carry_legacy_forward. So the first nudge a crew receives after the upgrade, if it arrives before any write, tells that crew open_count: 0 and items: [] alongside its real max_open — i.e. "you own nothing, every slot is free" — while its actual in-flight items, worktrees, branches and base_sha values are still sitting un-carried in the legacy files.
The state reconciles as soon as the crew writes, and nothing is lost. But the decision that turn is made on a false picture, and the specific thing it can decide is to pick up work — including re-investigating an issue it already holds a worktree for, which is the thing this ledger exists to prevent. max_open can also be transiently exceeded.
Two questions, either of which closes it:
- Does anything write deterministically before a crew's first nudge after upgrade — a registration step, a startup sweep, the fabric? If a sweep is guaranteed to land first, the window does not exist and it would be worth saying so where the tradeoff is documented, since "reads fold the empty record" currently implies the read is harmless.
- If not, would you rather carry at crew registration (or have
crew_snapshotspecifically take the write path) than leave one turn where a crew is told it owns nothing?
Smaller, unrelated: Opus's _overflow_by_session finding is real — emit._forget prunes _open/_last_config/_attempts/_creation_failed/_tool_started/_settled_tools but omits _overflow_by_session (emit.py:4468), so a session that ever overflowed leaks one str -> int until reset_caches(). Bounded by overflowing sessions, one line to fix, and not this PR's job if you would rather not widen it.
Tests: I exported the head read-only with git archive and ran test_issue_radar_crew_store.py, test_issue_radar_crew_fabric.py, test_crew_log_types.py, test_crew_log_core.py — 569 passed, with real coverage for carry-on-first-write, carry-not-drained refusal, one-crew-only skip carry, sweep-as-first-write carry, oversized/unfit/numberless legacy rows, and skip deferral under clock skew.
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/apps/builtins/issue_radar/backend/crew_store.py:1511 -- Session-wide overflow delta misclassifies an accepted append BLOCKING -- src/kiro_crew/apps/builtins/issue_radar/backend/crew_store.py:902 -- Causal unit ordering is truncated and fail-open (origin: validation) BLOCKING -- src/kiro_crew/crew_log/projection.py:1842 -- Item eviction leaves a stale deduplication digest [BLOCK-MERGE] 2ecb60b |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/apps/builtins/issue_radar/tests/test_crew_store_non_utf8.py:79 -- ignored cleanup can leave test artifacts behind (origin: validation) BLOCKING -- test/test_issue_radar_crew_store.py:2070 -- new platform skip weakens the test ratchet (origin: validation) FINDING -- src/kiro_crew/apps/builtins/issue_radar/backend/crew_routes.py:217; src/kiro_crew/apps/builtins/issue_radar/backend/crew_store.py:651; src/kiro_crew/apps/builtins/issue_radar/tests/test_crew_store_non_utf8.py:73 -- new function-local FINDING -- src/kiro_crew/apps/builtins/issue_radar/backend/crew_store.py:1571 -- another session’s process-wide drop makes a landed update report FINDING -- src/kiro_crew/apps/builtins/issue_radar/backend/crew_ledger_spec.md:262; docs/reference/crew-log/session-types.md:1205 -- [BLOCK-MERGE] 72163a2 |
|
/ai-review override gpt 9570e52: Both are re-sampling on one span, not convergence. crew_store.py:1934 is the same code an earlier adjudication on this PR FLAGGED as a documented, bounded migration tradeoff whose dropped count is written into the carried event at 1949; this round upholds it on opposite reasoning. crew_store.py:1034 is the Windows fallback that exists because Windows lacks descriptor-relative rename, so closing its check-to-write gap needs new ctypes Win32 handle-rename code in a security path untestable here. |
|
AI-review override not recorded: your repository permission could not be READ (the collaborator-permission API did not answer after 3 attempts). This is not a permission denial -- re-issue the command once the API is healthy. |
|
/ai-review override gpt 9570e52: Both items re-sample settled ground. At 1934 an earlier adjudication on these lines ruled the tried[-1] drop a documented bounded one-time migration tradeoff whose dropped count is recorded in the carried event at 1949; a later adjudication upholds the opposite on unchanged code. At 1034 the Windows fallback exists because no descriptor-relative rename exists there, so the check-to-write gap has no atomic remedy; name screening is the available one, added for an earlier GPT link finding. |
Human judgment recorded@chenmingwei23 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Disposition: the Frontend Tests / Coverage cascade on this head was not caused by this change
Evidence that the failure was flake or base-carried rather than this diff:
The earlier |
GPT 5.6 Review —
|
1 similar comment
GPT 5.6 Review —
|
Note on the red check attempts between 04:29Z and 04:35ZTwo lanes show failed attempts in that window on this commit. Neither is a review finding, and both were superseded by successful re-runs on the same commit with no code change.
The rate limit was repository-wide rather than specific to this PR: the same review workflow failed in the same window on #12707, #12492, #12698 and #12651. One reading note for anyone checking this commit's board: deduplicate to the newest attempt per lane. The superseded failure rows are still returned by the API, so a raw count of failures reports red on a green board. |
bolichen97
left a comment
There was a problem hiding this comment.
The fold and write machinery is sound -- read-back by content at crew_store.py:1484, the _undrained receipt gate at :1668, strict unit listing, the mark-keyed _fold_checkpoint, and first-decision skip precedence with the deferred token all hold up, and the new tests are real assertions against a genuine crew log rather than mock bookkeeping. No crash, security hole or removed guard.
Three things block, and all three are defects rather than tradeoffs. I verified each against both the head and the base rather than reading the body's summary.
1. Every read before a crew's first post-upgrade write answers the empty record, and this PR's own cited precedent solved exactly that.
_carry_legacy_forward has one caller, _prepare_write at crew_store.py:1724. read_ledger (:1186) folds the log and nothing else. But the paths that matter on the first turn are all read-only: crew_runtime.py:275 (list_work_items) and :293 (open_slot_count) build the nudge snapshot, and crew_routes.py:634 (read_skips) is what produces skipped_numbers. So the first cycle of every upgraded crew is told open_count: 0, items: [], skipped_numbers: [] while its real open items and the repository's shared skip index sit uncarried.
That is not cosmetic. skipped_numbers is the thing a crew is instructed to check before investigating, so an empty one on the first turn means re-investigating an issue another crew already passed on, and an empty open_count means max_open can be exceeded on that same turn. Both produce outward-facing GitHub comments that cannot be taken back.
The body says "same shape as #12027". #12027 shipped both halves: session_ledger._legacy_preview (session_ledger.py:1083, called from the read at :804) exists for precisely this, and its docstring names the failure in the same words -- "the first read after an upgrade would answer the empty record while the document sat there waiting for a write to consume it. That read is the auto-nudge snapshot ... and the carry that runs later cannot undo a turn already taken." This PR takes the write half and omits the read half. @buluoray asked about this on 2026-09-21 and the question is still unanswered.
2. Recording goes dark on upgrade unless an env var is set, and nothing in the diff sets it.
_require_crew_log (crew_store.py:1376) raises CrewLedgerUnavailable when crew_log_emit.enabled() is false, and emit.enabled() is env_flag_enabled("KIROCREW_CREW_LOG") -- off unless the operator exports it. grep -c for _require_crew_log and CREW_LOG_ENV on the base commit returns 0, so this dependency is new here: before this PR the ledger wrote its own files with no flag.
The result is that after upgrade every issue_radar_crew_record refuses with 409 for every existing Issue Radar user until someone discovers an undocumented env var. Nothing in the diff flips a default, and the crew has no way to tell "switched off" from "my write failed". A shipped feature going silent on upgrade is a regression, not a staged rollout.
3. One-shot, unrecoverable loss of tried history, and the fold already handles the cheap fix.
_legacy_item_entry (crew_store.py:1934) carries tried[-1] only and puts a count of the rest into the event prose. Base's own comment calls tried "the crew's memory of what it already ruled out (losing them makes it repeat rejected approaches)" -- so this deletes the field's whole purpose for every pre-upgrade item, permanently, the moment .carried is written.
It is cheap to avoid: projection.py:2108-2112 already dedups a carried tried row by content and clamps the list to RADAR_TRIED_LIMIT, so emitting one carried entry per legacy row needs no new fold logic. This one has to be decided before merge because it cannot be revisited after the migration runs on a user's machine.
Non-blocking, worth fixing while the branch is open:
- Three doc/code contradictions inside this diff:
crew_ledger_spec.md:52says the fsync is "before the entry" where the code notes the order after read-back (crew_store.py:1520-1540);:262-263says the fold clamps to 4000 whereprojection.py:1714is 5000;session-types.md:1206says dedup is "same line id AND same payload" where_radar_stepcompares payload only. "Documentation updated" is ticked and the docs are updated, so this is internal inconsistency rather than a missing update. counts.evicted_items/evicted_skipsexist in the fold value butGET /crew(crew_routes.py:645) returns{"open": ...}alone, which is whatissue_radar_crew_readserves -- so the "said out loud once per snapshot" rationale is not met on the surface a crew actually reads.- The body credits
test_crew_log_projection.pywith the new type's registry pins; that file is unchanged and contains noradar. The pins live intest_issue_radar_crew_store.py:2540-2546, andprojection.py:1713points theRADAR_TEXT_LIMITcomment at the wrong file too. durable(crew_store.py:1558,1586) reads process-widedropped_writes(), so another session's dropped write reports this one's landed write asdurable: false. Conservative direction, but it was raised on the previous head and is still here.events.jsonlis not carried (crew_ledger_spec.md:281), so the crew page and the fabric timeline lose all pre-upgrade history and carried items open with a single phase line. That is a defensible cut, but it belongs in the body's backwards-compatibility section rather than only in the app spec.
On the overrides: the First Principles override on 1115c42 and the GPT override on 9570e52 are both argued rather than waved away, and the Windows TOCTOU rebuttal at :1034 is correct -- there is no descriptor-relative rename there, so name screening is the available remedy. But an author overriding a finding about his own upgrade-visible regression is not the same as that finding being wrong, and items 1 and 2 above are what the two overrides leave standing.
GPT 5.6 Review —
|
|
Thank you -- all three were verified against source before anything was touched, and two of 1. Read-before-first-write answering the empty record -- CONFIRMED, FIXED. Verified exactly as you traced it: Fixed by mirroring it: Two details worth naming, because they are where a preview could go wrong:
Rather than building the payloads a second time, the row building is now one shared function @buluoray -- this is the answer to your 2026-09-21 question. It was the right question: the 2. Recording going dark on upgrade unless Your reading of the mechanism is right: The tradeoff, plainly: it is intentional, not an oversight. The append-only ledger RFC pins What you are arguing is whether that decision stands, and that is a product call rather than One thing item 1 does change about its severity, worth having on the record before he 3. One-shot, unrecoverable loss of Verified:
Both fixes are pinned fail-then-pass. Reverting Non-blockers. All five doc/code contradictions fixed, and the counters are surfaced.
Deferred, with the reason. Cost of this round, for the record. The push voids the SHA-pinned GPT override on |
|
@bolichen97 heads-up so you review the final head once rather than twice: the head moved to Your items 1 and 3 are unchanged by that push -- the read-side carry preview and the |
A crew's work items, progress lines and passes stop being files of their own. Each issue_radar_crew_record call appends ONE radar/recorded entry to the crew log of the session the crew's slot runs on, and every read is the radar fold of those entries -- a slot-keyed projection registered in the crew log's fold registry -- joined over every unit the slot ran under, live unit last. The rules the file store enforced under three locks and a rollback become properties of one append: a phase never moves without its logged reason, and a pass is never recorded without its index row, because the delta, the line and the skip row ride on the same entry. The repository's shared skip index is the union of every crew's folded passes, first decision standing; its staleness bound is the writer's flush budget. The write route resolves the crew's live unit from its slot and refuses by name when there is none (409 crew_log_unavailable) or when the update cannot fit one entry (413 ledger_entry_too_large). The pre-projection files are carried into the log once, on a crew's first write, and never written again.
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- test/test_issue_radar_crew_store.py:61 -- Per-test homes are bound to the process-global crew-log writer (origin: validation) |
|
/ai-review override gpt 690630b: test-only isolation finding; the autouse fixture resets the writer before and after each test (reset_caches, drain_for_shutdown, fold cache cleared); F1-F3 from the prior head were fixed and are not re-raised; the adjudication step itself failed on the App rate limit. |
Human judgment recorded@chenmingwei23 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
The Issue Radar crew ledger -- the state behind the
issue_radar_crew_readandissue_radar_crew_recordtools -- was a store of its own beside the crew log:One record call wrote all three under a crew lock, a per-number skip lock and a
records lock, in a fixed lock order, with a rollback that restored a snapshot of
the item file and un-indexed the skip if the event append failed. The two rules the
ledger exists to keep -- a phase never moves without a logged reason, and an issue
is never skipped without being indexed -- held only as long as that transaction
did, and the crew's session already had a record of its own work: the crew log.
Why it matters
A crew is an autonomous agent whose only memory across compaction and restart is
this ledger, and every crew of a repository consults the shared skip index before
investigating an issue. A second document about the same work, kept consistent by
hand-rolled locking, is the kind of state that drifts silently: a crash between
two of the three writes left an item moved without its reason or a pass without
its index row, and nothing downstream could tell.
What changed (motivation -> approach -> change)
Same shape as #12027 (the session ledger): the ledger becomes a projection of the
crew log.
issue_radar_crew_recordappends exactly ONEradar/recordedentry to the crewlog of the session the crew's slot runs on. The entry carries the work-item
fields the call set (an omitted field means "unchanged"), the event and its kind,
and -- when the call records a pass -- the skip row. The entry type is declared
in
crew_log/entry_types.pywith the crew ledger's closed vocabularies (phases,event kinds, skip scopes);
crew_log/schema.pyowns theradardomain;crew_log/emit.pygainson_radar_recorded/radar_entry_fits.issue_radar_crew_read-- and every other reader: the crew page, the fabric,the runtime's slot accounting -- reads the
radarfold registered increw_log/projection.py. It is a SLOT-keyed fold: a crew's slot owns one ACPsession id at a time, so the fold joins every unit the slot ran under, in the
order the crew RECORDED into them: each write appends the unit it records into
to
crews/<crew_id>.unit-order(fsynced, only after that entry is read backfrom the unit's own log by content, so a refused write never reorders; a unit recording
again is moved to the end, never listed twice; newest 64 kept, the rest and units
nothing recorded into keep header order and apply first; the file is rewritten
whole through a uniquely named temp file renamed over the name, under a pinned
parent directory where the platform supports it; where it does not, the name and
every ancestor are screened with a predicate that answers for a Windows directory
JUNCTION as well as a symlink --
os.path.islinkis False for a junction, and theplatform without descriptor-relative writes is the one where junctions exist, so an
islink-only screen would leave that fallback with no boundary -- and readrefusing a link at its name, so a link a sandboxed agent planted in the data home
is neither written through nor read through), and a writer pins its
own unit last besides. Header clocks alone were not enough: a clock stepped
backward before a replacement unit was created sorts the replacement first, and
a READ has no caller inside a unit to pin the live one, so a retired session's
phases would apply over the current ones.
crew_store.pykeeps its functionnames; they fold now, through an in-memory per-crew checkpoint advanced over
the entries that arrived since.
every crew's folded passes, retired crews included, the FIRST decision on a
number standing. Which is first is the writer's own observation, not a clock: a
pass recorded while another crew's decision already stood carries
deferred: truein its entry (the writer reads the index before it appends) and neverstands over the decision it saw, so a clock stepped backward on the later crew
cannot put its pass in front of an established one; only two passes neither of
which saw the other fall back to recorded time then crew id, and between two
concurrent decisions neither was established. It is a fold, not a second mutable
file. Staleness bound: a pass another crew recorded is visible once that crew's
append has drained. The write waits the writer's flush budget (5 s) for that
drain; an append still queued past it is answered as not durable and drains when
the writer catches up, so there is no upper bound on how late it becomes
visible, only the writer's own progress. The spec states this.
lists units by, so creation mints under one data-home-wide lock and checks every
repository's crew records -- under the legacy root and every provider subtree --
and the crew log's slot listing before an id is taken: two crews in different
repositories cannot share an id and fold each other's ledgers into one record.
from the caller's session -- and refuses by name when there is none: 409
crew_log_unavailable(no live session, the session has not run its first turn,or the crew log is switched off) and 413
ledger_entry_too_large(the updatecannot fit one entry). Every other refusal is checked against the folded record
BEFORE the append, so a refused update leaves the log untouched, and the store
holds one lock per crew across a write's fold, refusals, append and answer, so
two requests for one crew cannot both pass the one-editor rule against the same
fold; a write whose append the writer had not drained inside the flush budget
marks the crew, and the crew's next write drains again BEFORE it folds, so it
does not validate against a record missing that entry -- and a writer STILL not
draining refuses that next write (503
ledger_not_recorded, nothing changed,send it again), because a fold taken then could let the one-editor rule admit a
second editor. A write LISTS the crew's units strictly for the same reason: a
listing that failed, and one short a unit that already holds entries and cannot
prove its header, are both that refusal rather than a shorter record -- a read
answers what it could read, a write validated against a record missing a unit
could admit the second editor. The write drains the
writer and reads the landed entry back, so the
eventit answers carries the id andtsevery later reader sees;durablesays whether it did. A writer that drained WITHOUT the entry showing in the log
did not record it (the session's log deleted under the write, the writer gave
up, or the log unreadable on two tries -- the read-back is retried once so one
transient read failure does not turn a landed entry into a refusal; likewise an
append the writer's buffer rejected at its memory ceiling that is not in the log,
whatever the drain says), and the
write answers 503
ledger_not_recorded-- nothing changed, the same body may besent again -- instead of a record that may exist nowhere; the fold is advanced
over the entry as sent ONLY while the writer still holds it past the flush
budget. A field
is emptied by NAME: the route body and the record tool take a
clearlist (thetool advertises the clearable fields as an enum; an unknown name is 400
invalid_clear, not ignored), because every tool argument is forwarded ontruthiness and a
pr_number: nullwould never reach the route. The route turnseach name into an explicit null in the patch; a typed entry field cannot hold a
null, so the writer names the cleared fields in the entry's
clearlist and thefold empties them before applying the fields the same update sets. The fold
collapses a repeat of an item's OWN LAST applied update -- same payload, whatever
its line id, which a retry re-stamps -- so a retried append applies once; an item
that legitimately returns to identical fields after intervening updates is a new
update and applies. Every field the fold retains is bounded and eviction is counted --
and the counts are returned on
GET /crewascounts.evicted_itemsandcounts.evicted_skips, the payloadissue_radar_crew_readserves, so a crewreading its own record is actually told: per
crew 500 work items (a finished item goes first, oldest finish first, then the
open item longest without progress, never the one just written; an evicted item
takes its phase history along), 5000 passes (earliest decided first), a 500-line
event tail, 200 phase entries and 100 rejected approaches per item (a repeated
pair folds to one row), at most 20 labels per item, and a CI reading keeps only
its declared members (
state,passed,total,round,inherited_reds), eachre-bounded to the record tool's own type and ceiling, so a reading cannot grow
an item key by key or carry an oversized member into every retained item; every
numeric field is bounded in MAGNITUDE as well --
numberandpr_numberto thetool's
1..1_000_000_000,claim_comment_idto its1..10^18, on the fold's wayin and in the carry alike -- so a thousand-digit number read off a file is dropped,
as a number of the wrong type already was, rather than kept as an item or skip key
and re-served in every later checkpoint and response; the
repeat check that folds a duplicated entry to one update compares the whole
payload against the item's LAST applied update only -- not the timestamped line
id, which a retry re-stamps, and not a window of history, which would drop an
item's legitimate return to an earlier state -- so a retry after a 503 applies
once and a repeated transition applies;
countsreportsevicted_itemsandevicted_skipsbesideopen. The in-memory checkpoint cache is read, set and evicted under one guardlock: reads and writes run on worker threads, and an unguarded two-step eviction
can pop a key twice. It is held against every unit's MARK -- its log file's
creation identity together with its newest seq -- so a log removed and created
again under the same id is folded cold rather than continued from the retired
log's checkpoint, whether or not the new log's seq has climbed back past the
cached one; an identity that cannot be read never reuses or caches.
after the upgrade -- the one before any radar entry has folded into its record --
whichever kind of write it is: an idle sweep is a routine
first write, and a sweep that appended without carrying would leave the crew
read as owing nothing while its open items sat unread. A crew whose every write
is an idle sweep holds no items and no passes for good, so the trigger is what
the record has FOLDED and not what it holds: keying on emptiness would carry the
files again on every such write whenever they are present without their marker.
Both writers share one
preparation step (record the unit order, fold, carry, refold): work items with
their own stamps and newest rejected
approach, and -- by whichever crew of the repository writes first -- the shared
skip index's rows with the crew and time that decided them, as passes and not as
work items. A begun marker (
.carrying) is written before the appends and thefinished marker (
.carried,skipped.json.carried) only after every carriedentry has been read back from the log -- a drained writer can have refused an
entry quietly -- so a carry that did not fully land is run again on the next
write, and the write that triggered it is REFUSED (503, nothing changed, send
it again) rather than folded over a record short of the rows still in the
writer or refused by it, a carried editing item among them; a carry still in
the writer also marks the crew undrained. A carried item is never listed twice.
A row that does not fit one
entry is shrunk until it does (free text clamped in steps 4000/2000/1000/500/256;
the fold clamps to 4000 on every read, so the first step loses nothing the fold
kept, and a later one is taken only for long non-ASCII text that serializes past
the ceiling; labels trimmed to what the fold keeps, and each
ci_statememberbounded the way the record tool bounds it on the way in -- the five kept keys,
a 32-char verdict, counters within the tool's ranges, anything else dropped -- so
one oversized legacy member cannot make a row unfit), and a row that could not be
carried is NOT carried, does not let the carry finish, and REFUSES the write that
triggered it (503, retryable, naming the files): unreadable, not a record, without
a number the file name can recover inside the tool's range, or too large at every
clamp. The finished marker would discard that row's stored state for good, and
folding without the row is worse than refusing -- an omitted row holding an editing
phase leaves its item out of the record the one-editor rule reads, so another item
can enter that phase while the row still holds it. The files stay unmarked, the rows
are named in the log and in the refusal, and the next write carries them once they
are repaired or moved aside. A
re-run emits only the rows the record LACKS: a carried entry re-states the file's
fields as an update, so re-emitting a row that already landed would set an item
the crew has since worked back to its pre-projection state. The old files are never
written again and, once marked finished, never read again.
PROJECTION_NAMES/SLOT_PROJECTION_NAMESsplitand
FOLD_NAMES, so a slot-wide value is never pushed under one session's id.On top of #12027 and #12030. Rebased onto main at
53cfc5d51c, which carries both: the session ledger's generic slot-join plumbing (store.session_units_for_slot,projection.fold_slot_checkpoint,SLOT_PROJECTION_NAMES/FOLD_NAMES) is main's now and nothing is carried here any more -- this PR addsradarbesideledgerinSLOT_PROJECTION_NAMESand registers its fold. Two core touches ride with it:session_units_for_slotgains astrictkeyword so a WRITE can tell a listing that failed from a slot with no units (a read keeps the fail-soft empty listing), andemit.overflow_writesanswers per session as well as in total. The dashboard's projection routes serveledgeras main does and refuseradar(projection.OWNER_SERVED_SLOT_PROJECTION, 400unknown_projectionon the per-session and the unit-keyed route alike): the radar fold's owner orders a crew's units by the order the crew recorded into them and pins the live unit last, which a generic read cannot, and folding one unit would serve a part of the record as the whole. That name is a single string rather than the one-member tuple an earlier head carried: the first-principles subtraction accepted in this thread and deferred there to the next change touching the surface, made here because this rebase touches it.Tool names and the MCP allowlist are unchanged;
issue_radar_crew_recordgains oneoptional argument,
clear(a list drawn from the clearable-field enum), and itsother arguments keep their types. The First Principles lane reads this argument as
riding along, since the route's own body already accepts an explicit null; it is
kept because the GPT lane's fenced finding is that the MCP tool forwards every
argument on truthiness, so a
pr_number: nulltool call never reaches the routeand the only way a CREW can empty a field is a list of names -- the hard-gate
finding stands over the advisory subtraction, and this is the record of the
disagreement. Out of scope: the work ledger and the member activity log.
Backwards compatibility
Breaking:
issue_radar_crew_recordnow needs the crew's slot to have a LIVEsession whose crew log exists, and refuses with 409
crew_log_unavailableotherwise -- including on a gateway where the crew log is switched off. The crew
log is OFF by default (
KIROCREW_CREW_LOG=1switches it on; the append-only ledgerRFC pins it off until it graduates), so a stock gateway has no crew ledger until an
operator sets the variable: every record call answers 409 with a message naming
it, and the pre-projection files are left untouched
until the first successful write, so switching the log on later loses nothing.
Reads do NOT go dark on upgrade. A carry can only run from a write -- it appends, it
takes the crew's write lock, and it refuses its caller when a row does not land --
but the reads that happen first are the ones a crew acts on: the pre-investigate
nudge snapshot (
list_work_items,open_slot_count) and the repository's sharedskip index (
read_skips). Soread_ledgerPREVIEWS the pending carry(
crew_store._legacy_preview), folding the very payloads the carry would append overthe same base through the same projection, appending nothing and marking nothing;
it is reached on the write path's own carry trigger, so the two agree on when a carry
is owed, and it stops the moment the log holds the rows. Same shape as
session_ledger._legacy_previewfrom #12027, which this takes both halves of ratherthan the write half alone. It follows that recording being switched off costs writes
and not reads: a crew whose crew log is off still reads its pre-projection state
instead of the empty record.
Every rejected approach is carried, not just the newest. A pre-projection item's
triedlist is the crew's memory of what it already ruled out, so it is emitted asone entry per approach -- each re-stating the whole record and differing only in that
approach -- in the file's own order, so the folded list still ends with the newest.
The fold needs nothing new: a carried
triedis already deduplicated by content andthe list is already clamped to
RADAR_TRIED_LIMIT. Approaches past that ceiling, androws without a usable approach, are counted in the carry's event rather than dropped
in silence. A carry that is re-run leaves an item alone only when the record holds its
WHOLE history, so a run whose entries partly landed recovers the rest instead of
losing it (order is the file's after a clean carry, best-effort after a refused one).
The old progress log (
<data>/repos/<owner>/<repo>/crews/events.jsonl) is notcarried: its lines are history the crew page can live without, and the crew's public
claim comments already hold them. Carried items therefore open with a single phase
line, and the crew page and the fabric timeline start from the upgrade.
Skip durability changes with the storage: a pass lives in the crew log of the
session that recorded it and leaves with that log when session retention collects
it (
session.archive_retention_days, 30 by default;nulldisables the sweep),where the old file kept it for the life of the repository; the carried historic
index is re-stated into the ONE unit of the crew that writes first after the
upgrade and leaves with that unit. The same bound holds for an OPEN work item: an
update carries only the fields it set, so an item still open when retention
collects an earlier unit of its crew's slot (30 days after that session closed)
loses the fields nothing re-stated since -- its claim stamp, an early
decisionor
why, older rejected approaches -- whilephase,nextandpr_numberarere-set by the ordinary writes such an item keeps receiving. The spec states all
three and accepts them by name: the index bounds re-investigation within the
window crews actually work in, an item open across a session boundary for longer
than the retention window is the exception traded away, and the public claim
comments and the issues remain the repository's permanent record. The coupling is
also stated where an operator touches the knob: the
Archive Retention (days)setting's help text now says the window collects crew logs and, with the crew log
on, Issue Radar's shared skip memory and open work items. Writer
sweep on origin/main @ 53cfc5d (the rebased base): the only writer is
crew_routes._handle_crew_work(updated to resolve the live unit and pass
session_id);crew_runtime.py, theMCP layer and the routes module only read (
list_work_items,open_slot_count,read_events,read_skips,fold_fabric), and those keep their signatures. Thestore functions removed (
upsert_work_item,append_event,record_skip,unrecord_skip, the rollback) had no caller outsidecrew_store.py; the one prosemention of the rollback elsewhere (
apps/teardown.py's docstring) is reworded.Existing
ledger files are carried forward on the crew's first write, so a crew upgraded
mid-work keeps its open items and the repository keeps its passes.
Tests
test/test_issue_radar_crew_store.py(rewritten, 179 tests): record -> fold roundtrip; one call appends exactly one entry carrying only what it set; the answer is
the line the log holds; a refused update appends nothing; an append the writer
drained without landing raises instead of answering; a write without a live
session / an uncreated log / a switched-off crew log is refused by name; an update
that cannot fit one entry is refused before anything is appended; the clearable
fields are one list in the entry type, the store and validation; rejected
approaches are bounded per item, newest kept; work items are bounded with
finished ones evicted first, open ones kept and the count reported; passes are
bounded, earliest decided evicted and counted; a CI reading keeps only the
declared member keys; every checkpoint-cache access holds the guard (a cache
that refuses an unguarded get, set, pop or iteration, driven through a write, a
read and an eviction); reads apply units in the order they recorded when the
store lists them in inverted header order; a crew-level sweep as the first write
carries the legacy items; a pass recorded after another crew's decision defers
to it whatever the clocks say (a stale-clock row with the token loses; the same
row without it would win; the writer sets the token itself); an oversized legacy
item is shrunk to fit and carried; a legacy row that cannot fit leaves the carry
unfinished and is carried on the next write; an undrained append is drained
before the crew's next write folds; a log gone at read-back is a refusal, not a
record; a read-back that fails once does not turn a landed entry into a refusal;
an oversized or ill-typed legacy CI member is bounded and the row carried, and
the fold's CI bounds and label cap are pinned against the record tool's own field
specs; a writer still behind at the next write refuses it instead of folding a
stale record; a retry stamped later applies once while an identical update after
an intervening one is a new update; a crew id in use by any repository's crew or
named by a crew-log slot is never minted again, from any provider root; a carry
still queued in the writer, or short of a row, refuses the write that triggered
it; the unit-order write never follows a planted link at the name or the
directory (the directory case is planted with a JUNCTION so it runs on Windows
too, and a separate pin drives the fallback screen through the junction-aware
predicate), and the order file can at most permute the crew's own header-proved
units; an append the buffer rejected at its ceiling is a refusal, not a record,
while another session's rejection in the same window is not; a unit listing that
fails refuses the write and empties the read, and so does one that is merely
INCOMPLETE -- a unit already holding entries whose header will not read is refused
rather than left out, on the cached listing as well as the scanned one, while a
unit directory whose header is not published yet still lets the write through;
a crew whose log cannot be FOLDED
reads as the empty record and the repository's read across crews still answers,
while the write on the same crew raises rather than folding empty; a begun marker
that cannot be written refuses the write before any carry; CI members and labels
read off bytes are re-bounded, and a number outside the tool's range is dropped by
the fold (item key, skip key and
pr_number) and makes a legacy row unfit ratherthan folding it as a crew-level line; a legacy record that cannot be read refuses
the write and is named in it, a record whose number field is missing
carries under the number the file name holds, and a skip index that is not a
record refuses its own write; a crew whose every write was an idle
sweep does not carry a file that appears later; a re-run carry does not re-emit a
row the record already holds, so a live item's state survives it; a unit removed
and created again under the same id is folded cold however far its seq climbed;
a crew folds
across every unit its slot ran under with the live unit last; an entry naming
another crew is left out; the skip index is folded across the crews of one
repository, first decision standing, and a re-skip is told what stands; the
pre-projection files are carried once with their own stamps, by one crew only,
never once a radar entry has folded, and a malformed file is skipped. The properties
the file store had -- claim stamps, editing exclusivity, slot accounting,
reopen clearing the finish stamp, sweep coalescing, the historical line-id
formula -- are re-pinned through the fold.
test/test_issue_radar_crew_routes.py(114): the write route records into thecrew's unit whoever writes; 409
crew_log_unavailable; 413ledger_entry_too_large; 503ledger_not_recordedwhen the writer drainedwithout landing, with nothing recorded;
clearempties the field the body names;a
clearnaming an unknown field is 400 and writes nothing; a conflict appendsnothing; a restart folds earlier units. The rollback class goes with the
transaction it tested.
test/test_issue_radar_crew_mcp_tools.py(87): aclearlist is forwarded byname; the tool's
clearenum is the store's list.test/test_issue_radar_crew_fabric.py: the fabric folds phase entries from theper-item history, so a stalled lane keeps its entry stamp past three times the
event tail's bound; a carried item folds with its live phase.
test/test_crew_log_types.py,test_crew_log_core.py,test_docs_crew_log_reference.py: the registry pins for the new type, domain,closed vocabularies and reference page. The
RADAR_TEXT_LIMIT==MAX_MEDIUM_STRINGequality is pinned intest/test_issue_radar_crew_store.py(with
_MAX_CARRIED_TEXT), not intest_crew_log_projection.py, which this diffdoes not touch.
test/test_issue_radar_crew_runtime.py,test_issue_radar_deps.pyand the app'sown
test_crew_store_non_utf8.pyseed through the fold; the per-number skip locktest goes with the lock.
Locally, on the pushed head (rebased onto 53cfc5d, main with #12027 and #12030
merged): store 182, routes 114, MCP tools 87, fabric 27, runtime 160, deps 88,
projection 97, crew-log core 204, type pins 164, reference-page pins 235,
test_crew_log_routes.py173 (including the pin that both projection routes refuse the owner-servedradarfold and still serveledger),test_mcp_crew_log.py48,test_session_ledger.py59,test_session_ledger_projection.py113, config baseline 17,and the app's own crew-store files pass. Each fix in the review rounds was
mutation-verified: the fix disabled reddens its test. Gate floor run: black, isort,
flake8, mypy, subprocess-encoding, comment-history (enforced against origin/main),
brand, docs lint, loop-bound locks, sync-io-in-async, testpaths coverage, lockdown,
memory-store seam, agent-sdk boundary, builtin skill scope, feature map, harness
parity and changelog history all pass.
Two findings from the review on the previous head are fixed here, each with its own
pin and each mutation-verified. A third, raised as advisory, is fixed for the same
reason:
emit._overflow_by_sessionis the per-session overflow count this change adds,and it was released only by the global
reset_cacheswhile all six sibling per-sessionmaps are released in the close path's terminal cleanup. A gateway running for weeks
therefore kept one entry per session that ever overflowed. It is now released with the
others. The neighbouring
_overflow_reportedis deliberately left alone: it is areport-once latch cleared on recovery, it predates this change, and its lifetime is not
this diff's to decide.
_app_rootselected the FIRST@providerscomponent in the path, so a data home whoseown base path carries that segment was truncated above the data home. That moved both
the mint lock and the id-uniqueness glob out of the tree they are meant to cover, and
the glob then matches no crew record at all -- so the uniqueness check answers "free"
for an id another repository holds, and two crews fold one ledger. It now strips only
the exact trailing
@providers/<provider>/<host>the provider root appends.test_the_app_root_strips_only_the_provider_subtree_it_appendedpins both directions:an operator base carrying the segment is returned unchanged, and a real provider
subtree built on that same base is still stripped.
The unit-order link test guarded on
hasattr(os, "symlink"), which is true on Windows,and then skipped at runtime when the unelevated shell refused to create the symlink.
Windows is the platform that takes the screened fallback -- it has no
descriptor-relative rename -- so the skip left that platform's only boundary
unverified while the shard stayed green. The real-symlink test is now POSIX-only by
declaration, its runtime skip is gone, and
test_the_name_screen_refuses_a_linked_order_file_on_every_platformdrives the screen'sown refusal everywhere by forcing the fallback and answering for the order path alone.
The crew's unit order was noted before the append instead of after it. That file's claim
is that the noted unit holds the newest entry, and only an append that LANDED earns it:
noting it earlier lets a refused or still-queued append take precedence it never earned,
pinning a unit ahead of its successor, whose next fold then reads the pinned unit's phase
and next step as current and acts on them. The queued case is not hypothetical -- the
_undrainedmark exists for exactly it. The note now happens in_append, gated on theentry being read back from this unit's own log by content; it is gated on that rather
than on the drain or the refusal counters because those counters are process-wide, so
another session's refusal must not suppress a note this unit genuinely earned.
test_a_write_that_never_landed_does_not_claim_the_newest_entrypins it: two unitsrecord, and then a write whose writer never drains must leave the order unchanged. Main's
session_ledgeralready gates its own equivalent note on the same fact, so this bringsthe crew ledger's to the rule the session ledger already follows.
The Windows backend shards have gone red on two of this branch's heads, and it is not this
diff. The evidence is three independent readings. The failing TEST differs per head: shard
1 failed
test_a_credential_in_the_command_is_annotated_rather_than_refused(
test_decisions_tool_risk_end_to_end.py,assert None is not None), and shard 7 failedtest_windows_failed_tree_kill_keeps_live_pid_records(
test_runtime_cleanup_windows.py) -- two unrelated tests, one failure out of ~13,500 eachtime. This change touches no
decisions,tool_risk,runtime_cleanup,platform_compator
windowsfile, so neither module is in its population. And all EIGHT Windows shardspassed on the next head, whose diff differs only by a constant, two counters and their
tests. A third open pull request with an unrelated diff failed a third different Windows
test in the same window. Shard indices are not compared across revisions here: whole-file
shard assignment moves with the file set.
The frontend and coverage lanes went red on one head for the same kind of reason, and a
re-run of only those three jobs on the unchanged commit returned all three green. There is
one root failure there rather than three:
Coverage Gatefailed at its step "Requireupstream coverage jobs to have succeeded" and
Frontend Coverage Mergeat "Merge reportsand coverage", and both consume the shard's artifact, so neither is a coverage threshold on
the lines added here. The root was the step "Unit tests (shard 2/4)". This change touches no
frontend file at all --
git diff --name-onlyagainst the base, restricted to*.ts,*.tsx,*.js,*.jsx,*.vue,*.css,*.scssand the frontend tree, returns nothing-- and the same three lanes were green on the preceding head, whose only difference from
this one is two backend Python files. An unrelated open pull request showed the same
three-lane cascade with a different shard index failing.
The fold clamped free text below the cap the record tool itself accepts. The schema takes
next,decision,why,tried_approachandtried_rejected_becauseup toMAX_MEDIUM_STRING(5,000), whileRADAR_TEXT_LIMITcut them at 4,000 -- so an ordinary4,001-to-5,000-character field was accepted, appended, and then shortened on every read.
That is silent corruption of state a resume acts on, not a bound: the clamp is a shape
gate on bytes a reader does not control, and a gate below the accepted cap cannot tell a
value the tool took from one it would have refused. Raised to 5,000.
test_the_folds_text_clamp_is_the_cap_the_record_tool_itself_acceptspins it twice --the two constants must be equal, and a field at that cap must come back whole -- and it
is pinned rather than imported so the fold keeps no dependency on the MCP layer.
An out-of-range number erased the association already stored.
_entry_datawrote anyfinite
pr_numberorclaim_comment_idinto the entry, and the fold -- which appliesRADAR_NUMBER_BOUNDSto the bytes it reads -- then dropped it, so a dashboardpr_numberof0or a comment id past the forge's range made the update LAND andsilently replace the pull request the item already carried. The magnitude bound now sits
at the write as well, so such a value is left out and reads as "unchanged" -- the same
answer this entry already gave a number it cannot read as a finite int at all.
test_an_out_of_range_number_does_not_erase_the_one_already_storedpins both halves: theheld pair survives, and the entry carries neither key.
_record_unit_order's docstring still described the call site the change above moved. Acomment that narrates where code used to sit is stale the moment it moves again, so it
now states the invariant positively: a line in that file always names a unit whose append
landed, because the call is gated on the read-back.
Raising the fold's clamp exposed a second one that had to move with it. The one-time carry
of the pre-projection files applies its own ceiling,
_MAX_CARRIED_TEXT, and its commentalready claimed the fold clamps the same -- true while both were 4,000 and false the moment
the fold went to 5,000. The carry is one-shot and writes a finished marker, so a legacy
nextof 4,001 to 5,000 characters was cut with nothing left to re-read it from: lossinside the live ledger, silent and permanent. Raised to 5,000, and the parity test now pins
all three constants -- the carry's, the fold's, and the record tool's -- equal to each
other, so none can drift alone again.
Two reviewers asked for opposite things about the same two counters, and the hard gate wins.
First Principles called
counts.evicted_itemsandcounts.evicted_skipsa zero-consumeraddition and asked for their deletion; I checked and it was right that nothing reads them
(across
src/,test/,docs/andwebsite/srcthe only references were the fold thatdefines them, one spec sentence, and four test assertions), so I removed them. The next
review round then failed on AUTOSDE
a-bound-bounds-every-field-it-retains, which carriesblocking: trueand requires that overflow "is COUNTED and said out loud once persnapshot" -- the deletion is exactly what that rule forbids. So the counters are back, and
this paragraph is the disagreement rather than a silent choice: a bounded snapshot that
cannot be told from a complete one is the failure the rule exists to stop, and a tally with
no reader today is the cheaper of the two mistakes.
That disagreement is now moot, because the counters have a reader. @bolichen97 pointed out
that "said out loud once per snapshot" was not met on the surface a crew actually reads:
the counts lived in the fold value while
GET /crewreturned{"open": ...}alone. Theyare now on that payload, which is what
issue_radar_crew_readserves, so First Principles'objection (nothing reads them) and the AUTOSDE rule (overflow must be said) are both
satisfied rather than traded off.
Four more blocking findings on
d6908756db, three of them upheld as security-class. Allthree were verified against source and fixed; the fourth was downgraded as disproportionate
and is a stated residual.
F1, the dedup guard (
projection.py). The guard asked whether an item OR a pass with thisnumber still existed. One ordinary update can write both -- the item, and a pass when it
carries
skip-- and the two are bounded on separate rules and evict independently, so asurviving pass stood in for an item the item bound had since evicted. The retry of that same
update, which is the one thing that would put the item back, then returned early and left it
missing until some later DISTINCT update happened to rewrite it. The guard now asks whether
everything the update WROTE is still present: the item unless the update is a carried pass
(which deliberately writes a pass and no item), and the pass when it carries one. That also
closes the mirror case the finding did not name, a pass evicted while its item survives,
because it is the same expression and the same argument.
F2, the item bound (
projection.py). With no terminal item available the victim pool fellback to every candidate, so the item in an editing phase could be evicted -- and the
one-editor rule is decided by scanning the items the record still holds, so it then answered
"no editor" and admitted a second one, whose conflicting lines an append-only log cannot
retract. An item in an editing phase is now never a victim. The bound stays meaningful
rather than being suspended for every open item: the rule admits ONE editing item at a time,
so at most one candidate is withheld, and if a damaged log somehow leaves no candidate at
all the bound is exceeded instead -- which is what this function already did when the only
item left was the one just written. Refusing the entry was not available: this runs inside
the fold, over bytes already in the log, and a fold cannot reject what it reads.
F3, unit precedence (
crew_store.py). Precedence is earned by an append that LANDED, andthe append path can only see one that landed inside the flush budget. An append the writer
still held when that budget expired lands afterwards, by which time its unit may be retired
and have no next write of its own to make the claim -- so a successor unit stamped by a clock
that went backwards sorted ahead of it in header order and every read folded the retired
unit's phase and next step as current. The crew's next write does have the receipt that
proves the late append landed, read back from that unit's own log by content, so the
precedence is published there. It is correctly ordered by where it sits: at that instant the
receipt's entry is the newest this crew has landed, and this runs before the current write's
own append, whose landing moves the live unit after it. No new contract through the shared
writer was needed.
F4, the overflow counter (
crew_store.py), downgraded by the adjudicator as adisproportionate remedy and left as a residual: a concurrent same-session append that
overflows during this one's flush can turn an accepted radar append into a 503, although it
later commits. Nothing is lost, the refusal is loud, and an identical retry coalesces on the
next read. Tracking acceptance per append means a new return-value contract through the
shared writer, which is more permanent maintenance than a rare, visible, self-correcting
false refusal is worth.
An eviction could make an accepted retry vanish. The dedup map
last_updateand the twobounded collections evict on different rules over different key sets, so an evicted item's
digest outlives the item; a retry of the update the crew was told had landed then matched
that stale digest and returned early, leaving the row gone. The dedup now holds only while
the record it belongs to is still present -- with the item or pass there it is doing its
job, and once it is not, the retry is what puts it back. Gating the comparison rather than
coordinating two eviction mechanisms keeps the two key sets independent, which is why the
earlier round's adjudicator called the coordinating remedy disproportionate.
test_a_retry_after_eviction_puts_the_item_back_rather_than_deduping_awaypins it: evictan item under a lowered bound, resend its exact last update, and the item must return.
A quiet writer was being read as a persisted entry. When an append had not drained, the
crew was marked so its next write drains again before folding -- but that mark was released
on
flushalone, andflushreports that the writer's buffer is EMPTY, which a droppedwrite achieves exactly as a successful one does. The mark cleared, the fold ran short that
entry, and the one-editor rule was checked against a record that permits a second editor --
silently, because the earlier call had already answered. The mark now carries a RECEIPT for
the queued append: which unit's log it belongs in, the seq it followed, and the entry
itself. It is released only once that entry is found in that log BY CONTENT, and otherwise
the write is refused exactly as an undrained one already was, so the caller's resend is
what puts the missing update back. The carry's own mark carries a receipt too. The read-back
this needs already existed in the durable-answer path, so it is now one helper that both
callers share rather than a second copy of the same read.
test_a_quiet_writer_whose_entry_never_landed_refuses_the_next_writepins it: an appenddropped on the floor, a drain that then reports quiet, and the next write must refuse
rather than release the mark.
Manual verification
None beyond the tests: the change has no UI and the route contract is exercised
end to end by the route tests.
Screenshots / video
Not applicable: no user-visible UI change.
Related Issues
Feature, no tracking issue. Pattern source: #12027.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement