Repository navigation
Preserve deployed env values on redeploy and accept quoted config - #197
Conversation
Fix SM-8 and SM-9 in deploy.sh: - SM-8: Query live Cloud Run app service for DICTATION_ENABLED before falling back to default 1 when omitted in config.txt, ensuring explicit disabled (0) states are preserved across redeployments as documented in README.md and DEVELOPING.md. Precedence is config.txt > deployed value > default 1. - SM-9: Update preflight regex to allow double-quoted config variable values per config.template.txt instructions while continuing to reject empty values (e.g. PROJECT= and PROJECT=""). Clarify error message that double quotes should be used when wrapping values. NOTE: The live deployment currently has only revision `00001`, so this bug is armed but has not fired yet. This PR should merge before the next redeploy.
|
Readability review is not required. |
- Distinguish service-absent (default 1) from transient describe/list failure (fail closed and abort). - Use gcloud native format filter without regex matching on rendered output. - Add test_dictation_env_preservation_precedence_and_failure_modes covering config wins, live 0 preservation, service absent, describe failure, and list failure. - Add test_config_validation_regex_accepts_quoted_and_rejects_empty covering quoted, unquoted, and empty values.
|
Still need readability approvals from:
|
- Verify that the full env list from an existing app service is non-empty before interpreting an absent DICTATION_ENABLED as deliberate. - If full env extraction returns empty, fail closed with an actionable error. - Add test coverage for full-env extraction empty (aborts) and full-env non-empty with DICTATION_ENABLED absent (defaults to 1).
|
Still need readability approvals from:
|
|
Still need readability approvals from:
|
|
Still need readability approvals from:
|
|
Still need readability approvals from:
|
PR #197 — P2 — first-deploy lookup precedes API enablementReviewed head: Please defer the omitted- The new This conclusion comes from script ordering plus the existing list-failure test, not a live fresh-project deployment. The exact gcloud extraction formats were separately checked offline for Acceptance: first deploy with the optional flag omitted reaches default |
Review: needs rework — the probe runs too early in the scriptMulti-agent review (reviewer → independent critique agent re-verifying each claim against the code). Findings below survived verification; rejected recommendations are listed explicitly. What's good first: the tests are not source-text greps — they extract the real block from Caution Blocker: breaks the first deploy on a fresh projectReal line numbers on the merge result:
So the probe queries Cloud Run ~140 lines before the API is enabled, and ~85 lines before the operator has confirmed which project they're deploying to. The new code is fail-closed — the test suite pins this exact path ( Recommended fix
Additional finding: the widened config regex now accepts whitespaceThe new pattern REGION="us central1"now passes config validation and fails later inside a Related, and deliberate as far as I can tell: Stale doc
Explicitly not recommended
|
Consolidated ReviewVerdict: Fix one blocker, then merge. This reconciles the 19:29 and 19:50 comments on this PR against head Do before merge
Optional, does not block
Rejected or superseded, do not re-litigate
Evidence
Way forward
|
|
Still need readability approvals from:
|
Follow-up on Consolidated ReviewI addressed the required ordering fix and the accepted optional cleanup from the Consolidated Review on head
Verification: Current-head GitHub CI is complete: Python 3.11/3.12/3.13, UI build/lint/tests, deploy checks and security scans passed. Conditional zizmor jobs were skipped. |
|
Still need readability approvals from:
|
1 similar comment
|
Still need readability approvals from:
|
Summary
Preserve the deployed app's
DICTATION_ENABLEDvalue when it is omitted fromconfig.txt; use1when no deployed value exists. Explicit config takes precedence. The live lookup now runs after deployment confirmation and API enablement, so a first deployment can enable Cloud Run before querying it. Invalid explicit values still fail before provisioning, and failed or malformed live queries still stop deployment.Config validation accepts double-quoted values while rejecting empty or whitespace-containing values. The development guide now describes redeploy inheritance accurately. Addresses SM-8 and SM-9.
Validation
test/test_deploy_safety.py: 59 passed, including a first-deploy ordering regression and quoted-value checks.bash -n deploy.sh,shellcheck --severity=error deploy.sh, andgit diff --check: passed.