Repository navigation
feat: public status page on GitHub Pages, and a cost alert - #5
Merged
Merged
Conversation
`python -m voltcast status` reads the live record into status.json and renders one self-contained page: whether tomorrow's forecast is out, the latest scored day against the cleared price, the next forecast, rolling error per model, what's deployed, and the AWS bill. It uses inline CSS and SVG, a table behind every chart, and dark mode. Only live forecasts appear. A scheduled workflow rebuilds it after the deadline check and after scoring, using a read-only role that sees only published results. The bill comes from a new account-wide AWS Budget, voltcast-monthly. Its API is free, unlike Cost Explorer's. The budget also emails on-call when actual or forecast spend passes 5 USD, so the cost line in the promise table is now enforced. ADR 6 records the choices.
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.
Second half of roadmap phase 2: a public page showing what voltcast promised, what happened, and what it cost. With this, phase 2 is done.
The page
python -m voltcast statusreads the live record intostatus.jsonand renders one self-containedindex.html:It has inline CSS and SVG and no external assets. Every chart has a table view, a hover and keyboard read-out, and a direct label at each line end. Dark mode uses its own validated palette, and the layout holds at 375px wide. Only live forecasts appear; the backfill replay stays in
voltcast report.I checked it with headless Chrome in light, dark and phone width, against the real S3 data and a 30-day sample.
Hosting and access
.github/workflows/status.ymlafter the 10:15 deadline check and after 14:30 scoring, and on changes to the page code. Pages is already enabled with Actions as the source, and onlymainmay deploy to it.github-actions-voltcast-status(already applied inaws-oidc-bootstrap) is read-only and trusted frommainonly. It readspublished/,scores/andcurated/, decrypting through S3 only, and views the budget. It can't read raw snapshots or unpublished challenger forecasts, and it can't write anything. I checked this with the IAM policy simulator (14 allow/deny cases) and Access Analyzer.Cost alert
The new
aws_budgets_budget.monthly(voltcast-monthly, 5 USD, account-wide) emails the alert address on actual or forecast spend above 100%. The status page reads the same budget through the free Budgets API; Cost Explorer would add 0.30–0.60 USD/month. The plan and apply roles have the matching budget permissions. ADR 6 records the decisions.Expected plan on this PR
aws_budgets_budget.monthly: created. The notification blocks show as sensitive because of the email.aws_lambda_function.pipeline: new code hash, because the package now includesstatus.pyandpage.py. The pipeline's behaviour doesn't change.After merge
The deploy run creates the budget, and the status run publishes the page at https://dhamsey3.github.io/voltcast/. The bill tile shows "–" until AWS's next daily billing update fills the budget's spend.