# E-040 — Installed AWC used development paths and divergent global hooks

## Objective hierarchy

`O-AWC-CONSISTENCY` requires repository and installed AWC to agree with published engine interfaces. Round `R-AWC-INSTALLED-REPAIR` contributes to `KR-INSTALLED-FLOW` through packed-package lifecycle tests and verified global installation. It follows the unresolved integration limitation in [E-039](E-039-passive-sample-readiness.md).

## Observed trajectory and evidence

The installed `@fyso/awc` 0.1.1 called an Awareness sibling source path absent from its tarball and looked for `src/cli.mjs` inside the target repository to close Objective Guard. Its core read the shared legacy Awareness board. AWC was installed under Node 22's prefix while the current engines also existed under `/opt/homebrew`, leaving duplicate installations.

Hook inspection found no Objective Guard pre-edit gate in Claude, an `Edit|Write` matcher on Codex's patch gate, and two custom global prompt wrappers separate from the repository's current installer. The historical checkout containing AWC sources was ahead by 182 commits and behind by one; its unrelated history was preserved.

The repair establishes `packages/core` and `packages/cli` in the active checkout, bundles the exact core and calls the installed engines on PATH. It uses Awareness worktree routing and rejects incomplete final verification. The first real lifecycle fixture correctly received a no-op warning because no task surface had changed; the fixture was corrected to perform its declared README work, while a separate test preserves the requirement to reject no-op closure.

The complete suite passed 170 tests without skips before global installation. The installed tarball tests cover lifecycle and successor, blocked successor with preserved evidence, identity mismatch, failing verification, partial Awareness failure/retry and independent worktree boards. Prompt migration tests preserve unrelated integrations and prevent duplicate Awareness prompts.

## Expected and actual guard behavior

Preflight required an explicit successor to the closed analysis round. The configured regression criterion uses full-suite and documentation checks. A `new-dep` warning correctly identified the newly tracked core dependency; it is an intentional first-party bundled dependency, not an unexpected external service. The warning was inspected with `oguard list`; the injected instruction's `oguard findings` command was unavailable in the published CLI. No false-positive label or detector threshold change was used to conceal it.

Packed tests, rather than repository imports alone, exposed and verified the package boundary. The final guard checks scope and declared regression evidence; it cannot discover every global shell installation or certify all third-party hook behavior.

## Classification and correction

This is a packaging/integration defect with inadequate installed-surface coverage. It is not evidence of statistical drift-detector performance. Global copies and owned hook configurations were backed up before mutation. AWC 0.1.2 and Objective Guard 0.1.2 were installed from local tarballs into `/opt/homebrew`; Awareness Framework 0.5.0 was retained. The duplicate Awareness copies were byte-identical before the Node 22 copies were removed. No npm registry release was performed.

The canonical installer migrated the legacy prompt registrations, installed Claude's gate, removed Codex's incorrect matcher and retained 39 unrelated Claude hook entries and 24 unrelated Codex entries. Both installed prompt commands emitted valid JSON with AWC and guard guidance, without repeating the independently owned Awareness prompt. The backed-up obsolete wrappers were removed after migration.

## Impact and follow-up

Installed `awc start` and `awc check` passed on this real round with zero mismatches. The work directly contributes to the parent integration objective; it does not substitute for the pending independent outcome adjudication in the data-analysis work. Keep testing packed installs whenever package boundaries or engine invocation change. A passing close certifies only the declared checks, not general task success or the usefulness of statistical signals.
