Repository navigation
Conversation
kvinwang
force-pushed
the
codex/core-components-test-infrastructure
branch
from
July 31, 2026 03:34
7a21a97 to
313efb9
Compare
kvinwang
changed the base branch from
codex/core-components-product-fixes
to
master
July 31, 2026 03:34
This was referenced Jul 31, 2026
Signed-off-by: Kevin Wang <wy721@qq.com>
Since #1533, KMS key release verifies a TDX caller's OS image. The SDK simulator replays a captured legacy quote whose image (e61be43d...) was never published, so every simulated KMS client failed at the image download. Derive the KMS fixtures' simulator files with the candidate dstack-tee-simulator instead: it computes the quote measurements from the lite tdx_measurement document of the verifier fixture, the same way the verifier does, and the captured RTMR3 events are replayed on top. The verifier then takes the lite path and downloads nothing. The simulator runs in a private user and mount namespace because the TDX ABI paths under /sys are fixed. Signed-off-by: Kevin Wang <wy721@qq.com>
The simulator vm_config is longer than 127 bytes, so the single-byte length prefix rejected it before any request was sent. Signed-off-by: Kevin Wang <wy721@qq.com>
tc-int-compatibil-009 seals an app's env at root epoch 0, rotates the KMS to epoch 1, and checks on physical TDX that the guest: - unseals with the historical key once and reseals to the current epoch, then fetches no historical key on later boots; - rejects an envelope labeled above the current epoch before requesting any historical key; - fetches the key a forged epoch label names and then fails to decrypt. The epochs a boot requested come from the guest console, cross-checked against the KMS app-key release counter. deploy_client also accepts a SealedEnv deployment, whose epoch signer the VMM CLI verifies silently. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
codex/core-components-test-infrastructure
branch
from
November 11, 2026 14:03
e7743dc to
fcc4e6c
Compare
Since #1564 a KMS refuses to start without a key handover path, and the default config enables the admin listener with TLS at /etc/kms/certs. - The isolated KMS fixtures serve admin TLS with their own RPC key and certificate, so their admin URLs are https. - tc-kms-onboard-005 no longer adds admin TLS before disabling the public handover; the fixture already has it. - tc-kms-startup-001 calls the target's admin listener over https. - Drop the public_key_handover line this branch added to the full-stack KMS config; #1564 added the same key there. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
codex/core-components-test-infrastructure
branch
from
November 11, 2026 14:03
06ba15a to
6332786
Compare
The guest agent's external listener now grants nothing anonymously unless the host lists scopes in sys-config. The Worker cases check that an anonymous call is refused, then mint a token the way an app may: they sign it with the internal issuer key from GetKey on the internal socket. An unknown route on that listener is refused with 401 before dispatch, so it no longer returns a pRPC error body. Signed-off-by: Kevin Wang <wy721@qq.com>
- Key release verifies the guest's OS image, and the case-scoped KMS had no image to download. Link the candidate images from the image store into its image cache by digest. - The VMM CLI seals env only to a pinned KMS signer; pin the signer the KMS serves, in a lease-scoped whitelist. - Bind vm_root_path before the deploy so a failed deploy reports its error instead of an UnboundLocalError. Signed-off-by: Kevin Wang <wy721@qq.com>
dstack-util's crypto module now also uses hpke, base64 and serde_json. Signed-off-by: Kevin Wang <wy721@qq.com>
The dashboard model replaced the public_* switches with per-caller show_* flags; the probe no longer compiled, so every check reported false. Signed-off-by: Kevin Wang <wy721@qq.com>
- The simulator fixtures grant anonymous callers what the candidate's sample vmm.toml grants (dashboard, version, health, info), as a host deployed from that sample does. - Move token minting into guest_api_token.py. The contract matrix and the robustness harness present a token on the Worker listener for the scopes the sample leaves closed (attest-app-key, logs, containers). - An unknown method on that listener is refused with 401 before dispatch; the contract matrix checks that instead of a pRPC error body. Signed-off-by: Kevin Wang <wy721@qq.com>
c25e974 removed [core.image] verify: the KMS always verifies, ignores a leftover key, and GetMeta.os_image_verification always reports true. Check that instead of mirroring the removed switch, and drop the ignored key from the candidate KMS fixtures. Signed-off-by: Kevin Wang <wy721@qq.com>
The verifier caches each measurement as measurements/<config>.json, so a directory named after the config hash is never a cache entry and a targeted clear leaves it in place. Signed-off-by: Kevin Wang <wy721@qq.com>
The runner now rejects a PASS result without an all-PASS step, which turned tc-kms-rotation-014 into INCOMPLETE. Report a step from the rotation-013/014/015 harnesses. Also, for rotation-013, track the renamed LUKS and SealedEnv tests and match each name exactly; for rotation-015, keep a failing suite's output and report a summary matching its status. Signed-off-by: Kevin Wang <wy721@qq.com>
The suite grew from 8 to 14 tests; an exact count made the case fail on every addition while it only needs to catch a filter that runs fewer. Signed-off-by: Kevin Wang <wy721@qq.com>
Since #1533 the KMS asks a webhook /authorizeApp for an AuthorizationResult that carries the registered root epoch; a bootAuth-shaped reply is not accepted, and an unregistered root epoch refuses to serve. The mock authority now registers the KMS's own keys as root epoch 0 and answers in that shape. Signed-off-by: Kevin Wang <wy721@qq.com>
3937f527 removed dstack/kms/dstack-app/docker-compose.yaml; the dev compose that replaced it builds no Rust, so three locked builds remain. Signed-off-by: Kevin Wang <wy721@qq.com>
The runner rejects a PASS result without an all-PASS step. Count a row as passed only when its test ran and passed, so a failing last row no longer reports PASS. Signed-off-by: Kevin Wang <wy721@qq.com>
A current KMS asks its webhook /authorizeKms|App and accepts only an AuthorizationResult; KMS 0.5.x still asks /bootAuth. Serve both from the same policy and observation log. Signed-off-by: Kevin Wang <wy721@qq.com>
Since #1561 the management scripts take ROOT_EPOCH or a range instead of writing implicit rows. Signed-off-by: Kevin Wang <wy721@qq.com>
The KMS now always verifies a guest's OS image, so a candidate KMS must download the old guests' images too. Archive each matrix image once into a shared cache and serve all of them. Signed-off-by: Kevin Wang <wy721@qq.com>
The VMM CLI seals a SealedEnv-capable image's env only to a pinned KMS epoch signer, as it already does for clients. Signed-off-by: Kevin Wang <wy721@qq.com>
vitest needs node:util.styleText; prefer the newest Node on PATH or from fnm instead of the host default. Signed-off-by: Kevin Wang <wy721@qq.com>
The guest API now grants anonymous callers only the scopes the host lists. Lease VMMs extend the sample grant with the blocks the observability cases read, a host decision equivalent to naming an issuer for them. Signed-off-by: Kevin Wang <wy721@qq.com>
A KMS behind a webhook serves only a registered root epoch. The matrix registers each webhook-backed candidate KMS, and an onboarded target, as epoch 0 of its context; the fixture webhook reports it. Share the chain hash with the upgrade-authority case. Signed-off-by: Kevin Wang <wy721@qq.com>
A SealedEnv deployment stores its envelope in configuration.sealed_env, leaving encrypted_env empty. Signed-off-by: Kevin Wang <wy721@qq.com>
A current KMS reads GET /app/<id> before it serves an app's keys. Signed-off-by: Kevin Wang <wy721@qq.com>
This branch has not been deployed
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.
Summary
This PR adds the core-component acceptance suite and organizes the complete suite directly under
test-suites/so specifications, automation, fixtures, inventories, manifests, and retained audit evidence have one clear home.dstack-testrunner, dashboard, registry validation, fixture providers, and component harnesses.case.mdspecifications asrun.py,run.sh, orrun.cjs.shared/automation/.metadata.jsonas the authoritative case-to-entrypoint binding.shared/fixtures/, inventories undercatalog/, environment manifests undermanifests/, and retained historical evidence underaudit/.Layout
Separation invariant
The PR targets
next. Its changed paths are limited to:REUSE.tomldocs/testing/**test-suites/**There are no product/runtime or source-local test changes under
dstack/**oros/**.Verification
prek run --all-files: passedreuse lint: passedgit diff --check origin/next...HEAD: passedRebase and tdxlab validation (2026-09-25)
nextat0fb3b24bbd, reviewing the 131 PRs merged sincee2cf39ae01. The per-PR mapping is intest-suites/audit/core-components-next-rebase-audit-2026-09-24.md.Admin.ImportCertreplacing the file-configured proxy certificate (refactor(gateway)!: replace the file-configured proxy certificate with Admin.ImportCert #1239), ZT-domain normalization (fix(gateway): normalize the domain in the remaining ZT-Domain admin RPCs #1356), image download retries (fix(verifier): retry transient image download failures #1388), collateral host allowlist (fix(pki-fetch): fetch certificate-named collateral only from allowlisted hosts #1404), setup-header layout (fix(os): normalize the kernel setup header to QEMU's layout, not zeros #1229), hotplug-off for GPU topologies (fix(vmm): turn PCI hotplug off by default and require it off for GPU passthrough #1387), and others.tc-kms-onboard-005,tc-gw-admin-037), andtc-vmm-vmm-021,tc-vmm-vmm-022andtc-vmm-compute-ne-006are retired with the registry pull. The suite now holds 373 cases, 372 of them scripted.Physical TDX (tdxlab, 4 workers, 372 scripted cases)
next(+ #1409 so images build)next635e7a2200+ #1414 + #1415The BLOCKED cases need an NVIDIA CC GPU on the TDX host or a Yocto image. The guest-side GPU cases were run on a GCP H100 CVM (a3-highgpu-1g) booting the candidate image and passed, apart from the reboot row that led to #1410.
Product fixes found while validating, sent separately
dstack-mrCLI--hotplug-offdefault does not match the VMM default (fix(vmm): turn PCI hotplug off by default and require it off for GPU passthrough #1387).systemd-tpm2-setupleft guests degraded.2775 tss:tssat runtime.StartVmissued while QEMU was still exiting afterStopVmwas silently skipped.All of these are merged into
next; #1409 and #1413 were closed in favour of #1415.tc-kms-onboard-005, which depends on #1406, is now promoted.Local gates
Registry verification (373 total, 372 scripted, 372 promoted, 0 findings), 40 runner unit tests,
reuse lint,prek run --all-files, andgit diff --check origin/next...HEAD.Rebased onto #1534 (2026-11-08)
The branch was rebased from its actual fork point
0fb3b24bbd94c18d4af2900b41cd82bcd1c0c284onto #1534 (feat/kms-epochs-three-commits), rather than treating the currentnexttip as the source base.Added
tc-kms-rotation-013, a focused root/app key rotation lifecycle matrix covering keyring import, next-epoch generation, activation and serving, handover chain-hash checks, epoch-scoped authorization, restart recovery, disk epoch migration, and SealedEnv epoch binding. The matrix contains 14 focused Rust rows and rejects stale, forked, incomplete, or cross-epoch state.First tdxlab rotation round: 14/14 rows passed on the tdxlab host on November 8, 2026, using Rust 1.92.0 and local Cargo targets. This round exercised the focused unit matrix; it did not boot a TDX VM or perform a live KMS deployment. Registry verification reports 373 scripted, 373 promoted, 374 total cases, with no findings. Prek passed for the added and modified files.
Forward-interval coverage audit (2026-11-08)
The earlier rotation-only addition was incomplete. This revision adds:
tc-kms-rotation-013: 14 Rust rows for keyring import/generation, activation and serving, handover validation, historical epochs, restart recovery, authorization selection, disk epoch migration, and SealedEnv epoch binding.tc-kms-rotation-014: complete Foundry contract matrix for root/app epoch registration, chain hashes, activation boundaries, pending removal, evidence, owner checks, stale selectors, revocation, and upgrade compatibility.tc-kms-rotation-015: auth-simple, auth-mock, auth-eth-bun, and auth-eth backend suites for operation- and epoch-scoped authorization.The coverage audit is recorded in
test-suites/audit/pr1534-forward-coverage-2026-11-08.md. The first tdxlab Rust round remains 14/14 PASS. tdxlab currently has neither Foundry nor the backend JavaScript dependencies, so contract and backend cases are intentionally not promoted or claimed as executed there.Additional non-rotation coverage (2026-11-08)
Added
tc-int-forward-016for focused regressions from the forward interval outside key rotation: NUMA and extra-root-device measurement, VM annotations, passt/QMP behavior, guest container-name validation, RA-TLS key possession, TPM response bounds, and dstack-types serialization. The case deliberately fails on a zero-test result and records the live-vs-unit boundary.The three newly added matrix cases (
tc-kms-rotation-014,tc-kms-rotation-015, andtc-int-forward-016) remain unpromoted until their required Foundry, JavaScript, or full runtime prerequisites are available. The registry therefore reports them explicitly as pending rather than claiming execution.tdxlab execution completed (2026-11-08)
After installing Foundry 1.9.0, Node.js 22.23.4, and the locked JavaScript dependencies on the tdxlab host:
tc-kms-rotation-013: 14/14 Rust rotation and migration rows passed.tc-kms-rotation-014: 82/82 Foundry contract and upgrade rows passed (DstackKms.t.sol42,DstackApp.t.sol28,UpgradesWithPlugin.t.sol12). Foundry artifacts were cleaned between suites.tc-kms-rotation-015: auth-simple 33, auth-mock 15, auth-eth-bun 50, and auth-eth 22 tests passed under Node.js 22.23.4.tc-int-forward-016: 11/11 focused non-rotation rows passed: NUMA layouts, extra root devices, VM annotations, passt/QMP, guest container-name validation, RA-TLS key possession, TPM response bounds, and dstack-types serialization.The tdxlab host does not have a GPU or a live deployed KMS/Gateway chain in this round, so these results cover the deterministic contract, backend, Rust, and host-side matrices; live TDX VM lifecycle and deployed-chain rotation remain outside this execution round. The registry now reports 376 scripted, 376 promoted, 377 total cases, and zero findings.
Physical-TDX rotation migration result (2026-11-08)
The corrected physical-TDX harness passed
tc-int-compatibil-008on the latest runkms-e2e-20261108-fix18:The run also passed the existing physical mixed KMS upgrade path once (
tc-int-mixed-002, runkms-e2e-20261108-fix11). Earlier failures were retained as diagnostic runs while correcting test version pairing, signer pin isolation/normalization, Python SealedEnv dependencies, and the 0.6.0 image preparation.Final 0.6.0 rotation migration verification (2026-11-08)
The latest physical-TDX run
kms-e2e-20261108-fix17passedtc-int-compatibil-008:The hardware preparation script now checks
cryptography,eth_keys,eth_utils, andpyhpkebefore starting a build, so missing SealedEnv dependencies fail during preparation instead of during VM deployment.