# Gateway Registry Path Debug Journal

Started: 2026-08-15T14:50:00Z
Goal: Start the exact-candidate Telegram gateway on the reset baseline without weakening profile authority or exposing the prepared invite.

## Incident

- Candidate: `2e0894eac92bc396cc4723bf1f18ebc653b95018dd41574df435941c235da925`
- Wheel: `af4a9d0a1ffffb6eb7551c1d6dc2b32853ca6d024332a4f8f5702bbf992f141b`
- Service start: process reached active/running, then Telegram nutrition-coaching initialization failed.
- Error: `configured registry path is outside the profile authority`
- Logged configured value: `customers/registry.json`
- Safety response: invite handoff not exposed; claim observer stopped; service stopped; no Telegram claim.

## Hypotheses

1. **H1 — wrong base directory.** The relative registry path is resolved against the service working directory or repository instead of the canonical profile root.
2. **H2 — reset baseline shape.** The canonical reset removed an authority directory or file whose existence is required before safe path canonicalization.
3. **H3 — configuration contract drift.** Current candidate path validation requires an absolute/profile-root-qualified registry path while the retained profile config still uses a legacy relative value.
4. **H4 — editable package split-brain.** The editable `checkin_cli` or workspace/profile package contributes a different authority root than the wheel gateway expects.

## Round counter

- Round 1: H1 refuted; H2 strongly supported; H3/H4 under independent review.

## Live safety state

- [x] Invite handoff not disclosed.
- [x] Claim observer stopped.
- [x] Service stop requested; `MainPID=0`.
- [ ] Service normalized to inactive/dead.
- [ ] Prepared invite either resumed after a root fix or canonically expired.

## Findings

### Initial service attempt

- Evidence: systemd state and current journal.
- Result: nutrition-coaching initialization failed before the invite was exposed.
- Mutation boundary: one PREPARED bootstrap session exists from the authorized single preparation; no claim or customer registry row exists.

### Installed-source authority trace

- `_configured_nutrition_registry` correctly resolves relative `customers/registry.json` against `HERMES_HOME=/home/cube/.hermes/profiles/dualcoachtest`.
- It then requires the canonical registry path to already be a regular file under the profile root.
- The archive-first reset intentionally removed `customers/registry.json`; the post-reset empty baseline therefore reaches startup with no registry file.
- The generic exception text says “outside the profile authority,” but the failing conjunct is presently the missing-file check, not a path traversal or wrong root.
- Interpretation: H1 is refuted. H2 is the leading root cause: the reset/start/bootstrap contracts form a circular dependency unless a candidate-supported empty-registry initializer exists.
