You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rules: rule outcome is a skip-reason string re-classified by four predicates; one typed RuleOutcome #1661
A rule's outcome is encoded as status: "skipped" plus a skipReason string plus details.errored / details.timedOut (core-contracts/resolution.ts:183-238, rules/cloud.ts:123-133, report/skipped.ts, report/not-checked.ts:104-203). At least four predicates re-classify it: isRuleNotApplicableReason, NOT_CHECKED_SKIP_REASONS, isRuleWideGapSkipReason and the details.errored checks. They are read in merge-core.ts, merge-promise.ts, publish-meta.ts, publish-cap.ts, fail-on.ts and streaming.ts. A new reason string is silently misclassified, and a crashed rule can surface as "not checked".
Approach: RuleOutcome = ran | not_applicable | coverage_gap | timed_out | errored | disabled, and one classifyRuleOutcome(check) that every consumer calls. Keep the wire format (status, skipReason) as is, and add outcome beside it in JSON so agents stop parsing reason strings.
Acceptance Criteria
One classifier maps every existing skip reason to a RuleOutcome; a test fails if a reason string has no mapping
The four predicates are replaced by the classifier (or become one-line wrappers over it)
Report JSON includes outcome per rule result; existing fields unchanged
An errored rule and a timed-out rule are distinguishable in JSON and in --fail-on handling (test)
Activity
feat(report): typed RuleOutcome from one skip-reason table, outcome o…