# Ticket: Fix embedded Work2 validator path resolution

Status: active
Type: ticket
Updated: 2026-09-03
Next Action: implement and regression-test the correction in the canonical Tool Shed repository, release it, then upgrade this workspace snapshot
Project Map: work/maps/map-smi-firmware-stabilization-and-qualification.md
Campaign: standalone
Campaign Reason: This is an upstream Tool Shed reliability defect discovered while executing TKT-0034, not firmware product work.

## Problem

Embedded Work2 preparation resolves the release validator from the workspace root as `scripts/validate_tool_shed.py`. In an installed workspace, the validator lives under the discovered shed root at `tool_shed/scripts/validate_tool_shed.py`, so preparation can fail before mutation even though direct release validation succeeds.

## Required Mitigation

1. Resolve the validator relative to the active Tool Shed installation or the running orchestration module, never by assuming a root `scripts/` directory.
2. Launch the validator with the current Python interpreter and preserve its release profile, exit status, and diagnostics.
3. Keep canonical Tool Shed repository and workspace-embedded layouts supported without layout-specific bypasses.
4. Fail closed with a precise resolved-path diagnostic when the validator is genuinely unavailable.

## Acceptance Criteria

- [ ] Embedded Work2 preparation finds and runs the validator from a `tool_shed/` snapshot.
- [ ] Canonical repository execution continues to find and run the same validator.
- [ ] Regression tests cover embedded and canonical layouts on Windows and Linux path semantics.
- [ ] A missing validator fails preparation before mutation and reports the exact attempted path.
- [ ] The full Tool Shed release validation passes.
- [ ] A released Tool Shed version containing the fix is upgradeable into this workspace without modifying project-owned state.

## Boundaries

- Do not develop or patch the disconnected `tool_shed/` snapshot in this firmware repository.
- Do not bypass, downgrade, or silently skip release validation.
- Do not modify firmware, controller state, media, deployment, or the open release cohort.

## Origin Evidence

Observed during TKT-0034 Work2 execution. Direct invocation of `tool_shed/scripts/validate_tool_shed.py` passed 498/498 tests, proving the validator itself was sound while the orchestration path was wrong.