fix: stop scanner and roadmap audits from nagging consumer repos#229
Merged
Conversation
Three defaults bugs that made a Brigade-wired consumer repo (one that uses brigade as a library and work-loop tool, not the brigade source repo itself) report noise in its daily brief: - Sweep ingest failed the whole sweep with 'import_path is not configured' for self-importing scanners. memory-refresh and handoff-ingest append to the inbox via their own commands and have no JSONL import file, so the ingest step now skips a scanner with no import_path instead of erroring. - chat-memory-sweep was unconditionally in SCANNER_REQUIRED_IDS, so a code repo with every chat surface disabled got a permanent scanner_required warning for a producer that has nothing to sweep. It is now required only when at least one chat surface is enabled. - roadmap audit introspected brigade's own CLI parser against any target, so a small consumer repo reported hundreds of 'undocumented' brigade commands and a stale docs/command-inventory.md it never owned. The brigade-catalog checks (roadmap_cli_command_missing_docs, roadmap_command_inventory_current) now run only when the target owns the brigade CLI. The universal check that flags a bogus brigade command in any repo's docs is unchanged.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
What and why
Three Brigade defaults bugs, all surfaced by wiring a consumer repo (bootstrap-doctor) into Brigade. Each makes the daily brief of a repo that uses brigade (as a library and work-loop tool) but does not own the brigade CLI report noise it can't act on. All three were filed as friction from that repo; this is the cleanup.
1. Sweep ingest fails on self-importing scanners
brigade work sweep(ingest on by default) failed the whole sweep withimport_path is not configuredformemory-refreshandhandoff-ingest. Those scanners append to the inbox via their own commands (brigade work import memory-refresh,brigade handoff sync-issues) and produce no JSONL import file, so there is nothing for the sweep to ingest._scanner_validate_import_outputnow treats an absentimport_pathas a self-importing scanner and skips it silently instead of erroring. Workaround was--no-ingest; now unnecessary.2. chat-memory-sweep required unconditionally
chat-memory-sweepsat inSCANNER_REQUIRED_IDSalways, so a code repo with every chat surface disabled had to choose between a failing scanner (no producer forchat-memory-sweeps/latest.json) and a permanentscanner_requiredwarning. It is now required only when at least one chat surface is enabled (viachat_cmd.health); repos that genuinely run chat surfaces are still nudged.3. roadmap audit counts brigade's own CLI against every repo
brigade roadmap auditintrospects brigade's own argparse parser, so a three-command consumer repo reported ~573 "undocumented" brigade commands and a staledocs/command-inventory.mdit never owned. The brigade-catalog checks (roadmap_cli_command_missing_docs,roadmap_command_inventory_current) now run only when the target owns the brigade CLI (detected viapyproject.tomlname = "brigade-cli"). The universal check that flags a bogusbrigadecommand in any repo's docs (roadmap_documented_command_missing_cli) is unchanged.Note on intent (please sanity-check)
Bug 3 reverses behavior that an existing test asserted:
test_roadmap_audit_includes_command_inventory_driftexpected the inventory-drift check to fire on an arbitrary target. I read that as testing the mechanism rather than an intentional "nag every consumer repo" policy, and updated it to mark its target asbrigade-cli, plus added a test that a plain consumer repo gets no command-catalog checks. If you actually want every repo audited against brigade's command surface, say so and I'll drop bug 3 from this PR.Testing
./scripts/verifypasses: ruff lint + format, mypy, version-sync, and the full pytest suite (2085 passed, 3 skipped) at 81.22% coverage.scanner_requiredignores a disabled chat-memory-sweep with no surface but warns when a surface is enabled; roadmap audit skips the catalog checks for a consumer repo and keeps them for a brigade-cli target.