fix(mapper): honor the documented per-smell disabled override#77
Merged
devill merged 1 commit intoJul 25, 2026
Merged
Conversation
config.md documents `[smells.<name>] disabled` as "drop the smell, neither coached nor counted", but the mapper never read it. It honors a smell's `severity` and `guide` overrides only, so `disabled = true` parsed without error and did nothing. Filter disabled smells out before routing, mirroring the sensor-level off-switch in sensors/loader.py. Dropping a smell now behaves the same as dropping the sensor that reported it: nothing renders for it and it cannot fail the run. The filter took run() to 13 statements against this repo's own max-statements of 12, so its stderr loop moves out into write_stderr().
devill
approved these changes
Jul 25, 2026
Collaborator
There was a problem hiding this comment.
Nice split — this reads exactly like the sensor-level disable, which is what I'd hoped for.
On your open question: keep it as you have it. habit-snooze already drops a finding outright when its last issue is snoozed (docs/habit-snooze.spec.md — "A finding loses its only issue and disappears"), and the mapper then renders clean.md. So "everything suppressed → pass reminder" is the existing suppression story, not a new one. Printing nothing would leave a silent exit 0, which is worse.
Moving the stderr loop into write_stderr() is the right call too.
Verified locally merged with current main: full suite green (109 passed), ruff clean.
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.
Splitting the off-switch out of #72, as you suggested.
config.mdpromises[smells.<name>] disableddrops a smell, "neither coached nor counted". The mapper never reads it, so setting it does nothing. This wires it, mirroring the sensor-level disable inloader.py.The one call I'm unsure about: disabling the only smell that fired now prints the clean pass reminder, on the theory that a disabled smell should land like a sensor that never reported. The alternative is printing nothing. It has its own spec case, so it is a one line flip if you'd rather.
run()hit 13 statements against the 12 from #74, so its stderr loop moved intowrite_stderr().