Repository navigation
test(ci): selftest, alert and tidy tests and the audit pipeline template (P7-AUTO-20) - #547
Merged
Merged
Conversation
…ate (P7-AUTO-20) Planted stuck claim, leaked job root, infra failures and others each flip only their own check; the alert goes out once per failing set per UTC day and retries a set no sink took; tidy is report-only without --apply and applies exactly the planned items. templates/audit-pipeline.yml is a schedule-only pipeline (background band) for govulncheck, pnpm audit and go test -race; a watcher drill shows a not-ready host never starts it.
Contributor
Author
|
Folded into #543 (land/p7f-plugins) to land in one CI run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#543 carries the P7-AUTO-20 code (
doctor --selftest [--alert],runs prune --tidy) without any test, and without the audit template. This PR adds both. Stacked on #543 (baseland/p7f-plugins).internal/selftest/selftest_test.goTestSelftestChecksFlip: a healthy host passes all nine checks. Planting a stuck claim, a leaked job root, infra failures, a stale watcher, low disk or a missing required tool flips only the matching check to fail. An unreadable fact warns.TestSelftestAlertOncePerDay: a failing set is sent once per UTC day. One more failing check makes a new message. A clean report sends nothing. The next day sends again. A set no sink took is retried.TestTidyReportOnlyByDefault: without--apply, nothing is removed and the report lists the exact items.TestTidyApplyReachesTarget: apply removes exactly the planned items and reaches the target. An unreachable target says why.templates/audit-pipeline.yml: a schedule-only pipeline (so it runs in the background band) forgovulncheck,pnpm auditandgo test -race, merged into.nself/ci.yaml.internal/selftest/audit_template_test.go,TestAuditTemplateValid: the template passesconfig.Parse(the pipeline-config schema). As a drill, a watcher pass on a not-ready host never calls the idle tick that starts it. A ready idle host starts one pipeline.Verification (local, scoped)
go test -mod=vendor -count=1 -v -run '<the five names>' ./internal/selftest/: all PASS.go vet ./internal/selftest/,go test ./architecture/...and gofmt are clean.Not covered here
cmd/doctor_selftest_test.goandcmd/runs_tidy_test.go(store-backed CLI tests) are still absent. The acceptance behaviour is proven at the package level above.Ticket: P7-AUTO-20