Skip to content

Bind platform release artifacts to build provenance - #114

Merged
Pedro Henrique Penna (ppenna) merged 12 commits into
devfrom
esaurez/nvx-platform/02-provenance-20260918
Sep 19, 2026
Merged

Pedro Henrique Penna (ppenna) merged 12 commits into
devfrom
esaurez/nvx-platform/02-provenance-20260918

Conversation

@esaurez

@esaurez Enrique Saurez (esaurez) commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Produce an immutable, self-describing NVX platform release whose binaries, kernel inputs, source metadata, and legal material can be authenticated by downstream composition.

Main changes

  • Record and validate OpenVMM executable/source provenance and kernel input/output provenance.
  • Require SHA256SUMS to cover every packaged file and capture a private verified snapshot before archive creation.
  • Produce deterministic Linux and Windows archives and verify their exact inventory before publication.
  • Transfer OpenVMM binaries and provenance as separate, narrowly scoped CI artifacts.
  • Publish release assets idempotently, accepting identical existing bytes and rejecting replacement with different content.
  • Add race, tampering, restoration, archive-layout, publication, and CI contract tests.

Rationale

NVX owns distribution of the kernel and VMM. Downstream products need an immutable platform artifact with independently verifiable provenance rather than rebuilding, inferring, or trusting mutable directories. The release remains product-neutral and contains no deployment or guest-agent policy.

Validation

  • 129 NVX tooling tests and 36 focused release-integrity tests passed.
  • Python lint, formatting, and Linux/Windows type checks passed.
  • Source verification and workflow YAML parsing passed.
  • Deterministic archive, coherent source-replacement, existing-asset, and checksum-inventory regressions passed.
  • The inherited OpenVMM gitlink is unchanged.

Comment thread .github/actions/build-guest-artifacts/action.yml Outdated
@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review September 18, 2026 17:18
@ppenna
Pedro Henrique Penna (ppenna) force-pushed the esaurez/nvx-platform/01-kernel-20260918 branch 3 times, most recently from ad87797 to d9796f7 Compare September 18, 2026 21:53
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Base automatically changed from esaurez/nvx-platform/01-kernel-20260918 to dev September 18, 2026 22:14
Copilot AI balanced review requested due to automatic review settings September 18, 2026 22:27
@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/nvx-platform/02-provenance-20260918 branch from 464fe6c to 94f4a48 Compare September 18, 2026 22:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Checksum verification does not enforce complete coverage, and published archives remain mutable and nondeterministic.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds provenance-aware release packaging for NVX platform artifacts.

Changes:

  • Records and validates OpenVMM and kernel provenance.
  • Stages release trees atomically with manifests and checksums.
  • Transfers provenance through Docker builds, caches, and CI artifacts.
File Description
SOURCE-MANIFEST.json Adds OpenVMM contract metadata.
scripts/​test_nvx_tools.py Tests provenance, tampering, and publication recovery.
scripts/​nvx.py Exposes OpenVMM provenance recording.
scripts/​nvx_tools/​release.py Validates and packages provenance-aware releases.
scripts/​nvx_tools/​build.py Generates kernel and OpenVMM provenance.
docker/​Dockerfile Exports kernel provenance.
doc/​build.md Documents release provenance and layout.
.github/​workflows/​ci.yml Transfers provenance artifacts between jobs.
.github/​actions/​build-openvmm/​action.yml Caches OpenVMM binaries with provenance.
.github/​actions/​build-guest-artifacts/​action.yml Caches kernel artifacts with provenance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/nvx_tools/release.py
Comment thread scripts/nvx_tools/release.py
Copilot AI review requested due to automatic review settings September 18, 2026 23:42
Add generic kernel and OpenVMM provenance sidecars, verify them during release packaging, and publish staged release trees with exact manifest hashes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep provenance fixtures aligned with the inherited fc0e30ee gitlink while production code continues to derive revisions dynamically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the exact producer archive paths and non-self-referential SHA256SUMS coverage for downstream composition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture kernel inputs before compilation, validate source metadata during packaging, and recheck replacement policy at publication time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep test metadata aligned with the inherited dev gitlink without modifying the OpenVMM submodule reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a new provenance-aware cache generation, verify the sidecar on restore, and carry it with each OpenVMM artifact into downstream platform jobs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the kernel cache generation name stable and document why OpenVMM artifacts restore at the repository root when they carry both binary and provenance paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Cached kernel-source mutation can produce inaccurate provenance, and malformed dot-root archives trigger an uncaught exception.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
Resolved since last review (2)

Comment on lines +640 to +642
if (
_kernel_source_fingerprint() != source_fingerprint
or sha256_file(input_config) != input_config_sha256
Comment on lines 510 to +518
if (
not name
or "\\" in name
not normalized_name
or "\\" in normalized_name
or path.is_absolute()
or "." in path.parts
or ".." in path.parts
or (path.parts and path.parts[0].endswith(":"))
or any(":" in part for part in path.parts)
or path.as_posix() != normalized_name
or (not is_directory and name.endswith("/"))
Narrow OpenVMM artifact transfers, require complete checksum manifests, and create deterministic release archives with collision-safe GitHub asset publication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Read back deterministic archives through a safe exact-layout extraction before publication, and preserve split artifact uploads across same-run retries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture validated release files through checked descriptors into a private snapshot, then bind archive readback to the accepted inventory and hashes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reject missing or mismatched pre-existing development release asset metadata without mutation while preserving owned-upload cleanup and resumable matching behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 19, 2026 00:03
@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/nvx-platform/02-provenance-20260918 branch from 9e3060e to bacca2c Compare September 19, 2026 00:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Source-package races and type-loose provenance validation can still produce authenticated but inconsistent metadata.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 High severity · 2 Medium severity

Open (5)

Comment on lines +797 to +798
provenance.get("format") != 1
or provenance.get("source_revision") != revision
Comment on lines +1128 to +1132
_copy_release_file(
linux_source_archive,
source_destination / linux_source_archive.name,
)
_project_source_archive(


def verify_sha256_sums(directory: Path) -> None:
def verify_sha256_sums(directory: Path) -> VerifiedChecksumInventory:
@ppenna
Pedro Henrique Penna (ppenna) merged commit b29aac0 into dev Sep 19, 2026
20 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the esaurez/nvx-platform/02-provenance-20260918 branch September 19, 2026 00:43
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.

3 participants