Skip to content

auto-fix batch claude/friendly-maxwell-bVlpW (2026-04-28)#484

Merged
intendednull merged 9 commits into
mainfrom
claude/friendly-maxwell-bVlpW
Apr 29, 2026
Merged

auto-fix batch claude/friendly-maxwell-bVlpW (2026-04-28)#484
intendednull merged 9 commits into
mainfrom
claude/friendly-maxwell-bVlpW

Conversation

@intendednull
Copy link
Copy Markdown
Owner

5 small-scope fixes swept from open issue queue. All sub-PRs merged via local cargo gate (sub-PR base ≠ main → CI no run). Master PR runs full CI on open — load-bearing gate.

Fixes

Already-Fixed

Parked

Skill Evolution

Skill commit on this branch: 3df1b33 — three updates folded into .claude/skills/resolving-issues/SKILL.md:

  1. Sandbox worktree-fallback in ## Setup. Some sandboxes run a commit-signing service that rejects sources outside /home/user/<repo> with 400 missing sourcegit commit from /home/user/willow-wt-* paths consistently fails. Document the canonical-dir fallback (commit on the same branch from the main checkout). Hit by 2 of 5 implementers this run ([F2] 11 web component handlers swallow client mutation errors (no toast/log) #476, [TC-6] crates/client/src/actions.rs has zero in-file tests #420).
  2. New stale-audit-with-residual-gap path on the implementer agent. When an audit's literal premise is outdated (e.g. [TEST-04] actor crate tests all #[ignore]'d — zero default-CI coverage of actor runtime #232's "0 default tests" was true at 2f26d91 but PR Unbounded actor mailboxes enable OOM DoS across all actors #78 has since added 90) but its underlying concern is partially valid (audit specifically called out shutdown ordering + multi-subscriber broker isolation, neither of which existed pre-this-PR), narrow scope to the residual gap and ship that. Coordinator still records under Fixes #N.
  3. Already-fixed-upstream path: completed vs not_planned. Clarified the close-state choice — completed if the audit's intent still holds (the upstream fix solved it for us); not_planned if the audit's premise is moot (e.g. the targeted code was deleted). [GEN-09] MessageDb::insert swallows SQLite errors with .ok(); — silent message loss #269 took the latter path this run.

Lessons Learned

Test plan

  • Master-PR CI runs full just check (fmt + clippy + test + wasm + browser).
  • Manual smoke: just dev + agent-browser navigation through web UI to confirm component error toasts surface (e.g. trigger a channel-create permission failure, verify the toast appears with the new label).

Generated by Claude Code

claude and others added 7 commits April 28, 2026 16:28
Mirror deploy.yml pin. Eliminates supply-chain drift from
unpinned `cargo install trunk`.

Refs #475

Co-authored-by: Claude <noreply@anthropic.com>
…479)

Replaces 16 trailing `.ok();` swallows on broker `do_send`, topic `broadcast`, and persistence `do_send` calls in `crates/client/src/listeners.rs` with a private `warn_if_err(Result<T, E>, &'static str)` helper that logs `tracing::warn!(?e, "{context}")` on `Err` and drops the success value. Each call site gets a distinct diagnostic context string.

The single remaining `.ok()` (GrantPermission branch) is intentional — it coerces `Result<Event, _>` to `Option<Event>` for `if let Some(event) = ...`, not a swallowed fire-and-forget send.

Refs #253
…480)

PR #443 closed #350 by routing client-mutation errors in handlers.rs through warn_and_toast / warn_and_toast_with so the user sees a toast instead of the action silently vanishing. The pattern was not propagated to component-internal handlers — 11 sites across roles.rs, settings.rs, sync_queue_view.rs, and channel_sidebar.rs still discarded the anyhow::Result with `let _ = h.foo(...).await`.

Migrate all 11 sites:

- roles.rs: create role, set permission, assign role, delete role
- settings.rs: set server display name, mute server
- sync_queue_view.rs: retry queue
- channel_sidebar.rs: create channel, create voice channel, delete channel, mute channel

Each site now captures `let toasts = use_context::<ToastStack>()` on the outer reactive frame (before `wasm_bindgen_futures::spawn_local`, which strips the reactive owner), moves it into the async block, and dispatches `crate::handlers::warn_and_toast_with("<action>", &e, toasts.as_ref())` on Err.

`rg -n 'let _ = h\.[a-z_]+\(.*\)\.await' crates/web/src/components/` goes from 11 hits to 0.

Refs #476
Add 4 inline #[tokio::test]s to crates/actor/src/lib.rs covering
behaviors the audit (issue #232) called out as missing:

- system_shutdown_terminates_ctx_spawned_child: ctx.spawn children
  are tracked by the system and stopped on shutdown.
- system_shutdown_awaits_in_flight_handler: shutdown blocks until
  every actor's mailbox loop runs to completion (parent waits for
  child). Uses a oneshot ready-signal — no sleep-for-propagation.
- broker_delivers_to_many_subscribers: fanout to N=5 subscribers,
  with ask() round-trips on each subscriber as a deterministic
  FIFO barrier. Also asserts no replay to late subscribers.
- broker_slow_subscriber_does_not_block_others: a blocked Handler
  on one subscriber must not delay delivery to another. Uses
  tokio::sync::Notify for release coordination.

Test count: 90 -> 94 (well above the issue's >10 default-run target).

Note on the issue's other prescription — splitting tests/performance.rs
into actor.rs (correctness) + performance.rs (timing): every test
in the file is a genuine performance/throughput case (assert
ops_per_sec > 5_000.0, 10k-iteration loops, propagation-latency
thresholds, multi-source benchmarks). There are no correctness-only
tests lurking in there to extract; splitting would be churn without
benefit. Inline tests in src/ already cover the correctness
counterparts (e.g. broker_publish_to_subscribers in broker.rs vs
perf_broker_fanout in performance.rs).

Refs #232

Co-authored-by: Claude <noreply@anthropic.com>
Fold lessons from auto-fix batch claude/friendly-maxwell-bVlpW into
the resolving-issues skill:

1. Sandbox signing-service rejects worktree-path commits (hit by 2 of 7
   implementers this run); document the canonical-dir fallback in Setup.
2. New "stale-audit-with-residual-gap" path on the implementer agent —
   when an audit's literal premise is outdated but a residual concern
   remains, narrow scope and ship the residual; keep the issue closer
   under Fixes.
3. Already-fixed-upstream path: clarify completed vs not_planned
   choice based on whether the audit's intent still holds.
@intendednull
Copy link
Copy Markdown
Owner Author

Resolve conflicts and let's also make a change to the skill. We don't necessarily need the work trees anymore because we're working sequentially and opening the sub-PRs seems to be causing some issues. Sometimes the peers wouldn't get merged and it's a little confusing on my end.

Let's adjust the workflow to work sequentially, just on the same branch or by checking out a branch and then merging back into that master branch without any PR or anything like that. That way our Git history stays clean while we don't run into any issues with the GitHub side of things. Once that's all done then we just open a PR with the master branch like we're doing now.

Resolves two conflicts:

1. crates/client/src/lib.rs — both branches added test modules.
   Kept all three: tests_actions (this batch, #420),
   tests_voice + tests_governance (PR #473, #414/#416).
   `cargo check -p willow-client --tests` clean post-resolution.

2. .claude/skills/resolving-issues/SKILL.md — both branches edited
   the skill. Resolved by full rewrite per human review feedback on
   PR #484: drop worktrees and sub-PRs entirely, work sequentially on
   the master branch directly (or via local feature branches that
   merge back into master without going through GitHub PRs).

Skill rewrite captures the new workflow shape:
- One master branch per session, all fixes land sequentially.
- No sub-PRs (they were causing merge confusion + silent CI skip
  when sub-PR base ≠ main).
- No worktrees (sequential = no isolation needed; also dodged the
  sandbox signing-service incompatibility documented in the prior
  skill version).
- Implementer commits directly to master branch (Pattern A) or via
  a local feature branch + `git merge --no-ff` back into master
  (Pattern B). Master PR opens at end of run with everything in it.

Preserved from the prior skill:
- Coordinator-never-codes rule (with two narrow exceptions:
  session-open commit + Lessons Learned skill edits).
- Complexity gate (auto-brainstorm + plan).
- Already-fixed-upstream + stale-audit-with-residual-gap paths.
- Caveman GH comms.
- Sequential between issues, fresh agent per issue, max 10 per run.
Copy link
Copy Markdown
Owner Author

Conflicts resolved + skill rewritten per your feedback. New tip: 72b77de.

Conflicts

  1. crates/client/src/lib.rs — both branches added test modules. Kept all three (tests_actions from this batch, tests_voice + tests_governance from PR auto-fix batch 2026-04-28 (claude/friendly-maxwell-Oggvw) #473). cargo check -p willow-client --tests clean post-merge.
  2. .claude/skills/resolving-issues/SKILL.md — full rewrite (see below).

Skill rewrite — what changed

Drops worktrees + sub-PRs entirely. New shape:

  • One master branch per session, sequential commits, no sub-PRs. Implementer commits directly to master branch (Pattern A) or via a local feature branch then git merge --no-ff back into master (Pattern B, no GitHub PR). Push master, next issue.
  • Master PR at end of run, same as before — single CI run, single artifact for human review.
  • Coordinator-never-codes rule preserved with the same two narrow exceptions: session-open commit + Lessons Learned skill edits.
  • Preserved from prior skill: complexity gate (auto-brainstorm + plan), already-fixed-upstream path, stale-audit-with-residual-gap path, caveman GH comms, sequential between issues, fresh agent per issue, max 10 per run.
  • Removed: all sub-PR machinery (mcp__github__create_pull_request for sub-fixes, sub-PR merge gate, "sub-PR base ≠ main → CI silently doesn't run" foot-gun, webhook-on-sub-PR informational rule). Removed worktree setup + tear-down + sandbox signing-service workaround (not needed without worktrees).

The full master-PR body assembled at end of run still has Fixes #N list, Already-Fixed, Parked, Skill Evolution, Lessons Learned. The end-of-run artifact is unchanged from your perspective.

CI should re-trigger on the merge.


Generated by Claude Code

@intendednull
Copy link
Copy Markdown
Owner Author

Looks like conflict still. Please fix

…gates

PR #467 (SEC-V-03 voice cap, issue #303) merged into main while this
batch was open. It modified the same Voice* listener arms that #253
migrated to warn_if_err. Both changes are independent and compose:

- Keep all SEC-V-03 logic from origin/main (drop unknown-channel
  VoiceJoin/Leave/Signal, cap participants at MAX_VOICE_CHANNELS /
  MAX_PARTICIPANTS_PER_CHANNEL).
- Wrap the final event_broker.do_send(Publish(...)) calls in
  warn_if_err per #253.

cargo check -p willow-client --tests + cargo test -p willow-client
both clean (310 passed).
Copy link
Copy Markdown
Owner Author

Resolved. New tip: 18f0a9e.

PR #467 (SEC-V-03 voice cap, issue #303) merged into main while this batch was open and touched the same Voice* listener arms that #253 migrated to warn_if_err. The two changes compose — kept all SEC-V-03 logic (drop unknown-channel VoiceJoin/Leave/Signal, cap participants) AND wrapped the final event_broker.do_send(Publish(...)) calls in warn_if_err.

Verified: cargo check -p willow-client --tests clean, cargo test -p willow-client 310 passed.


Generated by Claude Code

@intendednull intendednull merged commit 75866bc into main Apr 29, 2026
7 checks passed
@intendednull intendednull deleted the claude/friendly-maxwell-bVlpW branch April 29, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment