Repository navigation
Conversation
Contributor
Author
|
REQUEST_CHANGES: see TC-959 |
Contributor
Author
|
APPROVE: see TC-959 |
This was referenced Oct 16, 2026
Contributor
Author
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.
Scope and review status
TC-959 workflow/config/focused-test changes. No merge or deployment authorization. Amos owns routing the completed delta to the same existing #310 Astra reviewer.
87b2a38b2ad523bf6587e3c08ef1e072138b56e77a704a10d577d5a4f9b882fa16f17666a3ebc72bd7b707e7a9d6cf68b67630da43cbeed2a41de907; no rebase.Files:
.github/workflows/docker.yml,ops/quota-overrides.json,scripts/ci/test-quota-overrides.py,scripts/ci/fixtures/tc959-n0-compose.yaml, andscripts/check-deployment-policy-probes.mjs. The fixture is an offline copy of the approved artifact, not a production compose change. No application, Rust, production compose, ingress, or production script source changes.Reviewed configuration identity
Companion #309 is approved at exact head
44eeb20a1461ef66b5af492e3be4c42be2728b67, base13cbcdcd20b4fb546754aa60d7043122ca56ed1f: Astra review comment. Its hosted acceptance run passed the 500/500 distinct fast-503 burst, continuity/privacy/isolation and cleanup gates.The independently derived raw-file SHA256 of
docker-compose.dstack-postgres.yamlat that reviewed head is:ca110b0bae6d5a06a1002fb80df3f71cffec11659c9f9dbfa5d72624735546f6For the exact N0 image, pinning verifies these raw bytes before any compose rewrite, sealed deploy or CVM mutation. No caller-supplied hash is accepted. The pin step emits
n0_configuration_verified=trueonly after successful validation; quota restoration also requires that proof. Any config/profile/line-ending change requires renewed review and a deliberate pin update. Normal non-N0:dstackimage replacement remains supported; it does not authorize this quota snapshot. The N0 digest path requires the exact approved already-pinned compose, not a tag-form substitute.Immutable promotion identity
docker-compose.dstack-postgres.yamlghcr.io/tinycloudlabs/tinycloud-node@sha256:4bdae4fc232d886bb56bfbce4ec62ed4b8fb4e1369a01f6afb73d06dd68c188f1.20.6-dstacke18578ff9162986ddd813259c60f73866e3e60d11.20.6ghcr.io/tinycloudlabs/tinycloud-node-ingress@sha256:63c1c44e2ded5b73a5f174807b91ca677826974df0f9ab3045f6ec87865a57442795437onlyThe existing digest is pulled and label-checked, not rebuilt, retagged or relabelled. Validated image labels drive outputs, summaries, served-version checks and watch messages; the checkout crate version is not recorded as the promoted image version. Ordinary builds still enforce their checkout version. Duplicate/missing native references, unrelated pins and wrong revision/version labels reject.
Event guards: merging deploys nothing
deploy-phala.ifrequiresgithub.event_name == 'workflow_dispatch',inputs.deploy_phala, successful version/cutover/history guards, no rollback audit and no cancellation. The digest path additionally requiresrefs/heads/mainand skipped node build jobs; the normal path retains its successful-build requirements. Recorded rollback revisions must remain in main history; existing ancestry and explicit non-descendant controls remain.A merge emits
push, notworkflow_dispatch: deploy is skipped, its quota steps cannot execute, and promote-watch skips a skipped deploy. Separately configured CI image builds/publishes can still run. #306's release-only nodelatest/dstackfloating-tag rules are unchanged; a manual promotion does not move them.Sealed
--validate-configruns for normal deployments and for this exact old digest even with recorded rollback labels. Unrelated older emergency images retain their compatibility skip; normal/history/ancestry guards are not bypassed.Sealed token and complete allowed_envs
Name-only mapping:
secrets.PROD_TINYCLOUD_BETTERSTACK_SOURCE_TOKEN→PHALA_ENV_BETTERSTACK_SOURCE_TOKEN→ sealed.phala-prod.envkeyBETTERSTACK_SOURCE_TOKEN.Required inputs fail before deploy.
umask 077andchmod 0600restrict the env file before values are written. CR/LF, duplicate/invalid names, empty values and CLI/SDK dotenv interpretation drift fail closed. Compose validation remains quiet; sealed CLI output is suppressed. A trap and always-cleanup remove the file; no dump or artifact upload.Existing
phala@1.1.19uses isolated@phala/cloud@0.2.9, API version2026-01-21, finite timeout and no transport retries. Before deploy and again before PATCH, every live allowed name must have a known value in the complete env file; retaining an old name cannot recover omitted ciphertext. Unknown old names block before mutation. A complete whitelist is an idempotent no-op that still verifies token presence by NAME.Otherwise the complete set is encrypted and PATCH contains only
encrypted_env+env_keys, never anallowed_envsinput. On-chainprecondition_requiredfails closed; no blind compose-hash retry or invented transaction proof. Contracts: updateCvmEnvs and environment-update API.After PATCH, completion requires an observed matching operation/progress or non-running lifecycle transition, then settled running status and fresh complete whitelist readback. Optional absent/null progress is supported only after observing the operation. A fast/unobserved queued update deliberately fails the deadline. SDK DEBUG is cleared; only fixed phase/status/count diagnostics appear, never raw responses/messages, exception details, values or ciphertext.
Operator sequencing risk: public docs do not establish production restart timing. Synthetic completion tests do not prove production timing; verify the last update/restart has completed before relying on health/quota restoration. Existing
--no-public-logs --no-public-sysinforemain; no TCB-visibility API/flag is added. Operator pre/post readback must preserve logs/sysinfo/tcbinfo = false/false/true.Reviewed quota restoration after the last restart
restore_n0_quota_snapshotdefaults false. Selecting the exact N0 digest without explicit opt-in rejects before mutation; opt-in also requires main-only dispatch and exact image/version/revision. Restoration additionally requires the approved compose proof. This is a reviewed snapshot, not evergreen quota policy; refresh values and authorization when TC-1161 changes them or before unrelated future restarts.In-memory overrides vanish on restart. Restoration runs inside the deploy job, after env synchronization and required version/ingress health, before Policy probes. Policy or downstream watch failure cannot skip completed restoration; no second environment approval/queue and no deploy-job
actions: writeexpansion.The repository-scoped secret NAME
PROD_TINYCLOUD_ADMIN_SECRETis used only inside Actions, as an in-memory TLS header, not argv. Before ANY PUT, authenticatedGET /admin/usagemust prove both canonical full IDs exactly once with positive known integer usage. Missing/duplicate/null/zero/unknown targets fail without PUTs. The reviewed config/runtime/tests pin the canonical Sam owner and both limits; a different owner's positive-usage spaces fail before any API request. Quota GET alone is not existence evidence.Each PUT is followed by GET verifying exact identity,
override_bytesandeffective_limit_bytes. Only transport failures receive bounded retries (three attempts); HTTP failures, including 5xx, fail. Diagnostics never dump inventory/raw responses/IDs.Limits: applications 5368709120; secrets 268721121. Applications provenance is TC-1161 D1. Secrets ID is verified by Amos via Sam's release-keys/monitoring profile metadata; its D1 parity task remains pending. No credential/profile values were requested or read.
Any attempted CVM mutation without verified quotas—including sync/health failure or a skipped restore—emits fatal OVERRIDES UNVERIFIED in the job and summary. Authorized TC-1161/internal storage emergency-button intervention remains the fallback.
Profile/privacy compatibility
The bound #309 bytes default to
errors_slow: valid status >=400 OR nodelatency_us > 1000000/ ingressrequest_time_seconds > 1.0. Equality alone does not qualify.all_requestsis explicit; valid typed WARN/ERROR diagnostics remain eligible under either profile as fixed-code occurrence counts. Fresh allowlisted objects exclude raw messages/errors, targets, spans, SQL, URI/query values, headers, bodies, credentials and identities; malformed/plaintext/oversized records retain the documented rejection/transport limitations.The node/ingress json-file→GELF cutover disables raw Docker caching; loopback UDP is nonblocking and best-effort. Vector uses the reviewed bytes-decoder/privacy boundary, not an unsafe raw fallback. Production delivery/volume/privacy checks still belong to the authorized operator.
Conditional operator command — NOT EXECUTED
Only after #310 delta approval, both reviewed changes are merged without artifact drift, current-main/history/cutover checks pass, quotas are freshly authorized and a named operator is approved:
All 11 inputs remain unchanged from the reviewed packet. No dispatch was executed.
Rollback means redeploy Amos's captured pre-N0 compose, not merely select the unchanged image:
/home/tinycloud/scratch/tc959-n0-release/rollback-compose.yaml, recorded raw SHA256df239749ca0a9c09893a855ae2a8abb94090b8556515ad002105c58ac91f4c91; Amos must revalidate it. Its json-file/raw-retention consequence requires an explicit privacy decision.restore_n0_quota_snapshot=trueauthorizes only the bound N0 artifact; it is NOT a bypass for the pre-N0 compose. False/omitted opt-in also cannot bypass the N0 digest guard. A separately reviewed/authorized rollback path and quota restoration/fallback decision are required; do not reuse this promotion command as a rollback command. TC-1302 rollback remains gated by that operator packet.Exercised verification
:dstackstill passes. Quota gating rejects absent/false compose proof.set -euo pipefail.actionlint v1.7.12 -shellcheck= -pyflakes= .github/workflows/docker.yml: clean; external shellcheck/pyflakes plugins not exercised.Exact-head CI and remaining gates
All runs below belong to
87b2a38b2ad523bf6587e3c08ef1e072138b56e7and are successful. Final API rollup: 19 terminal checks — 10 success, 9 intentional skips; zero failing or pending. API head/base unchanged.Amos owns routing this completed delta to the same existing #310 Astra reviewer. No new reviewer, merge or deployment is requested here. Operator gates remain: refreshed Sam quota authorization, complete sealed-name inventory, last-update/restart settlement, privacy readback, signed read/write/dense-watch proof, measured volume allowance and counts-only/forbidden-field verification in source 2795437.