8000 📏 Publish the root-cause accuracy scorecard automatically by abahmed · Pull Request #629 · abahmed/kwatch · GitHub
[go: up one dir, main page]

Skip to content

📏 Publish the root-cause accuracy scorecard automatically - #629

Merged
abahmed merged 2 commits into
mainfrom
accuracy-scorecard
Nov 29, 2026
Merged

abahmed merged 2 commits into
mainfrom
accuracy-scorecard

Conversation

@abahmed
@abahmed abahmed commented Nov 29, 2026
Copy link
Copy Markdown
Owner

Generates accuracy.json and sample-alerts.json from the scenario harness and attaches them to each stable release, so the website and docs can fetch them at build time.

  • TestPublishArtifacts (internal/scenarios/publish_test.go): set KWATCH_PUBLISH_DIR to write both files; skipped otherwise. Metadata comes from KWATCH_VERSION, KWATCH_COMMIT, KWATCH_GENERATED_AT (no clock reads).
  • "Correct" is exactly the harness's: scorecard.ScoreCases over the labelled cases (first incident rooted at the expected entity, or no cause when the label expects unknown). Method in internal/scenarios/PUBLISHING.md and in the JSON method field. Categories group cases by expected root kind. Held-out set reported separately.
  • Sample alerts: the first alert of oom-limit-too-low, rendered by the real composer as Community and as Pro (plain text + fields).
  • .github/workflows/accuracy.yml: new workflow, on release published (stable only, pre-releases skipped) and manual dispatch with a tag; uploads both files with gh release upload --clobber. release.yml is not touched.
  • Tests: shape tests for both documents.

Current figure (labelled): 99.4% (834 of 839 cases, 889 scenarios); held-out 100% (16 of 16); 0 wrong high-confidence.

Consumer URLs:

Not run locally: full make verify (the race run of the scenarios package exceeded the 10 minute test timeout on this 3-CPU machine); the new tests, vet and the generator ran. CI must verify the full gate. The workflow only runs once a stable release is published (releases created with the default token do not trigger it; dispatch with the tag works).

@abahmed
abahmed merged commit e265cca into main Nov 29, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0