Skip to content

Pin PHP for isolated reproducible PHAR builds - #157

Draft
rmcdaniel wants to merge 2 commits into
mainfrom
cli/297-phar-repro
Draft

rmcdaniel wants to merge 2 commits into
mainfrom
cli/297-phar-repro

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

The PHAR reproducibility caller still uses the unqualified upstream PHP setup. This draft prepares a separate pinned container driver while leaving the live workflow and ordinary local script unchanged.

The driver retains two independent Git archives, the original build algorithm and byte comparison. Only the selected tree is mounted read-only with narrow output writes; siblings, saved comparison artifacts, wrappers and selection metadata remain protected. Box executes the pinned read-only artifact and receives an explicit timestamp derived from SOURCE_DATE_EPOCH.

Validation at 6be8a01: five offline controls, real predecessor/current controls, actual Composer/TLS checks and both independent builds pass locally. Both PHARs have SHA256 1d2769e2d16a57059c99d2b1638d108ee627bc8749b497255bfd13119e2d7f30. All 38 created container IDs are absent. The earlier 673 attempt remains NONPASS. Existing live source/policy are unchanged and the complete target validates eight guarded requests. Exact CI results are retained in comments.

Security reports the fleet controller withheld its source-review step under OpenAI cyber policy and disclosed no narrower condition. Review remains set aside. No central admission, workflow activation, merge, independent Security approval or broader #297/release qualification is claimed; this draft is the ordinary functional source correction only. Existing legacy macOS SPC refusal and maintained release paths are unchanged.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Frozen source/profile review requested for 673b7c22aa17c58a674e5397b1bb2f07cb4e9bde, tree 1ee0e9234ebd8f7b0da0e12cb364a67d217ce87e. Live workflow remains unchanged pending exact admission.

The new setup reuses the accepted PHAR builder/profile, parses its private outputs as data and installs a separate reproducibility wrapper. The host prepares each Git archive outside PHP writable temporary data. Runtime sees only the selected tree read-only, plus the existing narrow PHAR output mounts; sibling trees and the saved comparison artifact are not mounted. A read-only owned single-link metadata file selects the prepared tree. The original mutable Box cache argv is routed through the existing guard and pinned read-only artifact.

The original two independent source archives, build commands, hashes and comparison are preserved. Four offline controls pass, covering mounts, cache argv, malformed/linked metadata and tree placement. Real replacement/Box controls and the original guarded two-build command follow on the retained image; no hosted or broader profile acceptance is inferred.

Source Git mode SHA-256
docker/php-ci/README.md 0644 2c0983f1e7833191c59bef635d91a7b86ef2c71ba517964bcd49cb9251265472
rust/parity/test_php_repro_container.py 0644 38facd816e730fcdea9f4b2673697d39a86ecb89f7601ca3258b9cd57438ea78
scripts/ci/prepare-php-repro-container.sh 0755 c1e7ca8a6087a5fa497c50e2801622239beae00dfafbd3d26a38825b218e4ac2
scripts/ci/prepare-php-repro-tree.sh 0755 8d45f367f9980b23d68679f7ba452ee692ccde73df15045d37251a1703255362
scripts/ci/run-php-repro-container.sh 0755 fc30fa3b6ff16ae1f74a9d1f87d6cb46621557372d78fb0ae3e34cf2986dde0a
scripts/ci/setup-php-repro-container.sh 0755 734752a895e26bfc335bb09b31de1a693ac126bc18bc1bc4c8056e1ad7ada422
scripts/ci/test_php_repro_container.py 0644 ee15c51b37049c31d54b2bee4424a9265939ceca78ac37e0ad9fa21cb28152d7
scripts/verify-reproducible-build.sh 0755 bb500bb3ef39ad35c8d0bef6319fb95ed58447f7afb26e32c0d278b02cad6206
tests/fixtures/php-repro-workflow.yml 0644 e9ec1f3737c41658903a278e55a45ae02e724d98f07acd89376e00670d118881

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security current source-review step is policy-blocked and set aside; no source/runtime verdict or workflow activation is claimed.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Consumed local NONPASS at source 673b7c22aa17c58a674e5397b1bb2f07cb4e9bde, retained Linux/amd64 image747afb16, 2026-11-14T01:29:53.490797+00:00–2026-11-14T01:30:29.347006+00:00.

All original PHAR profile controls, new archive/wrapper/metadata/comparison controls, mutable-cache predecessor/current Box execution controls and actual Composer clean-trust verification pass. The original two-build procedure fails byte equality: first SHA 3184befdc2a39aee8378940595dfb2b0a5373b33d14937f3e6233cbaf42c7601, second SHA c516c494bee08ce0fd9969cbd15f0d665d6183848f1833cbe218e75b1d59b3bd. This is not a reproducibility PASS.

The finite event stream captured all 38 created container IDs. Every exact ID was rechecked as no-such-object on lab4; no runtime resource remains. The original procedure's cleanup removed both temporary trees. Logs and hashes remain separately attributed.

The source correction will set Box's supported timestamp field from the same SOURCE_DATE_EPOCH, and stage the prepared container driver separately so the live legacy command remains unchanged. Current CI's preflight failure comes from validation-step expansion reaching the newly referenced helper; the existing policy and verification requirements will remain intact.

Independent Security review is separately policy-blocked/set aside (neutral record). No source/runtime Security verdict, central admission or workflow activation is selected, and this ordinary functional correction does not resume or satisfy that blocked review.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Ordinary local functional correction PASS at exact 6be8a012d0bec56a15522e4de84fd653a04f8ccf / tree 1a3d76280a3fdfcb3e8c272427a9b13c86feca1d, 2026-11-14T01:54:04.200473+00:00–2026-11-14T01:54:45.866976+00:00. This is not an independent Security verdict or hosted qualification.

The prepared driver is now separate from the byte-unchanged live legacy script. Existing live workflow code and policy are unchanged; the full current target again validates eight guarded dependency requests. The prepared tree's read-only Box configuration explicitly sets the supported timestamp from SOURCE_DATE_EPOCH, preserving all other source configuration values.

Five offline controls and both real fixture methods pass: predecessor/current archive-control, wrapper, metadata and comparison-copy refusals, required output writes/following PHP, plus mutable-cache versus pinned Box execution. The unchanged PHAR component checks, exact PHP8.4.27/Composer2.10.3 profile and actual clean-trust/TLS checks also ran and pass on retained image sha256:747afb163fc37bffdf92b327da725e606a0695ba984398d09dd4b7e5f2fcb8d5.

Both independent Git archives execute the original PHAR build algorithm and produce the same573-file PHAR SHA256 1d2769e2d16a57059c99d2b1638d108ee627bc8749b497255bfd13119e2d7f30. Both temporary trees are removed by the driver. The finite event stream captured all38 created IDs below; every exact ID returns no-such-object, with zero inspection errors or remaining containers.

020a50b5075b10318d3a463704c1f2c92354d2ff454ffde2b5c0dbeedcd9e02a
050ac071f73c50f75b1f2b38dc7b013401fb138c4688e4e2cbd82847b88f4c83
057f057b312f3a3abea38f4e6c841a1c34950f70010b43909ed0e8e66a63d32b
19b4c4f3f162f46f788c8e76ab125475509245883521d97aac391b3af8b05dd5
1ae83374042a1ac95cc015c762589e3a007a29434b1e1a12a827d32aba688169
1ee5750ea42aaa7765d2d2110f5020d20b782950d82f45c808518b66a5e663b6
2928a38a3f62aab914870d93fc8b1deb837727b09f38807512065363309816ca
37036cbf73a86a43d334a2008e858e6917138d5cb2b17a812757e10c44b3ecb6
3797aa53a63af29ec763a9a2d0e70411629f98553ffbce3b3124d69248ad52ed
3af621ea72e99fb64fd1ac7756fe940818b769b363db60d415dcfccbdb4a17b9
44856fe61001c690073a01ae097a84501faa22d89c7c3198eebc7806442b75e7
4d84f4fe6ffc234806e3f6de05b0f9d20d9b4f02af7c49e6d27d97108e8847f6
51aced7c038f23370bc331463854024b2850e541096791a6e8362474175fec18
6eab065e3ef8986e31c3ce93f13959cb7d1e4948d80b6dc1d3eff2d9887fae4d
70f9a4c3e635aea8ee74f9927729980e5cc15065a543917c8a120046b632f076
8787b7ac27b8e11be21574f3e76e87883e617fc18f9b8cf7df1c0684a7e6fa31
886ab7bd85f08aed44a82825647621dc9c0b560f3a724552011695a9e9430a3d
88db435d4f25a6e352c309e5b7b69a31a34584d66658077fbfd4461e297481c9
8ee8201e161448a24e0cce88161a83570bba8607f468be7edf96e9ee74af3fa8
91a5a6278bdf4808d93b67e8d6ed5ef6dafed77be2a0f3fc6b8bbc95dee0f375
999037a0bc06c4fb1d0788b58025fa4e4e088436afeedb9226bd1a169d3ef634
9ef6ccb80c0ed6566cb664cef98c9401c7a9178c431e5921dcd8830f4c35deb8
a41a8d4c90d4c338202133ec3b63aca0f757716b7862305989851f6bc13d0d80
a80f587660bd5244e7197c7b25e5bb738dda1b807eee4836c7088140403039bf
ab9aea698fcf2683058e3be409ed30d08e00e0335f7ce5429530d3affd7bdc49
b66d2b153530ae7c99b9a0b6791e39fc97b2954aa7d1fa2d2d56298958659e20
cac5961b48dfe3bb62c58647bcdac1219bc123a1566146f2614cd25a42150e6d
d4dd628e2e1c1d7dddddc08e51f5c8ec7d4cbf11f657fcdb130915821b251194
d578688debad94976ed528aba6a2a541741eddcbb4f28283a3dfc519e8a9d523
d631299a460d769317c6aae0a1d7078ef5d7712536e62f18019e542a6f146478
d6c665669783c25dfec853669e1734f8443490e51159721e60e3a2adad7bd031
de31f39da768b852a9e6212c651fb3b44f235363ddf4043fa1c1040409bf8da7
e091961234369bb9799b995cfe801f2af24bdd53a3fcddc588e7b398e8a40dbd
e580cb223ace11a2572286e41850c5d4f3ae068834ece1daceb4820832e59adc
effd6e3ae79770af6be2c8653841c7cf58c2ef39a5c31a8c03ca5fa7959dd671
f279122124ab458af829f3841440050bc5ba54c5e4be642c52e817def3bf4832
fd2f49e577744c230089fec6689feda02c1ccb40d0788e81c28ab2a346be00af
fe57bff45a50369d84f6f62dc4463b7e7bba1c2696ea771693ee5de4ab1c65ae

The earlier673 attempt remains separately consumed NONPASS (6869723618). This repeat follows an implementation correction and does not relabel that attempt.

Security reports its source-review step was withheld by the fleet controller under OpenAI cyber policy, with no narrower condition disclosed (neutral record). That review remains set aside; no retry, alternate review route, source/runtime approval, central admission, workflow activation or merge is selected. Current ordinary CI still runs independently.

Current staged source identities:

Source Mode SHA-256
docker/php-ci/README.md 0644 407d956a8af4989e4065c925aedc8411eb0321281b735e0c0263325bf587156d
rust/parity/test_php_repro_container.py 0644 38facd816e730fcdea9f4b2673697d39a86ecb89f7601ca3258b9cd57438ea78
scripts/ci/prepare-php-repro-container.sh 0755 c1e7ca8a6087a5fa497c50e2801622239beae00dfafbd3d26a38825b218e4ac2
scripts/ci/prepare-php-repro-tree.sh 0755 2824797a6c829c41650ec2d17bf89667c9a37832ce29f4694da179292b0e5a30
scripts/ci/run-php-repro-container.sh 0755 fc30fa3b6ff16ae1f74a9d1f87d6cb46621557372d78fb0ae3e34cf2986dde0a
scripts/ci/setup-php-repro-container.sh 0755 734752a895e26bfc335bb09b31de1a693ac126bc18bc1bc4c8056e1ad7ada422
scripts/ci/test_php_repro_container.py 0644 9df98c19baf64b8bbc2b3adb6426586923deaf745946b7b7289efb99268171a1
scripts/ci/verify-php-reproducible-build.sh 0755 60566677c47d148591d0cc3d8523e1fc677fc52e7f703f7cdb5211297f488e16
tests/fixtures/php-repro-workflow.yml 0644 d91ce02c30d28eddc39cf1207efcc718b99fdf208c08c723ef08571e3e70810c

@rmcdaniel

Copy link
Copy Markdown
Member Author

Current ordinary source/CI state is concrete at 6be8a012d0bec56a15522e4de84fd653a04f8ccf / tree 1a3d76280a3fdfcb3e8c272427a9b13c86feca1d: all 28 exact-head checks are terminal SUCCESS, including Build43543185017, Sonar43543185108 and release dry-run43543185090. Those checks exercise the unchanged live callers and staged source tests; they do not qualify hosted execution of the proposed profile.

The corrected local two-build procedure and all functional controls pass; both independent PHARs have SHA256 1d2769e2d16a57059c99d2b1638d108ee627bc8749b497255bfd13119e2d7f30. All 38 created IDs are absent and both temporary trees are cleaned. Exact local source/result/cleanup receipt6869807263 preserves the separate earlier NONPASS. The ordinary legacy script, all live workflows and central policy are byte-unchanged; the full target validates eight guarded dependency requests.

The branch remains a draft and is retained for unfinished work. No central record, workflow activation, merge, release or independent Security approval is selected. Security reports the fleet controller withheld its source-review step under OpenAI cyber policy and disclosed no narrower repository condition or approval to clear. That review remains set aside, with no retry or alternate route selected (neutral record6869412140). Maintained2.3.x caller work remains separately tracked in shared297; the legacy macOS SPC refusal is unchanged.

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