Repository navigation
fix(config): normalize scalar title exclusion patterns - #158
Conversation
Git-Session-Id: 45e0
|
|
CI-green and mergeable — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
🤖 AI code reviewThis PR normalizes the exclude_titles config value in aw_watcher_window/config.py so that a scalar TOML string is wrapped into a single-element list, while lists are preserved and invalid types (numbers, booleans, tables, mixed lists) cause an argparse error. It adds parametrized tests covering scalar, list, empty list, empty string, invalid types, and CLI override of invalid config. Safe to merge — no P0/P1 findingsConfidence 5/5 ℹ️ Consensus was degraded on this run: 2 of 3 passes answered, so findings were filtered at 2-of-2 agreement rather than 2-of-3 — less filtered than usual; 2 of 3 fan-out jobs answered, so the findings above were filtered against less evidence than the threshold assumes. ✅ No thread-worthy findings. Advisory notes follow; they are retained without opening review threads. 1 advisory finding (summary-only, not scored)These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.
The normalization code runs after parser.parse_args() and before the research maps are attached. However, it does not handle the case where exclude_titles is a tuple. While TOML arrays become lists, argparse with nargs='+' returns a list, and the default from config is a list, so tuples are unlikely. But more importantly, the check How this was verified: Traced the logic: string default wrapped, list preserved, invalid types error. No concrete input produces wrong behavior. Consensus: 2/2 passes agreed Files changed (2) — the diff as I read it
Reviewed Maintainer commands
|
Problem
A valid TOML config
exclude_titles = "1Password"reaches argparse as a string default. The watcher iterates its characters and compiles nine regexes, redacting unrelated titles such as "Project notes" and "Terminal".Change
Normalize the effective value after CLI overrides are resolved: a string becomes one regex; string lists (including empty lists) are preserved. Invalid scalar/table/mixed-array values exit with a clear argparse error naming
exclude_titles. Empty strings retain their existing regex semantics. The shared parser boundary feeds both watcher backends.This is independent of #156: no
exclude_apps, Swift, or regex-syntax changes.Verification
--helpstarts successfully;git diff --checkclean.Queue pairing
Rechecked older PR #140: all seven checks green, Greptile 5/5, existing local standing disposition remains maintainer merge (pull-only access). No repetitive GitHub nudge posted.