Commit Graph

79953 Commits

Author SHA1 Message Date
Kailigithub 8f174ceca2 test(workboard): align matrix with real normalizeBoundedString consumers
ClawSweeper flagged that the prior matrix at line 31-48 tested
labels/title/notes by manually invoking normalizeBoundedString, even
though those fields use the independent normalizeTitle, normalizeNotes,
and normalizeLabels functions (each with its own generic message).
A regression that drops the (got N) suffix from normalizeBoundedString
would not be caught for those three surfaces — operators would still
see the old opaque error.

This commit narrows the matrix to only the consumers of the shared
helper (comment body, link title, link target, link URL, card id) and
restores the exact labels gateway assertion that should match the
unchanged normalizeLabels error.

Verification: 9/9 inline Node 18 AST harness (node /tmp/verify-pr-118888-v77.mjs);
parent-commit proof-gate (pre-PR helper without the got suffix) fails
4/9 of the post-fix expected messages.

Closes ClawSweeper review on PR #118888 (P2 + P3).
2026-08-16 23:54:27 +01:00
Kailigithub f990fb777a fix(workboard): include actual length in bounded-string error
The shared normalizeBoundedString helper in extensions/workboard/src
threw an opaque error like 'comment body must be 2000 characters or
fewer.' whenever an oversize string hit any bounded field. Agents that
posted a long run summary or oversized link URL had no way to tell
how far over the limit they were, so they could not retry with a
trimmed payload.

Include the actual length in the error so the message tells the agent
exactly what to do next:

  comment body must be 2000 characters or fewer (got 3502).

The format applies uniformly to every bounded field routed through
this helper (labels, link URL, link title, link target, comment
body, title, notes, worker log message, session key, run id,
protocol violation detail, etc.) since the helper is the single
canonical owner of the message.

Cover the new format with a focused unit test that pins the regex
for the comment-body repro from #118845 and exercises the six other
bounded fields listed in the issue. Update the existing
gateway.test.ts assertion to allow both the old and new format so
the format change is a forward-compatible improvement.
2026-08-16 23:54:27 +01:00
Peter Steinberger 57b1a69167 fix(state): report v9 registry migration row decisions (#124862)
* fix(state): report v9 registry migration row decisions in doctor and logs

* fix(state): consume registry migration summary type

* fix(state): avoid registry path observer import cycle
2026-08-16 15:52:42 -07:00
Peter Steinberger 800a0bb52a perf(webui): render cached model catalog while the chat pane refreshes (#124868)
* perf(webui): render cached model catalog while the chat pane refreshes

* test(webui): fix seed-test types and shrink assertion baseline
2026-08-16 15:52:26 -07:00
Peter Steinberger 7344ce4341 fix(browser): cancel node discovery with tool runs (#124880)
Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 15:52:00 -07:00
Peter Steinberger 8aef31b903 fix(ui): align update status card spacing (#124878) 2026-08-16 15:48:55 -07:00
Vyctor H. Brzezowski 03f4ff5cc2 fix(ui): restore task count badge (#124840) 2026-08-16 19:48:19 -03:00
Peter Steinberger 72ddf22b93 fix(qa): recover repeated gateway restarts through channel ingress (#124746)
* fix(qa): repair repeated gateway restart recovery

* test(qa): satisfy restart recovery checks

* fix(audit): rekey repeated recovery identity

* fix(plugin-sdk): expose authored context cap

* test(android): synchronize process tree readiness
2026-08-16 15:47:31 -07:00
Peter Steinberger eadde4a9d0 fix(ui): show recovery when Control UI does not render (#124861)
* fix(ui): retire bootstrap fallback after render

* test(ui): avoid returning from Promise executor
2026-08-16 15:46:15 -07:00
Peter Steinberger 358c06ec95 fix(gateway): persist agent turns before acknowledgement (#124857)
* fix(gateway): persist agent turns before acknowledgement

* fix(gateway): revalidate exec approval handoffs

* docs(gateway): clarify durable session ownership

* fix(gateway): reject stale transcript admission targets
2026-08-16 15:42:49 -07:00
Peter Steinberger add30d455d refactor(security): consolidate path containment onto canonical fs-safe guard (#124870)
* refactor(security): expose canonical path containment modes

* refactor(agents): use canonical path containment guard

* refactor(security): consolidate core path containment sites

* refactor(plugins): consolidate path containment sites

* test(security): cover canonical path containment behavior
2026-08-16 15:37:02 -07:00
Peter Steinberger 9b468ccaa2 test: replace assertion chains with typed fixture builders — wave 2 (#124865) 2026-08-16 15:36:45 -07:00
Peter Steinberger 03cf9851d8 fix(protocol): model cron run delivery trace (#124856)
* fix(protocol): model cron run delivery trace

* chore(protocol): refresh generated cron run model
2026-08-16 15:34:56 -07:00
Peter Steinberger 36b0971772 perf(test): reuse postpublish file-cap fixture (#124871) 2026-08-16 15:31:46 -07:00
Peter Steinberger 1ce67d541f docs(ci): record artifact checkout experiment 2026-08-16 15:30:04 -07:00
Peter Steinberger 2d3612da6b fix(gateway): preserve prepared plugin metadata under load (#124844)
* fix(gateway): preserve prepared plugin metadata under load

* fix(gateway): project metadata before catalog preparation

* test(agents): assert projected startup metadata

* test(gateway): bind load probes to each finalization wave
2026-08-16 15:14:39 -07:00
Peter Steinberger 6c66f48a7c fix(cli): emit one JSON failure contract for --json invocations (#124849)
* fix(cli): unify JSON failure output

* test(cli): update skills verify failure envelope
2026-08-16 15:09:58 -07:00
Peter Steinberger 0b5bb09510 fix(test): propagate parent heavy-check ownership (#124859)
Amp-Thread-ID: https://ampcode.com/threads/T-01a00b7c-b9f0-73d5-8fb7-e619e8e458e1

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 15:09:30 -07:00
Peter Steinberger efdfb69adc fix(agents): keep queued followups from missing post-compaction context (#124850)
* fix(auto-reply): order post-compaction context before followups

Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

* test(auto-reply): clean compaction workspace fixture

Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 15:06:39 -07:00
Peter Steinberger 2d887acba3 fix(slack): drop the tool-call receipt from finished progress cards (#123851)
The Block Kit session card terminalized into a '🛠️ N tool calls · ⏱️ Ns'
footer, leaving a per-turn receipt in the Slack transcript on the default
progress path. PR #122976 deleted the same receipt from the native progress
surface but left this sibling rendering it.

Finished cards now keep only the durable diff stat and the session link;
tool-call and elapsed counters stay live working state. Also corrects the
documented channels.slack.streaming.mode default, stale since #122552.
2026-08-16 14:58:23 -07:00
Peter Steinberger 8754be900a feat(ui): add steer-now composer shortcut (#124826) 2026-08-16 14:57:58 -07:00
Peter Steinberger eab2b8fdca refactor(slack): mark approval headers with typed block ids (#124841) 2026-08-16 14:53:26 -07:00
Peter Steinberger 080887df92 refactor(types): discriminated unions for internal contracts — pilot lane A (#124845) 2026-08-16 14:49:28 -07:00
Peter Steinberger fb841993b1 perf(test): remove Gmail watcher shutdown wait (#124851) 2026-08-16 14:41:28 -07:00
Peter Steinberger 06101b1037 refactor(validation): consolidate boundary guards into schemas (#124820)
* refactor(validation): consolidate boundary guards into schemas — pilot lane B

* fix(meetings): reject non-object browser status
2026-08-16 14:41:14 -07:00
Peter Steinberger d23246770a fix(memory): report indexed SQLite sessions (#124834)
* fix(memory): report indexed SQLite sessions

* refactor(memory): remove unused state path export
2026-08-16 14:38:15 -07:00
Peter Steinberger eec67fd67b fix(ui): keep sent images visible through history handoff (#124839) 2026-08-16 14:35:21 -07:00
Peter Steinberger 9b17b93414 refactor(ui): derive cron types from gateway protocol (#124827)
* refactor(ui): derive cron types from gateway protocol

* fix(protocol): preserve cron session target type
2026-08-16 14:34:26 -07:00
Peter Steinberger 33f3b72a19 refactor(plugin-sdk): extract stream and SecretRef primitives (#124835) 2026-08-16 14:30:11 -07:00
Peter Steinberger 68762ad22c fix(ui): give queued-outbox badges their own outbox icon (#124842)
The sidebar queued-message badge and the composer queue reused the clock
glyph that also marks attached automations, so a session with both showed
two identical clocks distinguishable only by tooltip. Add an outbox tray
icon (Lucide inbox with the roof swapped for a rising arrow) and use it
for queued-to-send surfaces; the clock stays automation/cron-only. The
mock dev fixture now flags one session with hasAutomation so the badge
renders in mocked-dashboard proofs.
2026-08-16 14:29:41 -07:00
Peter Steinberger 86cfcd3833 fix(delivery): unify terminal settlement ownership (#124825)
* fix(delivery): unify terminal settlement ownership

Treat identityless adapter returns as potentially visible across channel, queue, and cron paths. Let recovery own terminal completion so ambiguity persists as notice debt instead of being double-settled or silently suppressed.

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>

* refactor(delivery): narrow terminal internals

Remove now-unused internal exports after terminal-settlement ownership was consolidated.

* test(tts): preserve message runtime exports

Import and spread the actual message runtime so the focused mock retains every runtime binding while overriding only the durable send core.

---------

Co-authored-by: ruel225 <ruel225@users.noreply.github.com>
2026-08-16 14:28:26 -07:00
Peter Steinberger 8635f9cf03 fix(agent): preserve implicit roster in configless exec (#124805)
Amp-Thread-ID: https://ampcode.com/threads/T-01a00b7c-b9f0-73d5-8fb7-e619e8e458e1

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 14:27:29 -07:00
Peter Steinberger 2f98eeabfd feat(auto-reply): record message-tool mute outcomes (#124830)
* feat(auto-reply): record message-tool mute outcomes

* fix(auto-reply): require source delivery evidence

* test(infra): preserve historical agent schema fixtures
2026-08-16 14:26:20 -07:00
Peter Steinberger 313fcf1dba fix(channels): route direct DM replies to sender (#124837)
Default direct-message reply context to the authenticated sender address so targetless Reef and Nostr replies do not resolve to the local recipient.
2026-08-16 14:24:30 -07:00
Peter Steinberger 4aafed1f4a fix(media): bound image-optimize fetch headroom to the image cap (#124838)
When a caller passed an explicit maxBytes with optimizeImages on (the
default), the source-read bound was inflated to max(maxBytes, 100MB
document cap). A channel with a 5MB attachment cap therefore let a
hostile or oversized URL buffer up to 100MB before the final size check
— 20x resource amplification, and the inflation applied before content
classification, so it was not limited to images.

The inflation exists so oversized-but-compressible originals can be
fetched and compressed under the delivery cap. Size that headroom off
the thing that justifies it: 4x the 6MB image cap (24MB), enough for
large phone photos, instead of the document cap.

Accepted tradeoff (named at the constant): originals above 24MB that
would have compressed under the cap now fail; the fetch error names the
bound. Callers without an explicit cap keep per-kind defaults.

Live proof on a real localhost HTTP server (no mocked fetch): an 8.1MB
PNG under a 5MB cap compresses to 3.75MB and delivers; a 30MB-declared
image is rejected at the Content-Length precheck in 7ms with 'content
length 31457280 exceeds maxBytes 25165824'.

Regression: headroom-bound test fails pre-fix (30MB passes the old
100MB bound); companion test proves compression headroom still works.
2026-08-16 14:23:25 -07:00
Peter Steinberger 63a3a958f4 fix(browser): support Chrome Web Store native bootstrap (#124775)
* fix(browser): support Chrome Web Store native bootstrap

* chore: keep browser release note in PR body

* docs(browser): document Store identity trust boundary

* docs(browser): correct Store recovery guidance
2026-08-16 14:20:47 -07:00
Peter Steinberger 65922f9507 fix(gateway): share generated session titles with worktree names and start title work at dispatch (#124787)
Worktree sessions now derive their worktree/branch name from the same
concise generated title the sidebar shows (bounded 8s wait, raw-prompt
slug then crustacean fallback), persisted once as displayName so the
chat-send pass never duplicates the model call. Dashboard title
scheduling moves from the dispatch chain's finally (after the whole
first turn) back to dispatch start, so long or interrupted first turns
no longer leave sessions silently untitled (regression from #122471).
slugifyWorktreeTitle truncates at word boundaries; dead
generatedDisplayName plumbing removed.
2026-08-16 14:07:54 -07:00
ClawSweeper da85382686 improve(ui): make chat disclosures compact (#124832)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-16 14:04:47 -07:00
Peter Steinberger d39a29fcbe fix(browser): stop local actions when agent turns are cancelled (#124795)
* fix(browser): cancel local actions with agent signal

Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

* fix(agent-harness): expose authored context cap

Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

* chore(agent-harness): drop redundant context-cap override

Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 14:03:43 -07:00
Peter Steinberger a948419141 perf(webui): reuse the chat metadata catalog across pages (#124794)
* refactor(webui): centralize chat metadata caching

* test(webui): cover shared chat metadata store

* refactor(webui): move ChatMetadataResult type to its store owner

* fix(webui): let the metadata store own revalidation lifetime

* fix(webui): satisfy no-promise-executor-return in retry delay
2026-08-16 14:03:04 -07:00
Peter Steinberger 3fb14cd050 refactor(ui): align approval page with redesigned approval card (#124816)
* refactor(ui): align approval page with redesigned approval card

Follow up #124767 by carrying severity accents and identity chips onto the standalone approval page.

Remove the unused execApproval.labels severity, plugin, and agent keys.

* refactor(ui): keep approval-page helpers in repo idiom

Reverts drive-by rewrites from the build pass: restore the exhaustive
decisionLabel switch (the ternary lost the never check), the early-return
appliedDecisionMatches, explicit gatewayCode comparisons, and align the
severity mapping shape with the sibling exec-approval-card.ts.

* test(ui): type approval severity fixtures

* test(scripts): wait for a parseable descendant pid in Bun smoke cleanup

The readiness gate only required the descendant pid file to exist, but
existsSync can observe it between open() and write(); a loaded runner
then reads an empty file and the integer assertion flakes (seen on PR
#124816 CI run 31971191374). Readiness now requires parseable content.
2026-08-16 14:01:00 -07:00
Peter Steinberger ee1ec45eb3 improve(ui): one primary composer button, Enter-steer, Esc-stop, quiet mic, no transcript focus ring (#124799)
* fix(ui): drop the transcript keyboard-focus ring

The .chat-thread:focus-visible 2px inset outline (added in #120693) boxed
the entire main content whenever the transcript took keyboard focus
(Shift+Tab, closing transcript search) and read as a broken border that
stopped above the composer. The transcript stays keyboard-focusable for
scroll keys; it just paints no focus box. Accepted tradeoff: no visible
focus indicator on the scroll container.

* feat(ui): single primary composer button with Enter-steer and Esc-stop

The composer now renders exactly one primary action, always rightmost:
- draft or attachments present: one send-shaped button whose label follows
  the session follow-up mode (Send / Queue / Steer); the stop button no
  longer renders beside it
- empty while a run is active: Stop (tooltip "Stop (Esc)"); Escape in the
  composer aborts the run, deferring to reply-clear and menu precedence
- empty while idle: disabled send labeled "Write a message to send."

Enter on an empty composer while a run is active steers the oldest
steerable queued message — Enter queues, Enter again steers — using the
same eligibility predicate as the queue chip's Steer action (shared
steerableQueuedMessage helper). The mic/dictation control is now always a
compact secondary control left of the primary instead of morphing into
the primary when the composer is empty. Dead ChatRunControlsProps fields
(hasMessages, onExport, onNewSession, showPrimary, showSecondary) and the
composer exportMarkdown wrapper are removed; the assertion-safety
baseline entry for chat-composer.ts shrinks 8 -> 7.

* refactor(ui): quiet the idle composer mic

The idle mic was an accent-tinted two-segment pill (mic + permanently
visible device-picker chevron) that outweighed the primary action. It now
matches the attach button's ghost weight: transparent idle, subtle hover,
and the accent treatment is reserved for the recording and talk-active
states so the idle -> recording escalation reads stronger. The device
picker chevron collapses at idle and reveals on hover/focus-within (kept
always visible on coarse pointers, where dictation matters most; reveal
transition disabled under prefers-reduced-motion). The idle tooltip now
teaches the gesture split — "Tap to talk · Hold to dictate" — while the
aria-label stays "Start voice input".

* refactor(ui): split composer keydown and oversized composer test files

chat-composer.ts crossed the 700-line oxlint budget after the keyboard
additions; the keydown handling (menu routing, history keys, Escape-stop,
Enter steer/send) moves to chat-composer-keydown.ts behind a typed deps
factory. The composer unit tests split their primary-action/keyboard
coverage into chat-composer-actions.test.ts over a shared
chat-composer.test-support.ts, and the catalog/model-discovery e2e cases
move to chat-composer-catalog.e2e.test.ts. Pure moves, no behavior
change; no max-lines suppressions or baseline entries added.

* chore(ui): keep composer test-support ComposerProps internal

The split exported a type nothing imports; the dead-export scan is a
merge gate.

* fix(ui): narrow composer keydown target and adapt keyboard tab-order proof

The keydown split moved two bare textarea assertions into a zero-baseline
file; a single instanceof narrowing at the handler entry replaces both
(the handler only binds to the composer textarea). chat-composer.ts's own
assertion baseline ratchets 7 -> 5. The pointer-activation e2e now walks
the real post-redesign tab order (mic, focus-revealed picker trigger,
then primary send) instead of assuming one Tab.

* fix(ui): gate Enter-steer on the queue chip's visible availability

ClawSweeper P1: the Enter path only required an abortable run, so
offline Enter swallowed the keypress and invoked a steer lifecycle that
returns at !connected with no visible outcome, while the queue chip's
Steer button was correctly hidden behind connected && canCompose. The
keydown path now mirrors the chip's exact boundary (connected, canSend,
abortable, visible queue surface including sessionKey-less pending
rows).
2026-08-16 14:00:47 -07:00
Peter Steinberger 046a9ffdf4 fix(mcp): make Codex approval dead ends actionable (#124766)
* fix(mcp): make Codex approval dead ends actionable

* fix(mcp): preserve native approval fallback

* fix(mcp): configure saved approval modes

* fix(mcp): preserve saved Codex metadata

* style(mcp): simplify saved metadata spread
2026-08-16 14:00:08 -07:00
Peter Steinberger 5a27ebee67 fix(gateway): surface failed node event delivery (#124798)
* fix(gateway): surface failed node event delivery

* fix(plugin-sdk): preserve authored context cap
2026-08-16 13:57:19 -07:00
Peter Steinberger eb8005d7ce fix(gateway): stop closed clients from restoring session subscriptions (#124771)
* fix(gateway): reject closed session subscribers

* test(gateway): type subscription race params

* test(gateway): use public subscription assertion

* fix(ci): invalidate SDK declarations on attempt types

* chore(ci): align boundary cache comment with main
2026-08-16 13:54:16 -07:00
Peter Steinberger d162ea5581 fix(ui): show session changes in review panel (#124824) 2026-08-16 13:52:03 -07:00
Peter Steinberger bf67e079a9 fix(ci): render only aggregate QA evidence (#124823) 2026-08-16 13:49:39 -07:00
ClawSweeper 92d0b826d6 fix(ui): make light-theme diff syntax readable (#124814)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-16 13:47:54 -07:00
Peter Steinberger 0c6040eb14 fix(runners): align reclaim results with runtime (#124791)
* refactor(runners): prepare placement move targets

* fix(runners): preserve normalized dispatch targets

* style(protocol): format reclaim result type
2026-08-16 13:46:00 -07:00
Peter Steinberger 707d3f4adf refactor: split max-lines pilot files and retire suppressions (#124813) 2026-08-16 13:45:27 -07:00