acp pane: calls that start too early, failure reasons, thoughts, the prompt line, and colours (items 1, 5-8 of the user's brief) #85
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/rexcity!85
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/rexcity-7sfmr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rebased onto main
d252358(#94, the settings line); headc137d59. One conflict, README.md, in the paragraph on the log's entries: kept main's #94 wording and this change's tool-call paragraph. Nothing dropped: main carries no part of this change. go build, go vet, gofmt, go test ./... and the v2 changelog check pass on the result.Items 1, 5, 6, 7 and 8 of the user's brief of 2026-11-12 (items 2–4, terminal handling, are the other bead's:
checkSize, the redraw, stdin and the follower's start are untouched).What changed
render.go: a call is started only by its own status past pending, by text or another entry, by the turn's end, or by the settle timer. A usage update or a sibling's end no longer starts it, and a call's end starts no sibling. A call said to bein_progressis timed from that message.pane.gocallEnd: a registered call with no input is described from the end line's label, which also repairs logs already written.exit 2 — <next non-empty line>(failReason).○is kept in colour mode.[rig] agent • timeheader.NO_COLORstill goes throughcfg.Color. README has the table.Choices the bead left open, or that its table leaves open: on a
✓line the table says "green mark, dim rest" and also "tool name cyan, input default"; I took the more specific rows (name cyan, input default) and made the count and the duration dim. The prompt line is bold blue in full (▶ gcand its text); its(+N lines)stays dim. Only? permission…entries are bold magenta, not every?entry.Before / after (pane, plain, 100 columns)
Log:
~/.rexcity/39545500/roles__worker-gcg-session-81c764ce….log(read only), first 45 lines,rexcity acp follow --pid 999999 --width 100 --color never, main's binary vs this branch's.Item 1 (labels and input, repaired from a log written before the fix) and item 7 (prompt line):
Item 5 applies to logs written from now on (the old log has only
Exit code 1, which the pane shows as it was):TestAShellCallThatExitedSaysTheStatusAndTheLineAfterIt— log line✗ Bash: false #1 (<1s) — exit 2 — grep: x: No such file, where it was— Exit code 2.Item 6:
17:42:05 Weighing it.becomes17:42:05 ○ Weighing it.(dim italics, in colour mode).Item 8,
testdata/pane/demo_bytes.golden(every byte the pane wrote,␛for ESC):Verification
go vetandgo test ./cmd/... ./internal/... ./packs/...pass.validate@v2runs it) saysvalid=true.For the reviewer
overlapstream (a real claudeacp recording with three overlapping calls and noin_progress) changes in both goldens: the long call is no longer started by its siblings' messages, so in the replay, which has no settle timer, it starts at its end. In the city the box's timer starts it after 2 s of quiet. A call that runs side by side with others now therefore shows its▷start in the log a little later than before.in_progress(rexcityalready stamps from it), and Rex must set TIOCSWINSZ (item 2).Bead: rexcity-7sfmr
Round 1 (review of
78d22c5)in_progressmessage), and says the log's times are not always in order.startCallscomment: names the writes it precedes and no longer claims the log keeps time order.Round 2 (review of
1c02312)Rework round 2 (review 285 of
1c02312): a rebase only. The head did not merge onto main0104764(#93): README.md conflicted. Resolved by keeping #93's new bullet ("Nothing else the log renders carries a control character either…"), then this change's version of the pane paragraph (#93 left that paragraph as it was at2ff3907, so nothing of either side is lost). No Go file conflicted. Nothing of this change is already on main, so nothing was dropped.Checked on the rebased head: go vet (linux and GOOS=darwin), gofmt, go test ./..., and the v2 changelog check (valid=true). Not run: a resized Rex pane.
e41296dc1e78d22c5da5Review of
78d22c5da5for rexcity-7sfmr. Checks of the head: success.Verdict
fail
Findings
feedno longer starts calls on a message that has no entry (render.go:184-192),endEntrywrites another call's end without starting its siblings (render.go:566-569), andprogressToolrestampst.firstonin_progress(render.go:494-498). To fix it, rewrite that sentence of line 218 to match line 217. Its own status past pending, agent text or another entry, the turn's end, or 2 s of quiet start a call; a message with no entry and a sibling's end do not. The start is stamped with the time the call was first seen, or with itsin_progressmessage when the adapter sends one. Also say what the overlap golden now shows: a call that runs beside others can have its start written after their ends, stamped with its earlier time, so the log's times are not always in order.startCallscomment still says "It runs before anything else is written, so that the log keeps the order things happened in".endEntryand a call's own status now write without it, and the starts intestdata/overlap.goldenare no longer in time order (17:42:06 ✓ #2, then 17:42:05 ▷ #3; 17:42:07 ✓ #3, then 17:42:05 ▷ #1). Say which writes it precedes (text,block, the turn's end, the timer), and drop the claim about order.validate@v2. I ran v2.1.0 and it passes too (below), so this is only the description.Verified
checkSize, the redraw, stdin and the follower's start are untouched.78d22c5sits directly on main2ff3907, so the merge is a fast-forward with no conflict, and the forge reports it mergeable.startCallstarts one call only,unstartedis decremented there, and every call is started before it is deleted.endToolsstill starts every call at the turn's end. The settle timer (box.go:427) still callsstartCalls, andfeednow arms it after any message while calls wait. pane.gocallEndre-describes a registered call that has no input from its end label.TestACallStartedBeforeItsInputWasSentIsDescribedByItsEndLine,TestAnotherCallsEndStartsNoCallButItsOwnandTestACallInProgressIsTimedFromThatMessagecover it.failReasonturnsExit code Nplus the next non-empty line intoexit N — <line>, and leaves a line that only begins like one as it is. Tested.○is kept in colour mode (wrapEmit); the demo goldens are updated.promptHeaderReskips gc's header line, and a prompt that is only the header still shows it. Tested.sty/dimreturn plain text without colour, soNO_COLORstill applies throughcfg.Color. Widths are computed before styling.parseRanhas unit tests..changelog/acp-pane-colour-and-calls.mdholds only level-3 type headings.go vet ./...passes,GOOS=darwin GOARCH=arm64 go vet ./...passes,gofmt -lprints nothing,go test ./...passes in every package, andgo test -race -count=1 ./internal/acpbox/...passes. The changelog check, built from mikluko/changelog v2.1.0 in the module cache and run with-warn missing-fragment, printsvalid=true.Review of
1c023120cbfor rexcity-7sfmr. Checks of the head: success.Verdict
fail
Findings
0104764(#93, "the acp view passes control characters through") after this head was cut on2ff3907. #93 adds a bullet ("- Nothing else the log renders carries a control character either: …") right before the "- The pane reads the log as the agent's narrative" paragraph that this change rewrites, so git stops on a content conflict in README.md, and the forge reports the PRnot_mergeable. CI'schangelogjob merges the base first and would fail the same way. To fix it, rebase onto main0104764and keep both: main's new control-character bullet, then this change's version of the pane paragraph. #93 left that paragraph as it was at2ff3907, so nothing of either side is lost. No Go file conflicts: render.go, pane.go and their tests merge automatically, and everything below passes on the merge with that resolution.Verified
checkSize, the redraw, stdin and the follower's start are untouched.78d22c5): all three findings are addressed. README's start-entry paragraph now gives the new start rule and thein_progressstamp, and says the log's times are not always in order. ThestartCallscomment names the writes it precedes and drops the order claim. The description names the v2 changelog check.0104764: README.md conflicts as above, and everything else merges. In the merge,startCallandendEntrywrite directly instead of throughblock. They still pass the label throughclipand the failure reason throughclipTo, which #93 made the control-character guard, so control characters in tool names, titles and failure reasons still show as pictures. #93'sapartandtextIndentfor agent text are unaffected.unstartedis incremented once per call intool()and decremented once instartCall. Every path that deletes a call (progressTool's final status,endTools) starts it first.TestAnotherCallsEndStartsNoCallButItsOwn) no longer start a call.in_progressrestampst.firstbefore the start (TestACallInProgressIsTimedFromThatMessage). The box's settle timer is still armed infeedwhile calls wait.pane.gocallEnddescribes an input-less call from its end label.failReason, ○ kept in colour mode,promptHeaderRe, and the colours by state withsty/dimreturning plain text when colour is off, soNO_COLORholds. Each has tests, and the goldens match.0104764+ head, README resolved as described) in a clone with the city's variables removed (0 proven):go vet ./...andGOOS=darwin GOARCH=arm64 go vet ./...pass,gofmt -lprints nothing,go test ./...passes in every package, andgo test -race -count=1 ./internal/acpbox/...passes. The changelog check is mikluko/changelog v2.1.0, built from the module cache and run asvalidate@v2runs it (-base=main -warn=missing-fragment). It printsvalid=true, and the fragment.changelog/acp-pane-colour-and-calls.mdholds only level-3 type headings.1c023120cb6067e84028Review of
6067e84028for rexcity-7sfmr. Checks of the head: success.Verdict
pass
Findings
None.
Verified
checkSize, the redraw, stdin and the follower's start alone.1c02312): its one finding is addressed. The head now sits on main0104764(#93), and merging it onto main is a fast-forward with no conflict. The forge reports the PRmergeable. README.md keeps #93's bullet ("Nothing else the log renders carries a control character either…"), followed by this change's version of the pane paragraph. The round 1 fixes are still in place: the start-entry paragraph gives the new start rule, thein_progressstamp and the out-of-order times; thestartCallscomment names the writes it precedes; and the description names the v2 check.feedno longer starts calls on a message that has no entry. It only re-arms the settle timer, and box.go:443 still callsstartCallsfrom that timer.progressToolstarts only its own call. Onin_progressit restampst.firstif the call has not started yet.startCallandendEntrywrite asblockdoes (endText, then the line) but withoutstartCalls. The label still goes throughclipand the reason throughclipTo, so #93's guard against control characters holds.unstartedgoes up once per call intool()and down once instartCall. Each path that drops a call starts it first: the final status inprogressTool, andendTools, throughstartCalls.callEnddescribes a call that has no input from its end label. A call that showed its input keeps it.failReasonturnsExit code Nplus the next non-empty line intoexit N — <line>. With no further line it givesexit N. A line that only begins likeExit codestays as it is.○is kept, styled dim italic. Without colour it is plain.promptHeaderReskips gc's header line. A prompt that is only the header still shows it.styanddimreturn plain text when colour is off, soNO_COLORstill applies.clipskips style sequences when it measures a running line and closes the style when it cuts.parseRancovers<1s,Ns,MmSSsandHhMMm, and gives 0 for anything else..changelog/acp-pane-colour-and-calls.mdholds only level-3 type headings (Changed, Fixed). Nothing in it is breaking under REVIEW.md's list.go vet ./...passes, and so doesGOOS=darwin GOARCH=arm64 go vet ./....gofmt -lprints nothing.go test -count=1 ./...passes in every package.go test -race -count=1 ./internal/acpbox/...passes.validate@v2runs it (-base=main -warn=missing-fragment). It printsvalid=truewith no warning.6067e84028c137d59823New commits pushed, approval review dismissed automatically according to repository settings
Review of
c137d59823for rexcity-7sfmr. Checks of the head: success.Verdict
pass
Findings
startCallandendEntryininternal/acpbox/render.gowrite withr.writeand not throughblock, so neither runsstartCalls. Saying "another call's start or end" in the exclusion would make the README match the code. This does not block.Verified
in_progressstamp), its rework notes, the PR description, and the target's REVIEW.md and README.md. There is no AGENTS.md or CLAUDE.md on main.git range-diffagainst6067e84, the head approved in review 294, shows that the rebase ontod252358(#94) changed only README context in the paragraph on the log's entries. The Go code and the tests are the same as at6067e84.d252358): a fast-forward, with no conflict. The forge saysmergeable.startCall), and a call's end no longer starts the others.unstartedstays consistent: it is incremented once intool()and decremented once per started call instartCall, andendToolsstarts every call before it clears the map. Anin_progressstatus re-stampst.firstonly before the start is written. Item 1, pane.go:callEnddescribes a call that has no input from its end label, and a call that has input keeps it. Both are covered by tests.failReasongivesexit N — <next line>, givesexit Nalone when nothing follows, and keeps a line that only looks like an exit line as it is.promptHeaderRe, shows the header when it is the prompt's only line, and leaves a line that is not a header alone.Coloroff (NO_COLORand--color never) the output is plain. The worker's choices on what the table left open are stated in the PR..changelog/acp-pane-colour-and-calls.mdholds only### Changedand### Fixed, and CHANGELOG.md is untouched. The README section and its table are updated.go vet ./...,GOOS=darwin GOARCH=arm64 go vet ./...,gofmt -l(empty),go test ./...(all ok) andgo test -race -count=1 ./internal/acpbox/...(ok) all pass. The changelog check passes too: v2.1.0 was built from the module cache's source and run with-warn=missing-fragmentas the validate action runs it, and it reportsvalid=true.