Known-error/fix config errors are silently dropped at load time instead of failing loudly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start at Config::new in src/shared/config_load.rs:167-171 and trace how conversion errors from src/shared/models/internal/known_error.rs and fix.rs are handled. Reproduce the reserved capture-name or broken-template examples, then make the chosen warning or hard-failure behavior identify the source file and validation error; done means invalid entries are no longer silently dropped.
Written by the indexing model from the issue text.
Description
Summary
Config::new swallows errors when converting a raw config entry into its typed model — a ScopeKnownError (or any other model) that fails validation just silently disappears from the loaded config instead of surfacing an error to the user.
// src/shared/config_load.rs:167-171
for raw_config in raw_config {
if let Ok(value) = raw_config.try_into() {
this.add_model(value);
}
}
The Err case is discarded with no logging, no warning, nothing. Found while manually validating #343 (regex captures in known errors), which added a reserved-capture-name validation (src/shared/models/internal/known_error.rs:90, RESERVED_CAPTURE_NAMES = ["working_dir", "captures"]) and eager fix-template validation — both of which return an Err on invalid config, but that Err never reaches the user.
Reproduction (MVCE)
mkdir -p /tmp/scope-silent-drop/.scope
cat > /tmp/scope-silent-drop/.scope/known-error.yaml <<'YAML'
apiVersion: scope.github.com/v1alpha
kind: ScopeKnownError
metadata:
name: bad-reserved
description: uses a reserved capture group name
spec:
pattern: "boom: (?<captures>.*)"
help: "should never load"
YAML
cd /tmp/scope-silent-drop
scope-intercept -- bash -c 'echo "boom: xyz"; exit 1'
Expected: the tool refuses to start, or at minimum logs an ERROR/WARN naming the bad file and the reserved-name violation.
Actual: the command runs clean and prints No known errors found — as if the ScopeKnownError file didn't exist at all. There is no indication anywhere that a config file was rejected, why, or which file it was. A user who typos a capture group name (or ships a fix with a broken minijinja template) gets no signal that their known-error config isn't doing anything.
Same silent-drop happens for a broken fix template, e.g.:
spec:
pattern: "boom: (.*)"
fix:
commands:
- "echo {{ unclosed"
Suggested fix
At minimum, log the conversion error (with the source file path) at WARN or ERROR in the if let Ok(...) / else branch in Config::new. Arguably this should be a hard failure (non-zero exit) since a silently-ignored known error or fix is a correctness footgun, not a degraded-but-working state.
Where this lives
src/shared/config_load.rs:167-171— the swallow sitesrc/shared/models/internal/known_error.rs:90— reserved capture name rejection (one of theErrcases being swallowed)src/shared/models/internal/fix.rs— eager fix-template validation (anotherErrcase being swallowed)
🤖 Generated with Claude Code
- Dominant language
- Rust
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gusto/scope
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
scope-intercept: one bad ScopeKnownError file disables all known-error matching, not just itself Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100