Skip to content

general-audit lessons: 2026-04-28 #477

@intendednull

Description

@intendednull

Lessons from /general-audit run @ 958e1ec (#474). Built on lessons #426 + #438.

What worked (from #438 suggestions, now validated again)

What didn't

Suggested edits to .claude/skills/general-audit/SKILL.md

  1. Add let _ = .<method>().await to the standard sweep grep set. Specifically: rg "let _ = [a-z_]+\.[a-z_]+\(.*\)\.await" crates/web/src/components/. F2 wasn't in the prior sweep list. .ok(); ([TD-04] .ok() silently swallows ~16 errors in listeners.rs event-pump hot loop #253-class) is already there; let _ = await is a sibling and should be too.

  2. Add an explicit "sibling-of-closed" pass. Before declaring synthesis complete, look at issues closed since the last audit master and check whether the fix scope was narrower than the bug class. Pattern: gh pr list --state merged --base main --json number,title,closingIssuesReferences, then for each closed issue, scan the codebase for siblings of the original symptom outside the fix scope. F1 (deploy.yml fix didn't cover Docker) and F2 (handlers.rs fix didn't cover components/) both fit.

  3. Codify mcp__github__sub_issue_write linking as a numbered step. Currently the skill says "master issue + child issue per finding" but doesn't tell the orchestrator to wire them as GitHub sub-issues. Sub-issue linking surfaces children in master's UI panel.

  4. Drop or fold the "8-agent fan-out" example block from SKILL.md. Three runs in a row (general-audit: main @ 401e2fc (2026-04-27) #413 8-agent failure, general-audit: main @ 00aa515 (2026-04-27) #437 0-agent success, general-audit: main @ 958e1ec (2026-04-28) #474 0-agent success) confirm orchestrator-direct is the new default. Lessons general-audit lessons: 2026-04-27 #426/general-audit lessons: 2026-04-27 (run 2) #438/general-audit: main @ 958e1ec (2026-04-28) #474 all suggest this. Time to stop coaching the failed pattern.

  5. Update threshold from general-audit lessons: 2026-04-27 (run 2) #438's "<50 files" suggestion. Today's run was 52 files (just over) and orchestrator-direct still worked. Bump to "<100 files" or "<2000 LOC diff" — the real bottleneck is finding density per file, not file count.

  6. Sweep templates in skill body. Lessons accumulate but the actual sweep commands live in the orchestrator's head. Move the standard rg/grep sweep set into SKILL.md as a concrete checklist:

# Security sweep
rg -n "(^|\s)unsafe\s+(impl|fn|\{)" crates --glob '!**/tests*'
rg -n "\b(dbg!|todo!\(|unimplemented!\(|FIXME|HACK)" crates --glob '!**/tests*' --glob '!**/main.rs'
rg -n "Arc<\s*(parking_lot::)?(Mutex|RwLock)<" crates --glob '!**/tests*' | grep -v "lock-ok"
rg -n "(js_sys::eval|innerHTML|set_inner_html)" crates --glob '!**/tests*'

# Observability / UX
rg -n "let _ = [a-z_]+\.[a-z_]+\(.*\)\.await" crates/web/src/components/
rg -n "\.ok\(\);" crates/client/src crates/web/src --glob '!**/tests*' | head -40

# Architecture
rg -n "use anyhow|anyhow::|anyhow!\(" crates/state/src crates/transport/src crates/identity/src crates/messaging/src crates/crypto/src crates/common/src
rg -n "topics:|deps:|participants:|peers:|members:" crates/common/src crates/transport/src crates/state/src/event.rs

# Deps / supply chain
cargo audit -n --ignore $(grep -oE "RUSTSEC-[0-9]+-[0-9]+" .github/workflows/ci.yml | tr '\n' ' ' | sed 's/ /,/g')
grep -rn "cargo install [^-][^- ]*" docker/ .github/workflows/
grep -rn "FROM [^@]*$" docker/        # any unpinned base image?

This makes the audit reproducible across runs without orchestrator memory.

Numbers

Action

Human (or follow-up routine) to fold suggested edits into .claude/skills/general-audit/SKILL.md. Highest leverage: edits #1 (sweep grep set), #2 (sibling-of-closed pass), #6 (sweep template).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions