Conversation
2 tasks
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.
Fixes #681
Same-repository draft PR check
PolicyEngine/policyengine-sim-api, not a personal fork.Summary
.pybundle metadata.STAGE12_ENABLED=1, automatically submit a temporary comparison run after a supported production annual society-wide report is accepted.Configuration and deployment behavior
STAGE12_ENABLEDis the only Stage 12 execution setting:0: automatic Stage 12 runs are disabled and direct Stage 12 POST submissions return HTTP 503 before any database write or Modal invocation;1: every supported newly accepted annual society-wide report starts a Stage 12 run, and authenticated direct submissions are accepted; andThe authenticated Stage 12 status route remains available for existing runs whenever its resources are configured. The
betaandprodGitHub environments both currently defineSTAGE12_ENABLED=0. Stage 12 workers and the separate v2 manifest remain deployed when execution is disabled. Changing the value requires another Cloud Run deployment and does not change the existing production forwarding destination.Cloud Run and the Modal v2 application use the same environment-specific restricted PostgreSQL runtime credential. Cloud Run uses it only for temporary status reads. The Modal report coordinator owns all temporary parent and child writes. Neither runtime receives schema-migration permission.
Deployment dependency
PolicyEngine/policyengine-api#3842 must merge and its additive v2 Alembic revision must run before this PR merges because this runtime writes the new comparison-result columns. Deployment reads the configured database's schema metadata and exercises
comparison_statusinside a rolled-back canary transaction, so a missing migration fails before the Cloud Run revision is promoted. The production restricted database URL secret and environment configuration must also pass deployment validation. This PR does not require or perform a public traffic transition.Testing
git diff --checkThe repository-wide contract and executor Pyright commands still report pre-existing errors in unrelated modules and deliberately invalid test inputs; the changed source modules pass focused type analysis.