Skip to content

P2: PHENIX build probe leaks parent symlink-loop exceptions #960

Closed

Description

@realmarcin

Severity: P2. Fresh-context review of PR #957 at f37a017dcd6d5b4c8cd769d7e0280345a65d2789; independently reproduced on the required Python 3.12 by PRIMARY.

scripts/toolchain.py:337 resolves the dispatcher target's parent path. A directory symlink loop there raises RuntimeError on Python 3.12. The outer phenix_build_evidence() exception handler at line 661 catches only OSError, ValueError and subprocess.TimeoutExpired, so the exception escapes instead of returning diagnostic unknown/non-reusable evidence.

Temporary reproduction: prefix/loop -> loop and prefix/phenix_bin/phenix.version -> ../loop/phenix.version. Calling phenix_build_evidence() raises RuntimeError: Symlink loop from .../prefix/loop. No setup or real vendor command was executed. This is distinct from #958's outside-hop admission: here an invalid path aborts callers rather than producing the promised unknown receipt.

Suggested fix: classify resolution loops at the path boundary and retain a diagnostic error in the build evidence, without swallowing unrelated implementation errors. Add hermetic loop regressions for affected configured paths and both vendor/bare probes, proving no setup/dispatcher runs and the measured-build gate remains false.

Triage: in scope, because invalid configured installation paths must fail closed with retained evidence under the new adapter contract. Deduplicated against the current queue and all-state symlink-loop search; no matching issue. Local receipt: .orchestration/evidence/029-primary-reproductions.json.

The fresh reviewer also verified this RuntimeError escaped on the base implementation. It is a pre-existing limitation, not a new regression; fixing it is in scope while revising this path boundary and its unknown-evidence contract.

Activity

  1. added a commit that references this issue on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions