Danger classifier is pattern matching #214

Open
opened 2026-11-21 12:36:54 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-core/src/danger.rs, Verdict classification
What is hacky: pattern rules, not a shell interpreter; unknown commands fall through to the judge/user and false negatives are fixed ad hoc via /auto.
Proper fix: classify from a parsed command AST with a maintained rule table and tests from /auto refusals.
Original comment: "ponytail: pattern rules, not a shell interpreter; unparsable or unknown commands fall to Ask (the judge, then the user). Add rules here when a false negative shows up in /auto."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-core/src/danger.rs, `Verdict` classification What is hacky: pattern rules, not a shell interpreter; unknown commands fall through to the judge/user and false negatives are fixed ad hoc via `/auto`. Proper fix: classify from a parsed command AST with a maintained rule table and tests from `/auto` refusals. Original comment: "ponytail: pattern rules, not a shell interpreter; unparsable or unknown commands fall to Ask (the judge, then the user). Add rules here when a false negative shows up in `/auto`." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the core label 2026-11-21 12:36:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#214