Repository navigation
feat(chat): read the session crew log in the right panel - #12024
Conversation
cac5bc8 to
f2b9070
Compare
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: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The refresh machinery re-implements the spec'd Not justified as shipped
What this change shipsInventory (9 items) — 8 justifiedIntent: let a person see, in the dashboard, what a session did and cost from its crew log — an ADDITION (the slot-key and timestamp repairs are subordinate fixes). Note: the description declares "the ceiling moves to 904 KB", but no hunk touches
[FIRST-PRINCIPLES-REVIEWED] cc89d4c |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify [DESIGN-REVIEWED] cc89d4c |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS "Crew log" sits beside "Logs" in the + menu with no distinguishing text; the blind reader had "no idea" which log either opens. Watch
Suggestions
[UX-REVIEWED] cc89d4c |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsI've verified the backend surfaces the new code depends on ( No findings. [OPUS-REVIEWED] cc89d4c Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
f2b9070 to
b226809
Compare
|
Round 2 on GPT 5.6 (blocking)F1 -- hand-written error render, F2 -- the page read answered with the resolved ACP id. Correct and fixed. The UX Review (BLOCK)Missing entry point -- no shot of the tab or the + menu row. Fixed, and the "the claimed light-theme shot is dark". This one I have to push back on, with a "open" means two things on one screen. Fixed: the tools summary now reads Footer staleness wording. Fixed: Approvals pending with no path to act. Fixed: the pending list now carries one Raw fold vocabulary. Fixed where a mapping is honest. A stop reason the store Empty state hinted at a switch without naming it. Fixed: it names Credits rendered three times. Fixed by subtraction: the per-model table renders First Principles (CONCERNS)Item 8 -- Design Review (CONCERNS)Point-in-time resolution, so a recycled session reads a fresh unit. Real, and The spec still described Verification on this headBackend 44 route tests, frontend 12 panel tests, 95 further panel-suite tests, |
b226809 to
cf3232f
Compare
cf3232f to
5f33584
Compare
|
Round 10 on On the previous head four of five lanes are clear -- GPT no blocking findings, First UX -- two names for one operation. Fixed. The footer said a "context recycle" Two of that comment's other items were measured a head early and are already fixed on The menu-label item stands unchanged, for the reason given two rounds ago: the Gates on this head: 15 panel tests, typecheck, the i18n chain with zero |
4fb5812 to
07297f3
Compare
|
Round 11 on First Principles (CONCERNS) -- the rationale named a consumer that does not existCorrect, and I checked it rather than taking the finding's word for it: Deleted from all three sites, and replaced with the grounding that is real and that UX (CONCERNS)The count line named an actor the reader cannot resolve. Taken. Footer 1,842 against the timeline's 1,838. Taken: the column heading is Sibling-label collision in the The harness now pins the copy it photographsAll three changed strings are asserted before any frame is taken. That mattered Design Review (PASS) -- watch itemThe suggestion to exercise the turn-end re-read against a real recorded turn is a Gates on this head47 backend route tests (exit 0), 15 panel tests, typecheck, ESLint, flake8, black, |
07297f3 to
7638c1c
Compare
|
Round 12 on Four lanes were clear on the previous head (GPT no blocking findings, First GPT 5.6 (both non-blocking, both real)Rows hidden with nothing said, Fixed by reporting the SUM, because the reader's question is how many rows are I did not take the finding's suggested fix of removing the four slices: a 200-row Two mutations confirm the test discriminates rather than passing on shape: dropping The empty state asserted one cause. Correct, and my own docstring contradicted UX (CONCERNS)The empty state gave no where. Taken, in the same rewrite: the variable goes "refused" is undefined at both sites. Taken, but not by the suggested wording. Counters read as unrelated. Taken, with the mechanism the same suggestion names: Sibling-label collision in the Design Review (PASS) -- watch item"Verify session keys and ACP unit ids can never collide." I cannot verify that, and First Principles (PASS) -- watch item"The 904 KB Gates on this head48 backend route tests (exit 0, one new), 16 panel tests (one new, two mutations |
7638c1c to
7668568
Compare
|
Round 13 on Previous head: GPT 5.6 no findings at all, Opus 4.8 no findings, First Principles UX (CONCERNS) -- the Turns hint was my own regressionRight, and it was worse than a wording nit. The hint hangs off the whole Turns A test pins the ORDER, not just the presence of the words -- the refusal-first The empty state was a dead end. Taken. It now ends on the one thing a reader can Not made into a hyperlink: the panel has no docs-link affordance today and adding one
First Principles (PASS) -- watch item"The description says 77 keys / 861.4 KB, the budget comment says 90 keys / 862.4 KB." Design Review (PASS) -- watch item, second round"Confirm ACP ids and slot keys are minted in disjoint formats." I still cannot confirm Opus 4.8 -- no findingsIts one candidate, compaction Gates on this head48 backend route tests (exit 0), 17 panel tests (one new, its mutation killed), |
7668568 to
9b6782f
Compare
|
Round 14 on GPT 5.6 (blocking, upheld) -- the doc was right and the code was wrongThe finding says The finding offered two fixes -- reword the doc, or trigger on turn end. I took the Both edges are now watched, and both are load-bearing rather than belt-and-braces: A test reproduces the reported scenario: turn streaming, subagent pending, turn goes The feature-map row and the module docstring both describe the two edges, so the claim Gates on this head48 backend route tests (exit 0), 18 panel tests (one new, its mutation killed), |
|
Round 15 on Three security-class findings, all fenced, so no adjudication could clear them and F3 -- unmeasured usage shown as zeroRight, and the fold already gave me the distinction: it counts REPORTERS separately F2 -- the refresh raced the writerAlso right. The emitter hands an append to a queue and returns, so a turn can end The batch read now waits on F1 -- idle expiry hides an existing logThe harm is real: a slot whose ACP session was torn down still has its record on disk I did NOT take the suggested fix of falling back to the persisted resumable SID, for So the fix is to stop making the false claim. Both fold reads now answer Surfaces and docs
Gates on this head51 backend route tests (exit 0, three new), 21 panel tests (three new), and a |
|
Round 16 on The conflict#11909 landed the unit-keyed One consequence worth stating: in round 11 First Principles correctly flagged my spec The four Frontend shards -- one cause, then three
A process note, because it is the reason these reached CI at all: both style tests The two Windows shardsBoth are single failures in files my diff does not touch, and both are Shard 6: Shard 8: One test I had to loosen, and whyMy route-registration test asserted the EXACT crew-log path set, which #11909's four Gates on this head109 backend route tests (exit 0 -- the file now holds #11909's too), 30 panel and |
|
Round 17 on GPT 5.6, First Principles, Design and Security Scope all cleared the previous head. Three reds, one causeComment History Gate flagged UX BLOCK -- three states I added and never photographedFair, and the gap was mine: this PR grew branches and the frames only showed one of
UX watch itemsThe scope note contradicted the panel's own data. Correct and worth the catch: the Three words for two concepts in Tools. Also right: the stat said "failed calls" The compactions tile got the hint treatment Turns and Entries already have, Still flagged rather than fixed: the One of my own new strings failed a style rule on the way: the Bengali compactions hint Gates on this head109 backend route tests (exit 0), 30 panel and side-panel tests, 42 i18n test files / |
|
Round 18 on First Principles, Design and Security Scope cleared the previous head and nothing Channel-linked sessions read an empty panelA slot born from a channel message runs its turns on the CHANNEL's session and carries The read now asks Reverting to the bare key fails the new test with A second defect the fix exposed, in my own testsWiring this up reddened four existing tests, and the reason was worth more than the Two changes, because there were two problems. The double now has a real DocsThe spec's Reads section and the feature-map row both state the slot-key-to-session Gates on this head111 backend route tests (exit 0, two new), 30 panel and side-panel tests, 42 i18n test |
|
Round 19 on The channel-linked fix cleared GPT's block: no blocking findings on the previous head, GPT (non-blocking) -- the new copy asserted one of two causesRight, and it is the error I fixed in The body now names both and makes the retired case conditional: "it may not have run a Design (CONCERNS) -- the spec promised a field one route did not sendAlso right. The spec and the description said both fold reads answer The finding offered either fix. I took the code one, because the race is real on that One of my own French values needed the U+202F fix again -- the new Gates on this head111 backend route tests (exit 0), 30 panel and side-panel tests, 42 i18n test files / |
|
Round 20 on Design PASS, UX down from BLOCK to CONCERNS, Security Scope clear, no red checks on Design and First Principles disagreed, and I undid last round's fixLast round Design flagged that the spec promised First Principles then counted consumers: the SPA reads only It is right, and it also names the better branch of Design's clause. Both fields and UX (CONCERNS)The two empty states were indistinguishable in practice -- which defeats the "turn refused" named no actor and the reader twice read it as the assistant "crew-log unit" was on the reader's "no idea" list -- the unaddressable body says Declined again, same reason as rounds 5, 9 and 17: the docs path in the empty state Two of my own new strings failed style rules on the way in: the French body needed the Design PASS -- watch itemVerifying the turn-end refetch against a live recording session stays out of reach Gates on this head111 backend route tests (exit 0), 30 panel and side-panel tests, 42 i18n test files / |
|
Round 21 on The single red on the previous head was Cause is the rebase that brought this file's unit-keyed-door tests together with mine. Both halves define a One pair survives, at the position that precedes both call sites, carrying the annotated Worth noting for anyone reading the previous run: the flake8 passes on the job's exact argv, plus black, isort, the comment-history gate with a base ref, and 111 tests in the affected file. No rendered string changed, so the attached frames and the recorded bundle figure still describe this head. |
|
Classification for the 23 red lanes on The flake8 failure this head was pushed to fix is fixed. On the previous head the Those mypy errors are in files this branch does not touch, and the modules they name are inconsistent on main itself:
The test shards fail at collection, before any test in them runs: The control is main's own run. The push run for One detail worth recording, because it explains why a local check did not catch this: CI type-checked 1647 source files on this head against 1643 locally, since the merge ref carries main commits newer than this branch's base. A pre-merge local run of the blocking argv is clean here and still cannot see these. No push until a main-side fix lands; then this branch rebases once. Its own gates are verified in the meantime -- flake8 clean on the job's exact argv, and the affected test file's 111 tests pass. |
The five session folds have had a backend since the projection routes landed, and no reader: a person wanting the status, cost, timeline, tool or approval view of a session had nothing to open. Add a Crew log view to the chat right panel. It reads the five projection routes for the session the tab belongs to and renders each fold as a section whose collapsed header carries its own figures, so the numbers are legible without opening anything. Status and Usage open by default; the three list folds stay collapsed. The footer states the crew-log seq the values were folded through, and the view re-reads on the end of a turn rather than on a timer, because a crew log only grows while the session works. Building the reader surfaced two defects in what it reads. A session's crew log is keyed by the ACP session id the turn path holds, and a chat surface holds the SLOT key and nothing else -- the ACP id is on no payload it reads. Every read a chat surface made therefore addressed a unit that does not exist and answered an empty fold for a session with entries. The two read routes now resolve a slot key through the crew-log resolver and use the id verbatim when the registry has no answer for it, which is what an ACP id gets; the response keeps naming the id the caller asked about. An entry stamps its time in epoch milliseconds and every fold passes that through, so the panel's first cut rendered every timestamp as a dash. The section renders what a fold reports and computes nothing: an absent number is a dash rather than a zero, and an open turn or an unmatched tool call is shown open rather than closed.
|
Scope note so the evidence is not overstated: I could not confirm whether main's own green run executed this test. The shard logs do not enumerate their assigned files and pytest runs quiet, so a name absent from a log is not proof the test did not run, and I will not read it as a pass or a failure either way. |
What is the problem?
A session's crew log -- the append-only record the gateway writes while a session
works -- already folds into five views on the backend:
status,usage,timeline,toolsandapprovals, each served byGET /api/sessions/{id}/crew-log/projection/{name}. Nothing in the dashboardread them. The record was written and folded for nobody.
Writing the reader exposed two defects in the path it reads.
A session's crew log unit is keyed by the ACP session id the turn path holds.
A chat surface holds the slot key and nothing else: the ACP id is on no
payload the dashboard reads. So a read from a chat surface addressed a unit that
does not exist, and the route answered an empty fold for a session that had
entries -- a panel that is permanently blank rather than visibly wrong.
An entry stamps its
timein epoch milliseconds, and every fold passes thatvalue straight through. A reader that only parses date strings prints a dash
where the record handed it a time.
Why this issue matters to the user
Everything a person asks about a session after the fact -- is it still open, what
did this cost, what happened when, which tools ran, what is waiting on me -- is
in those five folds, and the only way to see any of it was to call an HTTP route
by hand. A session that spent credits, compacted its context three times and
left a tool call open looked exactly like one that did nothing.
How our fix solves it
Symptom: no surface shows a session's crew log.
Cause: the projection routes have no client.
Fix: a
Crew logview in the chat right panel, beside Logs and Context inthe diagnostics group and behind the same Developer Mode gate -- all three are
instrumentation of the agent's own execution rather than anything the session
produced. It reads the five folds for the session the tab belongs to, and each
fold is a section whose collapsed header carries its own figures, so the
numbers are readable without opening anything. Status and Usage open by default;
the three list folds stay collapsed because their headers already say how much
they hold. The footer states the record seq the values were folded through and
that the panel covers the record the session is writing NOW -- a reset, a model
switch or a context recycle starts a new one, and a smaller total after one would
otherwise read as lost spend.
It re-reads on the end of a turn, not on a timer: a crew log only grows while
the session is working, so a poll would re-read an unchanged file on every tick
of an idle session. A manual control covers a mid-turn read, and reopening the tab
re-reads too, since a turn that ran while the body was unmounted never reached
the turn-end refetch.
The panel is not only a chat surface. The Crew Members page docks this same
SidePanel, and this view is slot-fed rather than transcript-fed, so its row isoffered there too once a member's thread confirms the slot -- which is why both
feature-map rows name
/members.Two NEW pieces of API surface, declared here rather than left to the diff:
GET /api/sessions/{id}/crew-log/projectionsreturns all five folds from ONEresolution and ONE pass over the unit, and the client reads that instead of five
per-name routes. It exists because five independent reads each resolve the session
for themselves, so a session replaced while they are in flight can hand back a mix
of two units that the panel cannot detect; the per-name route stays, unchanged, for
every existing caller. It also costs less than what it replaced: one round trip per
refresh instead of five.
The batch read now answers two things the folds themselves cannot.
resolvedsayswhether a unit was addressable for the id sent, because an empty fold has two causes
and they need different words: a session that recorded nothing, versus one whose ACP
session was torn down, whose entries are still on disk under the retired id. Without
it the panel told that reader "nothing recorded for this session", which is false
about their own data.
writes_drainedsays whether the emitter owed anything whenthe fold was taken -- an append is queued and the entry point returns, so a turn can
end with entries unwritten and the refresh that end triggers would fold a file the
turn has not finished. The batch read waits on
emit.flushbriefly and reports which happened, and thefooter says "writes still pending" rather than claiming to be current.
Neither read falls back to the persisted session map to find a retired unit.
SessionMap.getrepairs or removes entries it judges stale, so a panel read wouldmutate session state -- the reason
crew_log/resolve.pydocuments for never touchingit -- and a retired unit belongs to a session this slot no longer is, so showing its
totals would imply a whole-life figure that needs the lineage pointer this work does
not add.
Symptom: a chat surface reads an empty fold for a session with entries.
Cause: the read is addressed by slot key; units are keyed by the ACP session
id, which the client cannot know.
Fix: both read routes resolve a session key to its unit through the crew-log
resolver -- the one module that answers that question -- and use the given id
verbatim when the registry has no answer, which is what an ACP id gets, so a
unit-id-addressed read is unchanged -- the
session_projectionframe carriesthe unit it folded as
session_id, so a consumer taking an id from a frame,or a request built by hand from a fold, still reads the unit it named. Both responses keep naming the id the
caller asked about, so a client can match an answer to its request and no
internal identity goes onto the wire.
crew-log-projection.mdsection 4 nowstates the addressing, the verbatim fallback and the point-in-time limit.
Bundle ceiling raised, with its measurement. The i18n catalog chunk (
t) cameout over its 861 KB ceiling: the panel's 96 keys per catalog across twelve shipped
languages plus the generated pseudolocale. The chunk gains no dependency and still
reports the same 12 modules, so this is the catalog growth that budget's own comment
calls expected; the ceiling moves to 904 KB, ~4.8% over this head's analyze build at
884,506 B (863.8 KB), which is the convention that entry documents. The figure beside
the entry is re-measured on every push that changes catalog copy, so the two agree.
check-chunk-cycles.mjsreports 697chunks, 2278 edges, no cycles.
Symptom: every timestamp renders as a dash.
Cause: the values are epoch milliseconds; the reader parsed only strings.
Fix: the reader accepts both.
The section renders what a fold reports and computes nothing: an absent number is
a dash rather than a zero, an open turn and an unmatched tool call are shown
open rather than closed, a windowed list says how many moments it is not showing,
a failed turn's error goes through the shared
ErrorNoticewith its agenthand-off, and a stop reason the store declares is shown in words while any other
value passes through verbatim. Colours come from theme variables only.
What tests we did
Backend,
test/test_crew_log_routes.py-- 44 pass, including four new cases: aread addressed by session key folds that session's unit (fold and page alike,
each echoing the caller's id), a read addressed by the ACP id still reads that
unit, an unresolvable key reads back an empty fold, and a request with no
dashboard state uses the id it was given.
Frontend,
website/src/test/CrewLogPanel.test.tsx-- 12 pass: the five sectionsand their collapsed summaries, the highest fold
seqreported as the version, alist fold opening newest-first, a dash for a number no fold reported, the
nothing-recorded state at
seq0, the re-read on the end of a turn and noton its start, an epoch-millisecond stamp rendered as a clock time, a failed
turn's error rendered through
ErrorNotice, the per-model table dropped when onemodel would repeat the tile, a known stop reason in words with an unknown one
passed through, a read failure surfaced instead of a blank panel, and the manual
re-read. The panel suites that enumerate view kinds pass alongside (95 further
tests), and the add-menu partition pin was extended with the new row.
Gates:
npm run typecheckand ESLint clean on the touched files;flake8,black,isortandmypyclean on the touched Python; feature-map anddocumentation checks pass; the full i18n chain green, including the diff-scoped
gates -- new English keys all pass the shape check, 0 values still reading as
English across the eleven translations, and
en-XA.jsonregenerated.Live, in an isolated pod on this branch's own build: the five routes answer 200
with the documented envelope, an unknown fold name answers 400
unknown_projection, and the panel -- addressing the route by session key --rendered a real store's folds, which is the resolution working end to end.
The frames below come from the committed harness
website/scripts/capture-crew-log-panel.mjs, which asserts its own content andits rendered palette (
data-theme,--bg) before it photographs anything, so amislabelled theme fails the run instead of shipping.
Any other suggestions on the work
The
session_projectionpush frame carries the unit id, while this view pollsby session key -- so a future push consumer needs the same mapping the routes now
do. This PR does not consume the push; it re-reads on the turn boundary instead.
Spanning a session's retired units needs the lineage pointer
(
session/opened.data.previous) and a fold that follows it. Neither exists yet,so the panel states what it covers rather than implying a whole-life total; the
spec records the same limit.
The pod cannot switch the crew log on by itself: the recorder is enabled by an
environment variable and a pod's unit pins a fixed set, so the live verification
above seeded a store through the store's own writer rather than through a turn.
Worth a follow-up if pods are meant to exercise flag-gated subsystems.
no linked issue: a feature, per the working agreement that features get no issue