Skip to content

build(runtime): make algorithm-c rootfs reproducible - #12

Open
CN059 wants to merge 2 commits into
devfrom
agent/reproducible-algorithm-c-rootfs
Open

CN059 wants to merge 2 commits into
devfrom
agent/reproducible-algorithm-c-rootfs

Conversation

@CN059

@CN059 CN059 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Stack

This PR is stacked on #10 and should be reviewed/merged after it. It is independent of the real judge process E2E in #11.

Summary

  • normalize the rootfs staging tree through a sorted POSIX tar with fixed time and ownership and without atime/ctime, ACLs, SELinux metadata, or xattrs
  • fix the ext4 filesystem UUID and directory hash seed before importing the archive
  • add a repeatable two-build verifier that recursively compares every generated runtime artifact
  • document the same-host reproducibility evidence and the remaining cross-toolchain boundary

RED -> GREEN

Two builds from the same locked inputs originally produced rootfs digests 15fed4a... and 7a7f28d.... The first cause was a random ext4 Directory Hash Seed. Fixing only that still produced 098b92d... and 86f6cca... because mke2fs imported the staging inode ctime.

After normalized tar import and fixed ext4 seeds, two complete builds produced identical output directories and the same rootfs digest:

26f7a7a0375bde0bab2609eec701403d5f4bae32156995f0f7720ce0138faf80

Security and compatibility

No protocol, schema, migration, crate/service boundary, network, credential, device, or production isolation behavior changes. The guest root block remains read-only and the production profile remains fail closed. A new ADR is not required because this implements the immutable runtime supply-chain constraints already accepted by ADR-0005.

Validation

  • algorithm-c structure check: passed
  • two complete offline builds plus recursive full-output comparison: passed
  • manifest strict checksum: 5/5 passed
  • strict real-KVM algorithm-c smoke: passed, including compile/run success, compile failure, timeout, and idempotent teardown
  • fmt, workspace check, Clippy -D warnings: passed
  • full workspace tests with isolated PostgreSQL 18 and OPENOJ_REQUIRE_KVM=1: 145 passed
  • cargo-deny advisories/bans/sources: passed with existing duplicate-version warnings
  • workspace dependency check and docs check: passed
  • change-openoj-sandbox, develop-openoj, verify-openoj, and architecture Skill validators: passed

Unverified

Bit-for-bit reproducibility across distributions or different mke2fs/libext2fs, GNU tar, or Rust versions; aarch64; production isolation; signing/provenance; license review and distribution rights; release performance.

Base automatically changed from codex/algorithm-c-runtime-smoke to dev August 24, 2026 17:17
@CN059
CN059 force-pushed the agent/reproducible-algorithm-c-rootfs branch from 0796cb8 to 9f1e0ce Compare August 31, 2026 00:51
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