Skip to content

feat(cli): verify current managed deployment acceptance - #4492

Merged
yannickmonney merged 1 commit into
mainfrom
feat/deployment-acceptance
Oct 7, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
feat/deployment-acceptance

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

A completed Ready receipt records a deployment, but does not prove what is serving now or whether its migration ledgers still match the released source. Add tale --json deploy accept for an exact managed bundle, CLI/orchestrator commits and expected stable version. It verifies current runtime custody, immutable images and OCI version/source, canonical-origin health, and all three complete migration ledgers under the existing deployment lock, then rereads identities and Ready before returning one typed receipt.

Preparation records the exact source-derived SQL and TypeScript migration inventory in the verified bundle. Existing bundles remain deployable; acceptance refuses bundles without that inventory. Reads have explicit process, byte and whole-operation bounds, with owned process-group cleanup. The command does not apply configuration, migrate data or resolve deployment secrets.

Validation:

  • Normal bun run check: 49/49 tasks; CLI 2,491 passed, 29 existing skips, no failures. SAST, Knip, manual and type checks passed.
  • Real disposable PostgreSQL proof executed the maintained bounded queries twice against all current app/private/public ledgers; extra and malformed ledger entries were refused. Checks now runs the same reader after native backend integration.
  • Focused refusal/race tests cover identity, Ready, OCI/version, ledger, deadline and output failures; actual subprocess tests prove child/descendant cleanup. EN/DE/FR docs were rendered and checked.
  • Independent source review approved the exact committed diff. Hosted architecture/integration checks remain pending.

The source-contract descriptor includes the added mandatory integration step. Ops must review its new canonical digest before a future release can auto-adopt it. The separate Ops receipt wrapper/cohort consumes this maintained CLI capability; this PR does not activate a rollout or change any release tag.

@yannickmonney
yannickmonney merged commit 2708481 into main Oct 7, 2026
@yannickmonney
yannickmonney deleted the feat/deployment-acceptance branch October 7, 2026 16:01
@yannickmonney

Copy link
Copy Markdown
Contributor Author

REQUEST CHANGES — independent API-only post-merge review (C10 / TALE-1133).

I did not implement this change. Reviewed head cf1f441218ac57cac5847ec515d4b9337bbcc217, merge 2708481459478dbfd6b9af1881a8b45861c69028, API base 82cedad75306ed4035cb2ae239af1e3f7b3fad79. Merge time: 2026-10-07T16:01:52Z. This review is source analysis and hosted evidence, not a production deployment observation.

  1. P1 — version-only public health can accept a different serving deployment. tools/cli/src/lib/deployment/acceptance-health.ts:20–45 accepts any HTTP 200 containing exactly {status:"ok",version:expectedVersion}. The local container/image/ledger checks bind the selected bundle, but nothing binds this remote response to those containers, their source, or their deployment identity. services/platform/server.ts:850–859 supplies only a process environment version, and the acceptance serving schema has no deployment/source identity. With a healthy selected local runtime and DNS/proxy routing the canonical origin to a different installation running the same version, all checks still succeed and the receipt reports the selected deployment's source alongside the unrelated response. This is a false acceptance for the exact current managed deployment. Bind the origin readback to the selected runtime/deployment using a maintained non-secret identity/proof contract (and verify the public API path as appropriate), or explicitly narrow the receipt/command contract so version reachability cannot authorize exact serving adoption. Add an old-fails/new-passes regression for a different installation with the same version. The existing success fixture deliberately accepts an independent version-only response, so it does not cover this refusal.

  2. P2 — the documented whole-operation time bound is not enforced during bundle I/O. acceptance.ts:108–150 starts a 120-second deadline but checks it only around external observations and at completion. withFrozenDeployment performs full verification, copying and another verification first (bundle.ts:188–239) without that deadline or cancellation; cleanup is also awaited outside the final check. Its existing size limits allow a bundle up to 2 GiB. Slow/stalled bundle storage can therefore leave this supposedly bounded read command waiting beyond 120 seconds; eventual refusal at the first Docker call does not bound elapsed time. This is a new caller using the existing helper, not a new defect in deployment application. Carry a bounded/cancellable observation budget through this preparation path, or narrow the documented timeout to the external observation phase and separately specify/admit preparation resources. Add a regression with delayed bundle preparation; the current deadline test advances time during Docker only. Update EN/DE/FR claims and the "only lock metadata changes" wording to acknowledge the owned temporary copy.

Repair decision: follow-up PR required; no immediate revert recommended because this is an additive, opt-in command and no rollout/tag is changed. Do not use its current success as exact-origin serving/adoption proof until finding 1 is independently resolved.

CI at merge: YES, all seven head aggregators were SUCCESS before 16:01:52Z, bound to the exact head. No red/missing head aggregator; no failure triage, rerun or cancellation required.

Aggregator Head result Completed UTC before merge Check ID
CI ready (Build) SUCCESS 2026-10-07T15:59:40Z 112885261365
CI ready (CLI) SUCCESS 2026-10-07T15:57:12Z 112884129079
CI ready (Checks) SUCCESS 2026-10-07T15:54:54Z 112883053716
CI ready (Commitlint) SUCCESS 2026-10-07T15:48:18Z 112879383976
CI ready (E2E) SUCCESS 2026-10-07T15:52:46Z 112882044779
CI ready (SAST) SUCCESS 2026-10-07T15:52:51Z 112882077961
CI ready (Security) SUCCESS 2026-10-07T15:49:18Z 112879574146

Merge-commit snapshot: 49 checks, with queued/running work; Commitlint aggregator skipped on the main event and the remaining terminal aggregators not yet materialized in this snapshot. No observed red check. These later jobs do not alter the head-at-merge result. Fleet owns subsequent ordinary-main CI reconciliation; this review did not poll or claim pending work passed.

Part B, source of truth and positive coverage: preparation reads committed migration filenames at the runtime revision, using the backend's shared SQL/numbered-TS predicate. Acceptance verifies the frozen bundle's file hashes and exact CLI/orchestrator pins; requires the matching private Ready receipt and no pending deployment; reuses runtime custody, mount/environment/file identity, architecture, network, complete topology/health and immutable repository-digest checks; checks Tale OCI source/version and running image IDs; reads all three complete migration ledgers through fixed read-only transactions; then rereads runtime identities/restarts, ledgers and Ready bytes. Missing, extra, duplicate, malformed, oversized or mismatched evidence refuses; legacy bundles stay deployable but cannot be accepted without inventory. Ready age alone is not a current PASS: current observations are required, and receipts remain point-in-time evidence, not a future freshness guarantee. No version-only release/source tag is treated as served version. The public-origin binding limitation is finding 1.

Each external process is limited to 15 seconds / 1 MiB, aggregate capture to 16 MiB; health uses an abort signal up to 10 seconds / 64 KiB, refuses redirects and wrong/malformed responses, and omits credentials. Subprocess failures are silenced and reduced to fixed messages; the typed receipt excludes raw Docker output, environment and tokens. SQL is fixed, uses local sockets and existing container credentials, bounded read-only statements, and emits ledger identities only. Unexpected errors pass through the existing operational redaction path. The total-time qualification is finding 2.

Regression / hosted evidence: inspected acceptance drift/legacy/pending/lock/OCI/image/race tests, malformed ledger readers, source inventory tests (including dirty-source exclusion and SQL/TS parity), CLI inherited-option/help tests and actual subprocess timeout/byte/descendant-cleanup fixtures. These protect new behavior and would fail if it were absent or refusals removed; they do not prove finding 1 or preparation cancellation. Backend integration job 112879062636 actually emitted a successful deployment-acceptance-ledgers receipt at 15:53:33Z for PR synthetic merge checkout b4d26e5add16db005b05098394893a9e5783340e, with app/private/public counts 152/6/8. This is real fixture evidence, not live Ops proof or direct execution at the head SHA. Unit workspaces job 112878979881 is green; do not infer every test executed freshly from its terminal status. No local tests/install/build/stack were run.

Part A / release consistency: help names a read command, requires expected stable version and exact source pins, uses standard JSON/exit handling and rejects inherited deployment effects; self-version alignment exemption follows other managed commands. README and EN/DE/FR docs describe matching inputs, legacy refusal and repeat-for-freshness. Their exact acceptance and 120-second claims need the fixes above. CI scope and candidate descriptor include the mandatory real ledger-reader step; .github/RELEASING.md requires independent Ops review of the changed canonical descriptor before adoption. This source review neither supplies that unavailable private proof nor authorizes release/deployment.

Per-topic dispositions (source review unless stated otherwise):

Topic Disposition Reason
CODE FAIL Findings 1–2; otherwise coherent reuse of managed contracts
SECURITY PASS Fixed read-only SQL, no credential export/redirect, redacted output; no new tenant-data writes
DEPLOYMENT FAIL Finding 1 prevents exact-origin adoption proof; private live Ops proof UNAVAILABLE in this Tale-only slice
PROVIDERS FAIL Docker/HTTP seam reviewed; version-only remote identity remains insufficient (finding 1); no model/provider grant changes
CICD PASS Seven exact-head gates green before merge; mandatory integration step and descriptor updated; merge CI still pending
DOCS FAIL Findings 1–2 require aligned receipt/timeout claims in all three locales
DATA PASS Complete ledger equality; read-only transactions; backend predicate extraction preserves behavior
RESOURCES FAIL Finding 2; subprocess/output limits and owned cleanup otherwise present
OBSERVABILITY FAIL Exact local identities cannot be correlated to origin response (finding 1); safe bounded failure signals otherwise present
REL-MANUAL NOT_RUN Production/manual command execution is outside coordination authorization; source/hosted regression evidence described above
UX-SIMPLICITY PASS Single read command reuses retained bundle and lock
UX-CLARITY FAIL Strong acceptance/time-bound wording exceeds evidence (findings 1–2)
LOCALE PASS Equivalent EN/DE/FR additions; repairs must preserve parity
RECOVERY PASS Pending rollout refused; legacy deployment compatibility retained; no restore/migration action added
WORKFLOW FAIL Head CI does not substitute for missing pre-merge independent review/Fleet routing; this dated post-merge receipt supplies review only
PERFORMANCE NOT_APPLICABLE No application hot-path/throughput change; observation costs assessed under RESOURCES
A11Y NOT_APPLICABLE CLI/docs prose change, no interactive accessibility controls changed
UI-RESPONSIVE NOT_APPLICABLE No layout/component/style changes; no rendered UI claims made

Native task 7a51405f-5cfa-49a7-8c7c-e88f1a147e87; reviewer agent a0f9fd03-7af6-4c69-b602-755201d86f89; review run 263c702b-48bf-433e-9fbb-d9609032f3ac. Next owner: Fleet coordination routes follow-up implementation and a distinct exact-head reviewer, retains Ops compatibility/live-proof gaps, and checks ordinary-main CI on its next dispatch. API-only; no checkout, source mutation or consuming command phase; no Ops credential used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant