Skip to content

template: validate document schemas before touching disk images - #954

Draft
zibi-pplx wants to merge 1 commit into
pr949from
pr954
Draft

zibi-pplx wants to merge 1 commit into
pr949from
pr954

Conversation

@zibi-pplx

@zibi-pplx zibi-pplx commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Template registration and raw import could expand a disk before rejecting its unsupported metadata schema. Validate metadata and manifests before registration copies, import staging, cache expansion and export. Malformed documents fail instead of being normalized into legacy defaults.

This is the reader prerequisite for firmware guest images. It does not enable those images: version 4 remains unsupported at this commit. Deploy this guard before producing new-schema images, and retain it as the rollback floor while those images exist.

Validation

On an isolated copy of this commit's pre-enable sources, all eight rootfs-cache tests passed. The new unsupported-schema regression fails against the previous expansion implementation, which attempts filesystem work instead of rejecting the schema. The guarded implementation leaves the disk bytes unchanged for unsupported metadata and manifests. Seventeen template import tests also passed using temporary Unix sockets. These macOS checks do not qualify Linux filesystem tools. Formatting passed. Full workspace checks remain for CI.

Severity and risk

Unsupported disk images could be modified before refusal. Existing valid Linux template handling is preserved; malformed or unsupported documents now fail earlier, including idempotent import retries.

Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the guard and regression coverage and drafted this description.


Stack created with Sapling. Best reviewed with ReviewStack.
Base: #960, the separate Cloud Hypervisor CPU execution stack.

@zibi-pplx
zibi-pplx changed the base branch from main to pr949 October 26, 2026 00:06
@zibi-pplx
zibi-pplx added this pull request to stack #951 October 26, 2026 00:06
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused. See #919 for the complete rollout groups.

AI assistance: Codex implemented the scenario, documentation and this description.
@zibi-pplx
zibi-pplx removed this pull request from stack #951 October 26, 2026 03:02
@zibi-pplx
zibi-pplx added this pull request to stack #963 October 26, 2026 03:04
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused. See #961 for the complete rollout groups.

AI assistance: Codex implemented the scenario, documentation and this description.
@zibi-pplx
zibi-pplx removed this pull request from stack #965 October 26, 2026 19:51
@zibi-pplx
zibi-pplx added this pull request to stack #983 October 26, 2026 19:51
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
@zibi-pplx
zibi-pplx removed this pull request from stack #983 October 26, 2026 23:46
@zibi-pplx
zibi-pplx added this pull request to stack #990 October 26, 2026 23:47
zibi-pplx added a commit that referenced this pull request Oct 26, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
zibi-pplx added a commit that referenced this pull request Oct 27, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
zibi-pplx added a commit that referenced this pull request Oct 27, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.
@zibi-pplx
zibi-pplx removed this pull request from stack #990 October 27, 2026 06:01
@zibi-pplx
zibi-pplx added this pull request to stack #999 October 27, 2026 06:02
## Summary

Template registration and raw import could expand a disk before rejecting its unsupported metadata schema. Validate metadata and manifests before registration copies, import staging, cache expansion and export. Malformed documents fail instead of being normalized into legacy defaults.

This is the reader prerequisite for firmware guest images. It does not enable those images: version 4 remains unsupported at this commit. Deploy this guard before producing new-schema images, and retain it as the rollback floor while those images exist.

## Validation

On an isolated copy of this commit's pre-enable sources, all eight rootfs-cache tests passed. The new unsupported-schema regression fails against the previous expansion implementation, which attempts filesystem work instead of rejecting the schema. The guarded implementation leaves the disk bytes unchanged for unsupported metadata and manifests. Seventeen template import tests also passed using temporary Unix sockets. These macOS checks do not qualify Linux filesystem tools. Formatting passed. Full workspace checks remain for CI.

## Severity and risk

Unsupported disk images could be modified before refusal. Existing valid Linux template handling is preserved; malformed or unsupported documents now fail earlier, including idempotent import retries.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the guard and regression coverage and drafted this description.
zibi-pplx added a commit that referenced this pull request Oct 27, 2026
## Summary

Add an opt-in typed Windows scenario that creates its own sandbox, checks RDP NLA negotiation, stops and starts with the persisted contract, and deletes its resources. Poll asynchronous lifecycle state so the RPC wait budget does not truncate Windows shutdown. The fixture refuses manager restarts and device fault injection under the firmware-only opt-in.

Document firmware staging, local opaque-image import, required Windows drivers and clock settings, deployment order, native SSH and fenced serial/RDP access. Evaluation disks and credentials stay outside the repository.

## Validation

- Preserve the native process exit-retention smoke guidance alongside the standalone Windows lifecycle scenario. This rebase changes documentation only in this PR; no live Windows test was rerun.

All 31 smoke framework tests passed. The standalone hardware run passed create, RDP negotiation, stop/start with a new execution identity, deletion and node-lease cleanup, with no cleanup failures. RDP negotiation alone is not authenticated user access; native SSH was checked separately. Agent refusal before wake is covered by the sandbox-manager guest-image tests.

## Severity and risk

Severity does not apply to this explicit development test. The scenario requires an operator-supplied host and machine identity, template digest and environment reference. It cleans only its own sandbox and does not restart shared services or allocate GPUs.

## Stack

Windows guests. #954 is a separate reader-guard deployment before #955–#959 enable opaque images. Keep that guard as the rollback floor. #955 supplies the SQLite schema before its readers/writers; deploy the matching supervisor before node/build/template/sandbox managers. Firmware guests remain opt-in, standalone and locally imported; export, pull and cross-node distribution stay refused.

AI assistance: Codex implemented the scenario, documentation and this description.

This branch has not been deployed

No deployments
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