# WO-46: Preserve process authority for shell observations

Status: repository repair complete and delivered to `origin/main`. Publication and live validation remain with the user.

## Finding and root repair

Field review F1 recorded successful source reads changed into failures because source text contained `throw new Error`. The runner's semantic stdout scanner and ShellTool's own soft-failure scanner both infer process failure from arbitrary output. A controlled reproduction also finds a false failure after `cd . && cat` prints a documented error line.

Preserve observed command/process outcomes through both execution loops. Reconcile actual nonzero exits, timeout, primary-command failures and properly bound verifier protocol results before workflow settlement. Source or documentation reads must not manufacture runtime or verification failures from their bytes. Share existing command semantics where needed to bind explicit verifier output; retain existing import compatibility.

## Owned paths

- `packages/orchestrator/src/agenticRunner.ts`: shared tool result reconciliation and removal of generic semantic failure authority.
- `packages/execution/src/tools/shell.ts`: process/result producer and explicit verifier binding.
- Existing command-classification modules and compatibility exports, if required for one shared interpretation.
- Shell and actual-runner regression tests for both loops.

## Acceptance

- [x] Successful source reads containing exception, compiler, test and verifier-marker literals remain successful observations.
- [x] Real nonzero, timeout, masked pipeline primary failures and bound explicit verification failures remain failed.
- [x] Both production loops and workflow settlement observe the same typed result.
- [x] No source output is promoted into verification authority; existing task/shell regressions pass.
- [x] Record full package verification, scoped commit and push.

## Verification evidence

- 192 focused orchestrator tests passed, including both execution loops, actual ShellTool reads and verifier controls. Log: `/tmp/omnius-wo46-focused-final.log`.
- 63 focused execution tests passed; the complete execution package then passed 1,820 tests with 3 pre-existing skips across 163 suites. Log: `/tmp/omnius-remedies-execution-full.log`.
- Execution build, orchestrator typecheck and whitespace checks passed.
- Terminal-report handling of accepted negative searches and preview exits is completed with WO48, using the same command classification. Publication/live validation remain pending with the user.

## Repository acceptance and delivery

- Source repair: `a3c26eca`, delivered to `origin/main`; coordinated changes: `672bef53 (terminal observation/report integration)`.
- Clean rebuild of all workspace packages and final orchestrator rebuild passed.
- Execution: 1,820 passed / 3 existing skips across 163 suites.
- CLI: 2,575 passed across 274 suites. Rerun with `--maxWorkers=4 --minWorkers=1` cleared the original five UI import timeouts without changing those tests or their limits.
- Orchestrator: full run covered 228 suites with 2,847 passed / 1 existing skip / 1 outdated fixture failure. The fixture lacked required `pipefail`; it was corrected, and all 10 tests in that suite then passed. No production source changed after the full run began. This is full-suite coverage plus the corrected suite rerun, not a claim that the initial command exited successfully.
- Across these packages, all 7,243 distinct non-skipped tests have a passing result on the final implementation. Logs: `/tmp/omnius-remedies-execution-full.log`, `/tmp/omnius-remedies-orchestrator-full.log`, `/tmp/omnius-remedies-receipt-fixture.log`, `/tmp/omnius-remedies-cli-final.log`.

Checks used hermetic backend/Telegram transport and synthetic local process/project fixtures. No live inference, service restart, installed-package replacement, Telegram sends or publication were performed. The existing publish staging and unrelated discovery changes were preserved.
