Skip to content

Measure PHENIX build identity through its configured vendor setup - #957

Merged
realmarcin merged 5 commits into
mainfrom
fix-954-phenix-vendor-setup
Nov 6, 2026
Merged

realmarcin merged 5 commits into
mainfrom
fix-954-phenix-vendor-setup

Conversation

@realmarcin

@realmarcin realmarcin commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

The PHENIX 2.0-5936 conda installation on both M1 and M5 prints an empty-field banner when the inherited version variables are removed. Its own phenix_env.sh supplies the version. This adds a configured-install setup adapter so consistent vendor-derived identity can pass the refinement-cache measured-build gate while bare empty-field output remains unknown and non-reusable.

Trust contract:

  • Clear inherited PHENIX_VERSION and PHENIX_RELEASE_TAG, plus shell startup hooks and exported functions, without changing the parent environment.
  • Resolve the configured installation, require its regular phenix_env.sh inside the prefix, and reject missing setup, symlink escapes and PATH fallback. Source it in a child through fixed shell syntax with the path passed as a positional argument.
  • Transfer only the two setup-derived version fields to that installation's resolved phenix.version. Accept one consistent Version/Release pair in one banner; reject contradictory, duplicate or mixed banners and fields split across output streams.
  • Bind setup and dispatcher paths, SHA-256 digests, argv, output and parsed fields into evidence labeled vendor_setup_environment. The cache gate checks their structural and semantic consistency; directory hints and expected-version constants cannot authorize reuse.
  • The evidence identifies the setup and dispatcher, not all installed libraries. It does not change scientific runner environments or reauthenticate historical results.

The change also isolates benchmark metadata unit tests from installed tool probes (#955) and aligns shell-function removal receipts with cache admission (#956). Review fixes validate directory symlink hops (#958), remove an unreliable shell-source assignment heuristic while preserving final-field/banner checks (#959), retain unknown evidence for path loops (#960), preserve timeout output (#961), restore executable availability semantics (the regression recorded on #409), and accurately document observation limits (#962).

Validation at 0af13c4037f94510306f65a4f8c385cec6fb1bf6: the required uv run --locked --extra benchmark -- bash scripts/validate.sh gate passed on Python 3.12. All 18 independent synthetic acceptance checks pass at runtime commit 679c949; the final documentation commit leaves those runtime files byte-identical. The controls cover cache reuse, inherited function-shaped values, directory symlink escapes, path loops, setup comments, banner contradictions, timeout evidence and executable availability. Fifteen cases failed on the preceding reviewed head, confirming regression sensitivity. The read-only M5 default resolver, with no PROTSTRUCT_* override or inherited version labels, reported 2.0-5936 from vendor_setup_environment and passed the cache measured-build gate. The bare control remained unknown/non-reusable. Setup and dispatcher SHA-256 values and the parent environment were unchanged. No refinement, benchmark, data download, paid provider call or vendor-install modification is part of this change.

Closes #954.
Closes #955.
Closes #956.
Closes #958.
Closes #959.
Closes #960.
Closes #961.
Closes #962.

Related: #760 still requires a second PHENIX build and an explicitly authorized scientific reproducibility run. The other existing scientific follow-ups remain unchanged. Merge requires separate user approval.

Remaining follow-up: #963 records pre-existing canonicalization of an OS-invalid regular-file/.. dispatcher alias. It reproduces on original main f3cfad3, resolves to an inside-prefix dispatcher, and does not affect the tested vendor layout. It remains open for a separate path-validity fix.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Fresh-context read-only review of f3cfad3..f37a017 completed. PRIMARY independently reproduced every actionable finding with temporary fake tools only. All are in scope for this adapter; no scientific decision or benchmark is required:

The review's seven focused suites passed, demonstrating these were coverage gaps. Fixes will use ordinary commits, followed by primary verification, the full QC gate and a fresh read-only review of the fix diff. PR remains unmerged.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Review fixes are committed locally as 679c949a67b2c90726ceab2464f823da959348b1. PRIMARY's independent synthetic matrix now passes all 18 cases (15 failed on the prior reviewed head); the secondary's focused suites and full locked gate pass.

One documentation-only finding remains: #962 corrects the audit's overstatement of permission/transient-change checks. The intended fix describes actual path/hash observations and the separate availability permission check. No new code guard or scientific run is required. Final push, primary QC and fresh fix-diff re-review follow that correction; this is not final acceptance or merge approval.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Final acceptance at 0af13c4037f94510306f65a4f8c385cec6fb1bf6:

The PR remains unmerged pending the user's explicit decision. The branch/worktree are retained clean and fully pushed, and the secondary is idle.

@realmarcin
realmarcin merged commit c2b8906 into main Nov 6, 2026
2 checks passed
@realmarcin
realmarcin deleted the fix-954-phenix-vendor-setup branch November 6, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment