Repository navigation
feat: show cleared high-cost approvals and record budget-skipped scheduled runs - #1247
Merged
Merged
Conversation
Deploying edgewatch with
|
| Latest commit: |
de7749a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ad00d34f.edgewatch-cpd.pages.dev |
| Branch Preview URL: | https://feat-high-cost-approval-visi.edgewatch-cpd.pages.dev |
crypt0rr
force-pushed
the
feat/high-cost-approval-visibility
branch
2 times, most recently
from
October 7, 2026 17:01
2d21209 to
21b2677
Compare
…duled runs - An operator's scope edit on an approved job lists the cleared high-cost approval in the scope-change confirmation, with whether the new scope exceeds the probe budget, and the save response reports high_cost_approval_cleared. - Job responses include scan_budget: whether the estimated work exceeds the unit's probe budget and whether a high-cost approval would let it run. The job page warns when scheduled scans are skipped for it. - A scheduled run that its probe budget stops before it starts records a scan-budget-exceeded event, delivered to the job's destinations and shown in Activity as Scheduled scan skipped. It is reported once per scope and budget, and again after a scan of the job has run. Fixes #1223
crypt0rr
force-pushed
the
feat/high-cost-approval-visibility
branch
from
October 7, 2026 17:13
21b2677 to
de7749a
Compare
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.
Summary
Makes high-cost approval and probe-budget refusals visible (#1223). Before this change an operator's scope edit could silently clear an administrator's approval, and from then on every scheduled run was refused before a scan record existed, with nothing in history, Activity or notifications.
Approval cleared on a scope change
rebaseline_confirmation_required,details.changes) now includes "high-cost approval: cleared; an administrator must approve the new scope again". It adds whether the new scope exceeds the probe budget, with the estimate and limit, or that it fits without the approval.high_cost_approval_cleared: true.Budget state on the job
GET, create and update responses for a job now includescan_budget:exceededestimated_probesandlimitapproval_would_fit: whether an administrator's approval would let the job run.Scheduled budget skips are recorded
scan-budget-exceededevent. It goes into the outbox for the job's destinations, is published live, and appears in Activity as Scheduled scan skipped in the warning tone.BudgetSkipAlertKey(scope hash and budget) in the job's runtime state stops an hourly job from alerting every hour.Docs: the scanning guide covers budget refusals, the job-page warning and approval clearing; the notifications guide lists the new alert.
Compatibility
scan_budgetandhigh_cost_approval_clearedin job responses;changeslist;scan-budget-exceededevent type and notification.Validation
gofmt,go vet ./...go test -raceforinternal/app,internal/engine,internal/modelandinternal/web.npm run lintnpm --prefix docs run buildNew tests:
internal/app/budget_skip_test.go: a scheduled over-budget run records one delivered and published event; a repeat records nothing; after a scan runs, the next skip is reported again.internal/web/high_cost_visibility_test.go:high_cost_approval_clearedandscan_budgetwithapproval_would_fit;Fixes #1223