Bug-bash round 2: table scroll, Goose instructions, workflow mention wake#2034
Merged
Conversation
Co-authored-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
The workflow send_message action emitted a kind:9 event with a fixed tag set [p=author, h, buzz:workflow] and never parsed @name mentions from the message text. ACP agent-wake (event_mentions_agent) is strictly p-tag gated, so an agent named in a workflow message was never woken. Resolve @name mentions against the destination channel's members and append one p tag per match. Matching is deliberately conservative to avoid waking the wrong agent: - members-only candidates (no global users) - exact display name, case-insensitive, greedy-longest non-overlapping - next char must not extend a member name (unicode-safe boundary, no punctuation allowlist); matched over Vec<char>, never byte offsets - ambiguous name (2+ members, distinct pubkeys) wakes no one - author is not re-tagged (already attributed) 11 unit tests cover the boundary/greedy/ambiguity/dedupe cases plus a non-ASCII member name; one Postgres-gated regression proves the emitted event carries the mentioned member's p tag end to end. Co-authored-by: Dawn (sprout agent) <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
…1764) Redteam (Wren) found `resolve_mention_pubkeys` drops later valid mentions when an earlier matched name lowercases to a different length. The matcher built `chars` from the original text but `lower` from a separate `text.to_lowercase()` pass and indexed the two in parallel; `char::to_lowercase` can expand (İ -> i + U+0307), so every index after the expansion pointed at the wrong char. `@İ @Robby` resolved only İ, dropping Robby. Fold both sides on the fly instead of pre-lowercasing the whole text: walk the original `chars` at each candidate `@`, folding each char through `to_lowercase`, and match against the folded-name char stream — returning how many *original* chars the match consumed. All position accounting (left/right boundary, consumed span) stays in original coordinates, so no index can drift. The candidate name is folded the same way, so its own expansion is handled consistently. Regression coverage: İ + Robby (Wren's counterexample) exercises real 1->2 lowercase expansion plus later-index stability; sharp-S case-insensitivity, a decomposed combining-mark name, expansion at a trailing boundary, and back-to-back `@a@b` (one mention by the left-boundary rule) round out the adversarial set surfaced in Quinn's re-review. 17 unit tests + the Postgres-gated end-to-end regression all green. Co-authored-by: Dawn (sprout agent) <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug-bash round 2 fix phase: three bugs that survived a 470-report triage + local-repro gauntlet, each landing with its repro artifact converted into a regression test. Integration branch cut from pinned main
084e442d; one owner per lane, every lane peer-reviewed plus a whole-branch redteam by a non-author.Fixes
1. Markdown table collapse (505395ca) —
7b6afcc2MarkdownTable.tsx: theoverflow-x-autowrapper was defeated bytable w-full, so wide tables crushed instead of scrolling. Fix is a one-line class change; regression test is the previously-failing Playwright geometry assertion (scrollWidth overflow now real).Owner: Max · Review: Sami · Redteam: Wren (fresh-build Playwright, PASS)
2. Goose agents drop Agent Instructions (9e94ad92) —
10980ebcbuzz-acp: systemPrompt support was inferred from ACP protocol ≥2, but Goose declares v2 while ignoringsession/new.systemPrompt, and the user-message fallback was suppressed — instructions silently vanished. Fix delivers instructions via Goose's real extension_goose/unstable/session/system-prompt/set(mode:append, ships Goose v1.37.0; not capability-advertised, so detection is agentInfo.name + probe with-32601→ legacy fallback). Wire-capture repro retained as the cargo regression harness.Research: Perci (
RESEARCH/GOOSE_ACP_SYSTEM_PROMPT_EXTENSION.md) · Owner: Wren · Review: Eva3. Workflow
send_messagenever wakes mentioned agents (e3661764) —6bf27711+38619a3fworkflow_sink.rshardcoded[p=author, h, buzz:workflow]with no mention p-tags, soevent_mentions_agentnever fired. Fix resolves@name→ pubkey over channel members (exact display-name match) and adds the missing p-tags. Follow-up commit makes the matcher Unicode-safe: folds both streams on the fly with all boundary/consumed-span accounting in original char coordinates (theİ→i+U+0307 1→2 lowercase expansion previously shifted later mention indices — proven red on the pre-fix resolver). 17 unit tests + PG-gated regression green.Owner: Dawn · Review: Quinn (re-signed at final tip) · Redteam: Wren (PASS, 9/9/9)
Verification
218753e0c; this branch is a trailer-normalization rewrite of that tip —git diff 218753e0c..38619a3fis empty (content-identical), only commit-message trailers changed (DCO: Signed-off-by/Co-authored-by Tyler Longwell on all four commits).