Skip to content

auto-fix batch claude/friendly-maxwell-3QJhB 2026-05-05#631

Merged
intendednull merged 6 commits into
mainfrom
claude/friendly-maxwell-3QJhB
May 8, 2026
Merged

auto-fix batch claude/friendly-maxwell-3QJhB 2026-05-05#631
intendednull merged 6 commits into
mainfrom
claude/friendly-maxwell-3QJhB

Conversation

@intendednull
Copy link
Copy Markdown
Owner

scheduled /resolving-issues sweep against the 2026-05-04 general-audit (master ticket #600). 4/4 dispatches landed clean. picks chosen to NOT overlap with PR #630's in-flight files (docker-compose.yml + relay/worker entrypoints + state tests + crates/messaging/lib.rs + crates/web/tests/static_assets.rs + crates/network/src/traits.rs + README.md + CLAUDE.md + justfile), PR #599's (.github/workflows/* + e2e/permissions.spec.ts + crates/web/tests/browser.rs + state-mgmt spec doc), and PR #566's (crates/{client,messaging,state,storage,web,worker}/src/... deep churn). all 4 picks landed on web public assets / web src non-overlapping files / project root.

Fixes

  • Fixes audit F5 [tech-debt]: PWA manifest icons missing purpose: maskable; manifest missing scope and id #605fix(web): add maskable purpose, scope, id to manifest (d3543cc). PWA manifest now has "id": "/", "scope": "/" top-level + "purpose": "any maskable" on both icon entries. Android adaptive-icon containers get a safe-zone-aware variant; same-origin install identity is no longer URL-derived. Coordinator pre-decided narrowing: simpler-form (audit's own accepted fallback — both icons gain "any maskable" purpose; existing SVGs already have ample safe-zone padding) over the aspirational separate-maskable-icon ship.

  • Fixes audit F6 [quality]: service-worker registration swallows all errors silently #606fix(web): port sw register to web_sys + log err (791faa5). crates/web/src/main.rs:17 swapped js_sys::eval(...) string for web_sys::window().navigator().service_worker().register("/sw.js") driven by wasm_bindgen_futures::spawn_local. On Err(JsValue), formats via as_string().unwrap_or_else(|| format!("{e:?}")) and logs through tracing::warn!. Drops one js_sys::eval user (still ~6 elsewhere in the web crate per [security] XSS-prone js_sys::eval() in pinned message jump #171/[WS-1] Web: js_sys::eval(format!()) for pinned-message scroll uses band-aid sanitization #425 tracker) AND surfaces SW registration failures (HTTPS misconfig, MIME mismatch, parse, scope) that previously vanished. Coordinator pre-decided narrowing: Option B (port to web_sys) over Option A (just log the eval result), justified by audit's explicit endorsement + concrete unsafe-eval removal progress. web_sys::ServiceWorkerContainer was already in the Cargo.toml feature list — no new flag added.

  • Fixes audit F20 [robustness]: swallowed create_ephemeral_channel Result in member-list temp-channel button #620fix(web): log create_ephemeral_channel error (22969f5). crates/web/src/components/member_list.rs:383-390 swapped let _ = h.create_ephemeral_channel(...).await; for if let Err(e) = ... { tracing::warn!(?e, "create_ephemeral_channel failed"); }. Mirrors the audit F18 [quality]: ICE candidate handle_ice_candidate result swallowed #585 / 41736c0 ICE-candidate-handle-error pattern verbatim. Coordinator pre-decided narrowing: log-only over toast-surface (toast wiring is a separate scope decision; the audit's primary concern was diagnostic visibility).

  • Fixes audit F7 [docs]: PLAN.md is pre-iroh-migration (still says libp2p, GossipSub, Kademlia, mDNS) #607docs: delete stale PLAN.md (duplicates README + CLAUDE.md) (e290875). 209-line doc deleted. Pre-iroh-migration content (libp2p, GossipSub, Kademlia, mDNS, port 9090/9091) had drifted on three top-level docs — README + CLAUDE were already canonical post-iroh, PLAN was the only stale source. Phase-status checklist was decorative, drifted independently of the codebase. Coordinator pre-flight grep -rn "PLAN.md" returned zero hits — no broken references anywhere in the repo. Coordinator pre-decided narrowing: Option A (delete) over Option B (rewrite), per the rationale that docs/specs/2026-03-29-iroh-migration-design.md is the canonical historical record for the architecture transition; PLAN.md adds no information not better captured elsewhere AND drifts faster than CLAUDE.md.

Already-Fixed

None. Audit @ 88498a5 = master-branch base (88498a5); same-day audit-to-fix gap. Per the skill's "When same-day audit-to-fix gap, expect ~zero already-fixed hits" clause, the sweep was a one-line git log origin/main..HEAD check that confirmed empty. No time invested.

Parked

Skill Evolution

One skill edit this run, committed on master in 18d5564 docs(skill): pre-flight verify audit's claimed mechanism:

  • Adds a sub-paragraph to step 2 of the Implementer Agent section. Mandates pre-flight verification of the audit's claimed mechanism (logging path, recovery code, test parser shape), not just its line numbers. Audits sometimes prescribe a fix predicated on a stated mechanism that (a) violates a module-local constraint (privacy contract, observability forbids), or (b) describes code that doesn't actually exist as cited. Both checks should fire before dispatching. If either fails, treat as ambiguous-fix-path → coordinator-skip without close. Cites audit F22 [quality]: search index remove_* mutations silently dropped on mailbox full #622 as the surfacing example so the next session has full provenance.

Lessons Learned

Test plan

master-PR CI is the load-bearing gate. each implementer ran the scoped subset locally (fmt + native clippy + cargo test on touched crates + wasm32 check + wasm32 clippy on touched crates).

CI gates to verify on this PR:

  • cargo fmt
  • cargo clippy workspace (native + wasm32)
  • cargo test workspace — no new tests added this run (4/4 picks were doc / asset / single-callsite-log / file-delete fixes); existing 252-test willow-state suite + 53-test willow-messaging suite + willow-web wasm-pack browser tests should run unchanged.
  • cargo test -p willow-web --test static_assets (7/7 — confirmed locally green by audit F5 [tech-debt]: PWA manifest icons missing purpose: maskable; manifest missing scope and id #605 implementer; manifest still references both bundled SVG icons after the field additions)
  • wasm-pack browser tests (Firefox + geckodriver — observable on CI only) — service-worker registration via web_sys runs at app boot in the browser-test harness; verify no new console errors there.
  • cargo audit (no advisory changes this run).
  • Playwright e2e — no behavior-change picks; sanity only.
  • manual smoke (post-merge): install Willow as PWA on Android — confirm adaptive-icon containers no longer crop the launcher icon awkwardly. Out-of-band; the PR's local validation was JSON parse + the static-asset test.

Cargo.lock churn: none this run. No new deps added.

Mergeable_state expected: clean against current main. Possible textual conflicts if PR #630 / PR #599 / PR #566 land first — none of them touch any of this PR's 4 file paths (crates/web/manifest.json, crates/web/src/main.rs, crates/web/src/components/member_list.rs, PLAN.md), so any conflict would be entirely on .claude/skills/resolving-issues/SKILL.md (this run's skill edit + previous runs' skill edits in the in-flight PRs). All such conflicts are textual and resolvable in seconds; no logic-fix conflicts expected.


Generated by Claude Code

claude added 6 commits May 5, 2026 00:09
- icons: purpose "any maskable" so Android adaptive
  containers crop with safe-zone awareness
- top-level scope + id "/" so browsers identify install
  by id, not URL — prevents collisions between dev and
  prod builds at same origin

Refs #605
- swap js_sys::eval string for web_sys::ServiceWorkerContainer
- log JsValue err via tracing::warn so HTTPS/MIME/parse/scope
  failures surface instead of silent .catch(()=>{})
- drops one unsafe-eval user (refs CSP cleanup #171/#425)

Refs #606
- Replace `let _ = h.create_ephemeral_channel(...).await` in the
  member-list "start temp channel…" button click handler with an
  explicit `if let Err(e)` branch emitting
  `tracing::warn!(?e, "create_ephemeral_channel failed")`.
- Mirrors the #585 / 41736c0 ICE-candidate pattern: silently dropping
  the Result hid network/permission/name-collision failures from both
  the user and the logs.
- Log only, no toast: surfacing UI feedback would require touching the
  failure-UI helper convention, out of scope for an error-logging
  parity fix. Audit raised both options; narrowed to logging.

Refs #620
- PLAN.md opened with "Built with Rust, libp2p, and Leptos" and named
  GossipSub/Kademlia/mDNS in its architecture box. Project migrated to
  iroh; see docs/specs/2026-03-29-iroh-migration-design.md.
- README.md (overview + setup) + CLAUDE.md (architecture, crate layout,
  state-management, test-tier tree) cover everything PLAN duplicated,
  with current terminology.
- Phase checklist (lines 66-157) was a historical artifact; every phase
  except Phase 9 read COMPLETE but doc didn't track code evolution.
  Active voice/video state lives in crates/web/src/voice.rs + specs.
- "Deployed" section's port mentions (9090/9091) were a third drift
  site already flagged by audit #627 / PR #630.
- Audit #607 explicitly accepted deletion as the principled fix vs
  rewrite-and-let-it-drift-again.
- No references: grep -rn "PLAN.md" returned zero hits across repo.
  No include_str! / build.rs / test reads PLAN.md, so cargo test gate
  doesn't apply per the no-asset-coverage rule. Ran cargo fmt --check
  and cargo check --workspace; both green.

Refs #607
Audits sometimes prescribe a fix predicated on a stated
mechanism — log via tracing::warn!, the rebuild Effect picks it
up, the existing test would catch this. Pre-flight verify the
mechanism actually exists at HEAD AND doesn't violate a
module-local constraint (privacy contracts, observability
forbids, etc.). Surfaced this run by #622: search/handle.rs
module-doc forbids all tracing::* (per local-search privacy
spec) AND the rebuild Effect that insert's own doc-comment cites
doesn't exist as described — the real recovery is an event-loop
subscription with the same do_send fragility. Audit's both
options were non-viable as-stated; correct call was
ambiguous-fix-path skip without close.

Refs #622
@intendednull intendednull merged commit 953ef40 into main May 8, 2026
8 checks passed
@intendednull intendednull deleted the claude/friendly-maxwell-3QJhB branch May 8, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment