Repository navigation
feat(crewlog): a session may read the crew logs it dispatched - #12141
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify #12388 stays tracked: cross-session reads silently expire once a log's opening segment ages past the retention horizon, time-bounding this feature until re-anchoring lands. [DESIGN-REVIEWED] 479856e |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The owner-arm narrowing — a channel-mirrored or linked owner tab loses its read of every unit — is a capability removal no recorded decision covers. Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: let a conductor session read the crew logs of the sessions it dispatched, without widening to "any session reads any" — an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 479856e |
4fe5531 to
516273a
Compare
|
span=1dee901dc18f disposition=needs-a-decision
|
|
span=852b820d086d disposition=needs-a-decision
|
|
span=cc118f2f8bc9 disposition=needs-a-decision
|
516273a to
5916d4d
Compare
5916d4d to
8f87f41
Compare
c96ef47 to
d58b1ec
Compare
d58b1ec to
918bd3f
Compare
GPT 5.6 Review —
|
GPT 5.6 Review —
|
918bd3f to
9c21333
Compare
9c21333 to
6155cb7
Compare
Replaces the owner-only rule on the crew-log read endpoints with a dispatch fence: a caller with a valid strict session identity may list, page and project its own unit, the unit of any session it dispatched transitively, and -- as the owner at a dashboard tab -- any unit. Lineage comes from the recorded session/opened parent edge. The caller-class exclusions session_control.authorize_target applies are mirrored from that module's own constants.
|
item=3 disposition=needs-a-decision (This round's First Principles comment carries no
|
Body-text corrections on
|
| body says | measured now |
|---|---|
| "1137 tests pass" across the 8 named files | 1186 pass, same 8 files, serial |
"mypy reports two errors, both in src/kiro_crew/transcribe.py" |
zero errors, 1662 source files |
| "Four mutations cover this round" + its 4 names | those 4 predate the last two rounds; 6 more verified since |
1. Test count. 1186 passed across test_crew_log_projection.py,
test_crew_log_routes.py, test_crew_log_emit.py, test_crew_log_checkpoint.py,
test_crew_log_types.py, test_session_control.py, test_mcp_crew_log.py and
test_docs_crew_log_reference.py. The gap is the eleven tests the last two rounds added:
TestTheWorkspaceBoundary (7) and TestTheListingCarriesTheWorkspaceBoundary (4), both
in test_crew_log_routes.py.
2. mypy. The boto3 stub drift the body discloses is gone from this environment, so
the disclosure now understates the result rather than overstating it.
3. Mutations. The four the body names are real and still killed. Six more were
verified this round, baseline green first, each restored from an in-process copy:
Workspace arm -- the whole arm admitting (kills 5); the GATE's call deleted (kills 1);
the per-unit re-check's call deleted (kills 1). The gate's call needs a test that calls
_read_scope_refusal DIRECTLY: every unit read also passes the stale re-check, which
runs the same arm, so a route-level test cannot tell the two sites apart and that
mutation survived until the direct test existed.
Listing filter -- the per-row filter never consulted (kills 2); the filter applied to
the caller's OWN rows as well (kills 1, which is what pins it as lineage-only); the
listing re-check's workspace-move test dead (kills 1).
One retraction while correcting the record: an earlier note of mine claimed
_target_class_refusal's live half had no test coverage. That was wrong, and it came
from grepping for the function name and its refusal texts rather than measuring.
Mutating the _app arm reddens 2 tests; mutating the memory_mode arm reddens 2 more.
No coverage issue is owed.
Problem / Motivation
A conductor session cannot read the crew logs of the sub-sessions it dispatched.
That is the ordinary shape of the work -- a conductor checks what a worker actually
did -- and the crew log MCP server merged in #11909 refuses it: its gate admits only
the owner's own dashboard session for any unit other than the caller's.
The premise first put forward for fixing it was wider: sessions on one Kiro Crew
gateway belong to one operator, so any may read any other, and
session_read_messagealready returns a peer session's transcript. That premise does not hold, and this PR
does not implement it.
session_control.authorize_target(session_control.py)refuses an unattended caller (
cron:,taskrunner:), an app-scoped caller or target,an incognito or temporary caller or target, and a channel-linked or channel-mirrored
caller or target; it addresses only open sessions and sits behind
agent.session_control. So that tool is narrower than an unrestricted read ratherthan an example of one. The class it refuses most pointedly is the channel-linked
session, whose conversation is a Slack or Telegram thread that several allow-listed
people read and prompt-injectable content enters -- which "one operator" does not
reach.
Why it matters to the user
Without this, a conductor has no way to see a worker's recorded history and must ask
the worker to narrate it, which is both slower and less reliable than reading the
record. With the wider rule instead, a crew log -- which carries full message bodies
in its
message/*entries -- would become readable by a session whose ownconversation is published to a messaging channel, so one read would republish another
session's transcript to an audience that was never party to it.
How it changed
The gate now asks for a valid strict session identity and then a dispatch scope. A
session reads its own unit; the units of sessions it dispatched, transitively; and,
when it is the owner at a dashboard tab whose own caller class allows it, any unit.
The listing carries the same scope as a filter, because an unscoped listing would
name every session on the host and a per-unit gate cannot refuse that after the fact.
Three things make that fence hold, each one closing a gap the previous round left:
The grant does not cross a workspace. A lineage OUTLIVES a workspace switch: the
creating edge is written on the child and nothing rewrites it, so a conductor that
dispatched a child and then moved to another workspace still names that child in its
tree. Switching workspace is ordinary operation, so the recorded lineage alone would
hand that conductor a log belonging to the workspace it left. So the recorded class
now carries the session's
workspace, and the fence compares it against the caller's.Three states refuse -- the workspaces differ, the log's workspace MOVED so its content
spans two and neither owns it, or the log records none, which no live slot can produce.
Unlike the other class members this one is an identity rather than a restriction, so it
is not folded most-restrictively: the first stated workspace is held and a later
different one sets
workspace_moved, which is itself the restrictive fact. The arm runsin the gate AND in the post-read re-check, because a caller can switch workspace while
the payload is built; it is ordered last of the target arms so a caller refused for
publication still gets that more specific reason.
CHECKPOINT_VERSIONmoves to 2,retiring savepoints that describe the old fold.
The LISTING carries that boundary too, not just the per-unit read. A row names a
unit's slot, model and activity, so a boundary enforced only on content would be walked
around by reading the enumeration instead. The listing asks the per-unit target tests
once per row, for rows admitted by LINEAGE only -- a caller's own row is its own record,
which the per-unit door also answers before any target test, and the owner's unscoped
listing is not narrowed and so is never asked. That is also what bounds the cost: one
fold per unit in the caller's own tree, never one per unit on the host. The rule is
passed down as a callable rather than restated inside the reader, so one authorization
rule has one implementation. The listing's stale re-check compares the caller's
workspace as a VALUE captured at the gate, because a slot's workspace changes IN PLACE
-- holding the slot object would make the check compare the new workspace against
itself and never refuse.
The fence keys on slots, not on unit ids. A slot outlives its ACP session, so a
gateway restart gives the same tab a new session id and therefore a new crew log
unit. A fence keyed on the recorded
parent.sidwould hand a re-attached conductor achain naming one of its own earlier units and lock it out of children it dispatched
minutes earlier. The transitive walk is
crew_log/session_tree.py's own fold(
SessionTree.recordsplusfold_tree), not a second slot map, so the fence and theSessions page's tree cannot disagree about who dispatched whom.
parent.sidstays onthe entry as the audit citation for which log held the creating call.
A target's class is recorded in its own log. The question "may another session
read this log" is asked about sessions that have closed, and a closed session has no
slot left to ask, so the class is written on
session/openedat open time as facts:memory(the slot's memory mode, required inside the object),app(the owning app,when one does),
channel(true when the conversation is published to a messagingchannel by a link or a mirror; a cron tab's link is not one). Facts rather than a
verdict, because the entry cannot be rewritten and a verdict would freeze one build's
reading of a rule into it. The object's presence is the witness that the class was
recorded, which is why
memoryis required inside it -- so a session with nothing todeclare (
{"memory":"persistent"}) is distinguishable from a log written before thefield existed. A log with no record is REFUSED for a cross-session read rather than
read as "nothing applies", and the refusal names the missing record.
A class can MOVE while a session runs -- a tab gets a channel surface, an app takes the
session -- and the turns that arrive afterwards are in the same log, so the opening
entry alone is not the answer.
session/classrecords a move, appended by the oneemitter that already observes the class every turn and already writes only when there
is something new to say, so no writer in any other subsystem has to be instrumented
and none can be missed. Reading it is the
classprojection, registered in the foldregistry like its five siblings: it holds each member at the most restrictive value the
log ever recorded, because a log published to a channel for one turn holds that turn's
words for good. It also reports whether the history has a BEGINNING, which is what
refuses a log whose opening entry retention has taken -- and what dates a log, since
the opening
classobject andsession/classwere declared together, so a log statingthe first was written by a build that records the second. The fold is incremental
through the registry's own checkpoint, so a scope test costs no whole-file read.
That front-of-log refusal has a consequence worth stating plainly: retention deletes
whole segments off the front by age, so once a long-lived session's opening segment ages
out its log becomes permanently unreadable from another session. The grant expires at the
retention horizon. It fails CLOSED, so nothing is exposed by it, and a refusal is
recoverable where a wrong admission is not -- but it does time-bound the feature, and the
fix is out of scope here: re-anchor the class at segment rotation by writing a snapshot as
each new segment's first entry, which works because each member is already latched at the
most restrictive value the log ever recorded. Filed as #12388. The retention case gets its
OWN refusal text rather than sharing the unrecorded-class one, because the remedies
differ: nothing about an aged-out log will satisfy the read again, where an unrecorded
class is fixed by the session recording one.
The record and the live slot are ONE target test rather than two sequential ones. That
is what makes the record half unskippable: a caller cannot consult the live half alone,
which for a target with no live slot would be no test at all. The live half then covers
the only thing the record cannot, a link acquired in the turn now in flight, whose
entries are not written yet.
The owner arm is held to the caller classes too. Reading every unit is the case
this door shipped with; being exempt from the caller-class test is not. A dashboard
session mirrored to a channel republishes every turn, so that tab would otherwise be
the one caller entitled to read every log and publish it. It keeps its own unit, like
every other excluded caller. This closes the inherited finding the Opus lane raised
on the previous head.
The owner-only branch and its self-scope arm are removed rather than short-circuited,
and the refusal texts for "no placeable unit" and "a unit in another tree" are one
string, so a caller cannot tell them apart and use the difference to learn which
slots are live.
The grant is re-asserted after the entries are read. A
read is decided on the event loop and then performed off it, and that offload is a
suspension point: the target can append a class move while the entries are
being gathered, and returning the payload on the earlier verdict would be a one-shot
delivery of content the refreshed class governs. So the whole target
test runs again before any payload is returned, on all three routes that offload one. The target's class IS folded again, because that fold reads the log's whole
life: a class move appended while the payload was being built makes it answer more
restrictively than it did at the grant, so reusing the grant's answer would return the
words of a channel turn the target took during the read. The re-fold closes that
exactly rather than narrowing it, and the exactness comes from where the class is
RECORDED rather than from when it is sampled: every surface that commits a change to a
session's class records the change as it commits, so a class governing any content in
the log is stated in that log ahead of the content. Because the fold is held at the most
restrictive value
the log ever recorded, a re-fold can only withdraw a grant, never widen one. It is also
incremental, so on a log that did not move it consumes nothing. The creator edge is NOT
folded again: it comes from an entry that cannot be rewritten and an append-only store
can only gain descendants, never take back a unit the caller was already placed above.
Each arm
also leaves a mark saying which target test its grant ran, because the owner arm runs
none by design and re-testing an owner's target here would refuse what the gate
deliberately allowed;
a request reaching the re-check with no mark is refused rather than answered. A read of
the caller's own unit is exempt, on the same ground the
first arm is. The late denial is audited under the operation name the grant was, so the
audit log carries the true sequence.
The caller's class is re-asked too, and what it buys is stated exactly. The route
does not hand another session's content to a caller that is publishing AT THE HANDOFF.
That is the act the route performs and therefore controls, and it is the scenario a
reviewer named: a prompt to paste a dispatched child's log, a mirror bound while the
payload read is suspended, and a reply that publishes the private log to the channel. A
listing is re-checked the same way, by recomputing its scope and comparing, because its
rows were gathered under the scope the caller held at the gate.
That claim needs the caller read TWICE on one arm, which is what makes it exact rather
than nearly true. The lineage arm suspends again to refold the target, so a verdict taken
before that suspension is stale by the time it is used -- a mirror acquired while the fold
ran would be missed, leaving this route's own window open while it closed the larger one.
Both readings refusing is enough, so the second can only add a refusal, never withdraw
one. A review lane found this by reading the sample point against the await; the window is
now covered and pinned by a test that reddens when the second reading is removed.
One residual is KNOWN and named rather than papered over: a caller entitled at the
handoff that acquires a channel link afterwards holds the payload in context and can
publish it on a later turn. Nothing at turn emission inspects a turn for another
session's log content -- the gateway has no provenance tracking on delivered content -- so
no refusal in this route can claw that back. The two cases differ in kind rather than in
timing: the first is the gateway delivering content INTO a published session, the second
is a session becoming published while holding content it was entitled to receive. This
route is the last point of control over the first and has none over the second. Closing
the second needs provenance on delivered content and is not in this change's scope.
This closes the GPT findings on both previous
heads.
Three more refusals, each closing a way a log could be DATED wrongly. The class
fold is only usable as an authorization input if it can say where the log's history
begins, and three things could make it claim a beginning it did not have. A log carries
an opening entry per re-attachment, so an old log written before the class was recorded
gains a later opener that does state one; only the log's FIRST opener now sets the
beginning, because a later one would date a stretch of the log it was not present for.
Retention deletes whole segments off the front, so a log whose oldest surviving segment
starts past seq 1 is refused -- within that file the surviving opener genuinely is the
first one the fold sees, so only the store can tell, and it can for the price of a
directory listing because the first seq is in each segment's name. That listing runs OFF
the event loop and only on the refusal path -- after the scope arm has had its chance to
refuse, and only for a log whose fold came back empty -- because it chooses between two
refusal texts and nothing else, so blocking the gateway for it would spend every
session's latency on wording. A review lane caught it on the loop; a test now reads the
source and fails if it returns there. And a fold cut short at the other end is refused,
as before.
Nothing about integrity changes: there is no write tool, the tool set is still
ratcheted, the agent's file tools still cannot reach the
crew-log/root, and everyread AND every refusal is still SEL-audited under the same action names the browser
routes use.
One identity resolver, so a bare session key cannot crash a read. A key with no
colon is a bare SLOT name, not a key missing its slot -- the crew log's own resolver
states that premise and acts on it, retrying such a key in
dashboard:form, becauseevery namespace spelling carries a colon. The live-slot lookup instead took the second
part of a colon split, which raises
IndexErroron exactly that key, and this PR'scaller test is what newly reaches it: an ordinary read from a bare-key caller answered
500. Both readers now share one resolver, so the class test and the dispatch fence
cannot disagree about who a caller is. Resolving a bare key is not a widening: every
class test and the lineage walk still run on that slot, and the own-unit resolution
already handled this key shape, so refusing it was two halves disagreeing rather than
a boundary.
The dispatch walk's depth cap is DELETED, and the two passages naming a number are
count-free. The walk already terminated on every input without it: each pass either
returns or adds a slot to a
seenset drawn from a finite node map, so it cannot runlonger than that map. The cap therefore bought no termination safety, and it cost
correctness -- a chain longer than the cap answered "no creator above this" and refused a
grant the tree actually supports. A 40-generation chain now resolves, which is pinned by
a test that reddens if any fixed cap comes back.
Rebased onto current main for the savepoint ratchet. #12030 landed on-disk fold
savepoints with a ratchet that pins each fold's stored state, and a newly registered
fold trips it. Its digest is recorded at the current
CHECKPOINT_VERSIONrather than bumping:the version retires savepoints that would resume onto changed meaning, a new fold has
none on any disk (a file is matched to a fold by name), and bumping would retire every
VALID savepoint of the other five to retire nothing. The five existing digests are
byte-identical, which is what says no existing fold's meaning moved.
The grant leaves a MARK, never data. Once the re-check folds the class itself, the
value the gate stored is only ever read to learn which arm granted -- so it is two
sentinels,
ownerandlineage, rather than a class object under a key named forone. That removes the
isinstancebranch and a name that described what the valueused to carry. The spec paragraph and the constant's own docstring said the recorded
class is not asked again, which the re-fold falsified; both now state that the class IS
re-folded and that the creator edge is the one input not asked again, because it comes
from an entry that cannot be rewritten.
A hole in the log's MIDDLE refuses too, which is the third end of the same
question. The store skips an unreadable interior line on purpose -- one damaged
record must not make a whole file unreadable -- and checks seq continuity only at
segment boundaries. That is right for a fold accumulating totals, where a lost entry
costs a count, and wrong for one whose answer is an authorization ceiling: the skipped
line can be the sole record of a restriction, and the fold still reaches the file's
tail, so nothing stopped early and the short-fold check cannot see it. The class fold
therefore keeps its own seq contiguity and reports a record it could not read as a hole
rather than as silence, and the reader refuses on it. Every other fold keeps the
store's tolerance.
The one hole none of the three checks covers is a damaged LAST line: it lowers the tail
seq too, so the fold and that seq agree, and nothing distinguishes it from an append in
flight -- which is frequent, so refusing on it would refuse ordinary reads. It carries
no exposure, and by construction rather than by luck: a class is recorded at the START
of the turn that runs under it, so a move with nothing after it is a move no turn has
run under, and no content in that log is governed by what was lost.
The class is recorded where it CHANGES, not where it is next sampled. Observing it
at each turn's start cannot see a channel link that commits and is removed inside one
turn, and content authored through that link sits in the log with nothing saying it was
published. So every surface that commits a change records it: the session map announces a
committed mirror or Slack binding through a new bind listener, mirroring the unbind
listener it already had, and the dashboard's
note_crew_log_classis the one recorderboth that listener and every direct link assignment reach. It reuses the single existing
computation of
(memory, app, channel)rather than adding another spelling of theapp/memory/link/mirror check.
The listener runs SYNCHRONOUSLY inside the map's own lock, unlike the unbind notice which
hops to the gateway loop, and that difference is the guarantee: routing an inbound
message reads that map, so no message can be attributed to the session before the record
has been taken. Best-effort at the call site is safe because the far end is fail-closed --
the append is handed to the crew log's writer without waiting, a write the writer
permanently loses is itself recorded as a dropped write, and the class fold reads that as
a hole. A lost record costs a refusal, never a silent grant.
The one case that argument does not cover is a slot with NO OPEN LOG, because nothing is
handed to the writer at all and so nothing records the loss. It is reachable: an idle
session can be bound to a channel, route a turn, and be unbound again before its first
turn opens a log, and a class read from the live slot at that point states
never-published about a log that holds channel-authored words. A restriction is therefore
MARKED on the slot rather than dropped, and the shared derivation folds the mark in when
the log is finally opened. The mark is never cleared, which matches the fold: each member
is held at the most restrictive value the log ever recorded, so the mark can only add a
restriction.
test/test_crew_log_class_recorder.pykeeps that true as the code grows, and its sitelists are derived from the source rather than written out. Every link assignment must have
the recorder as a BLOCK SIBLING -- beside, not merely somewhere in the same function, so
neither a guard nor a different branch can stand in for it. No exemption may name a site
that does not assign a link, so the list cannot rot into a hand-written one. Every
function in the session map that persists a binding must announce it, which pins the
mirror half at the store instead of its twenty-odd callers. And the bind wiring must
appear wherever the unbind wiring does.
Tests
test/test_crew_log_routes.pycarries the fence as 30 cases: conductor reads childand grandchild; a conductor keeps its children across a gateway restart (same slot, new
session id, the child's entry still citing the old unit); sibling refused; own unit;
channel-linked caller refused and still reading its own unit; unattended in both key
spellings; app-owned; incognito; unplaceable caller; a mirrored owner tab refused past
its own unit; a live channel-linked target; a closed target read by its dispatcher; a
closed target's class read from its own log for each of channel, app and incognito; a
target whose log records no class refused; a class ACQUIRED after the log opened
refusing a closed target, and still refusing after the link is dropped again; a history
with no beginning refused; a class that never moved still read, which is the admitting
case the three refusals would otherwise be satisfied without; a fold that stopped short
of the file refused; an out-of-tree target refused without naming its class; no key refused; wrong component refused; the listing carrying the
same scope as a filter; and audit on both the granted and the denied path.
test_crew_log_emit.pypins the recorded class, the empty-declaration case, and that acaller naming no memory mode records none.
test_session_control.pypins the seam thatsupplies those facts, including the cron-link exemption and the fail-closed mirror
probe.
The
classfold carries six cases of its own intest_crew_log_projection.py: a classthat never moved; the most restrictive value ever held, member by member, since the
three latch by different rules; a history of moves with no opener; an opener with no
class object; a class object with no memory mode refused at append, plus the reader's
own defence against the same shape planted past append validation; and a resume that
cannot widen a class the log already moved away from. The registry's existing
parametrized suites cover the new fold for the shared properties, since they derive
their name list from
PROJECTION_NAMESrather than hardcoding five names.The post-read re-assertion carries eight cases: a caller that acquires a channel link
during the page read is refused, and the same race on the projection route and on the
listing, where the scope is re-derived and compared because a listing's rows were
selected under the scope held at the gate; a target whose class moves during the
page read is refused, while one that holds still is still answered, which is the pair
that shows the re-fold is what decides rather than the live slot; a target that moves
while the caller reads its OWN unit is still answered, which proves the exemption
returns before any target test; and a guard over this module's own source asserting that
every handler which suspends after authorizing passes through the re-check before
answering. That guard exists because the defect a new route would carry is an ABSENT
line, which no assertion about the current routes can see; it carries a count control so
an empty match cannot pass silently. The mark is covered too: the owner arm keeps reading
a target the lineage arm would refuse, and a request carrying no mark is refused rather
than answered.
Twenty mutations were applied one at a time, restoring from a file copy, with the
baseline verified green first and a positive pass count required before any run counted:
keying the fence on the unit instead of the slot (15 failed),
making the walk non-transitive (2), admitting an absent class record (1), ignoring the
recorded channel fact (1), exempting the owner arm from the caller-class test (1),
running the fold inline on the event loop (1), recording no class at all (3),
recording a class with no memory mode (1), dropping the post-read re-check from each of
the page, projection and listing routes (2 each, the race test plus the source guard),
dropping the own-unit exemption from the re-check so it refuses unconditionally (5),
and never comparing the listing's re-derived scope (1). Seven more for the fold and the
single target test: folding the latest class rather than the most restrictive ever held
(2), reporting every history as complete (2), admitting a fold that stopped short of the
file (1), dropping the record half from the target test so the live slot answers alone
(8), ignoring an incomplete history (1), running the target test on the owner arm too
(1), and falling through to the live test with no mark (1). All twenty killed, with
differing failure counts.
One mutation SURVIVED on the way here and is worth recording, because it changed the
design: replacing the no-slot branch's record re-read with a bare admit changed nothing,
since the gate ran the record test on the line above. The branch was defence in depth
dressed as the fix. Folding the two target tests into one removed the second decision
point rather than testing it, and the replacement mutation -- dropping the record half
from the single test -- kills 8 tests.
1137 tests pass across
test_crew_log_projection.py,test_crew_log_routes.py,test_crew_log_emit.py,test_crew_log_checkpoint.py,test_crew_log_types.py,test_session_control.py,test_mcp_crew_log.pyandtest_docs_crew_log_reference.py, run serially. Fourmutations cover this round, baseline verified green first and all killed: letting a
later opener date the log, dropping the front-trim refusal, reusing the grant's
stale fold instead of re-folding, and splitting a colonless key on its absent colon.
Each has an admitting counterpart beside it, because the refusals are otherwise
satisfied by a check that refuses every closed target -- the thing this door exists
not to do.
One mutation SURVIVED and the test it aimed at was deleted rather than strengthened: a
resolver falling back to the whole key when the slot half is empty is indistinguishable
from answering
"", because at every route the class test refuses such a key first. Atest on it would assert an incidental artifact, so the reason is recorded where the
code is instead. Gates green on the pushed tree: flake8,
black baseline, isort, comment-history, feature-map, sync-IO-in-async, loop-bound
locks, brand and docs-lint.
The
classfold's registration made every documented fold COUNT stale, so the countand the fold list are corrected wherever they are stated: the feature map's three
crew-log rows, the agent reference page's tool table and its
unknown_projectionrow,the projection module's spec, and the
route, publisher and bundle docstrings. They all say FIVE, because five is what the
panel draws and five is what the growth push carries.
The
classfold is registered but NOT advertised, and that is the point. It is not apanel value: nothing on a client draws it, so naming it in
PROJECTION_NAMESwould makeevery log growth fold and push a
session_projectionframe to every owner socket for noreader, and would advertise a projection with no consumer. It stays in the registry under
INTERNAL_PROJECTION_NAMES, because its one caller asks for it by name(
fold_session(("class",))) and registration is what gives it the shared machinery --the same checkpoint, the same incremental reuse, the same recreated-log guard. The
savepoint ratchet folds it too, so its stored shape is pinned exactly like the five. A
test asserts both halves, so neither the registration nor the withdrawal can drift
silently; re-adding the name to either advertised set reddens two tests.
Other notes
Refs #11929, which added the session tree and recorded the lineage this fence reads.
Its own module text states that
parent.sidis an audit citation for a reader of thelogs themselves rather than a tree key; this fence is that reader and keys on the slot
for the same reason the tree does, so the two share one fold. That PR's spec section
also opened by calling the tree the one reader across logs, which stopped being true
when these two landed together; it now names both and says why neither is expressible
as the other.
The
classfold is registered but NOT advertised: it is absent from thecrew_log_projectiontool's enum, from its description, and from the growth push, andpresent in
INTERNAL_PROJECTION_NAMESso the registry still folds it. Advertising itwould name a projection no client draws and push a frame per log growth to every owner
socket for no reader; half-advertising it -- in the description but not the enum -- would
only generate failed calls, so every surface states the same status.
mypy reports two errors, both in
src/kiro_crew/transcribe.py, which this branch doesnot touch -- they are boto3 stub drift in the local environment, pulled in transitively
by the type check. Zero errors in any file this diff changes.
Issues #11963 and #12025 were closed as not planned in favour of this work.
No linked issue: this PR implements a maintainer decision rather than closing a filed
defect, and the issue numbers above are cited for context only.