Skip to content

fix(ci): prune, tool-signature and flaky-annotation fixes (D-1189, D-1192, D-1193) - #471

Merged
acamarata merged 3 commits into
mainfrom
dw1-plugins-5
Oct 25, 2026
Merged

acamarata merged 3 commits into
mainfrom
dw1-plugins-5

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Three small, single-purpose fixes in free/ci. Each was still present on origin/main (c886feb).

D-1189 – internal/history/prune.go: the run-start prune discarded the LoadPolicy error, so a malformed retention.json silently pruned on the default limits. It now skips the automatic prune and prints a note to stderr (the manual runs prune already notes and uses defaults on explicit request). Test: TestRunStartSkipsPruneWhenRetentionFileIsBad (fails without the fix).

D-1192 – internal/diagnose/signatures.go: the tool signature's output regex : not found$ matched customer: not found and retried an application failure as infra. It now requires a shell-prefixed line (sh:, /bin/sh:, bash: with optional line N:/N:). Tests added to TestClassifyClasses (the app message is code; the /bin/sh: line 3: form stays infra). The new app-message case fails without the fix.

D-1193 – internal/flaky/annotate.go, internal/run/flaky_hook.go: notes were keyed by check id only, so a same-named check in another job got the flaky mark. Notes are now keyed by model.FlakyKey(jobID, checkID) on both sides. Tests: TestAnnotateKeysByJobAndCheck (flaky) and TestMarkHistoryFlakyMatchesJobAndCheck (run). These use the new helper, so they do not compile without the fix.

Commands (in free/ci): go vet -mod=vendor on touched packages (clean); go test -mod=vendor ./... (all packages ok). Confirmed the D-1189 and D-1192 tests fail with the source change reverted.

@acamarata
acamarata merged commit fc792b9 into main Oct 25, 2026
31 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