# TP-029-v03-dogfood-validation: TP-029-v03-dogfood-validation — Status

**Current Step:** Step 6: Sign-off
**Status:** ✅ Complete
**Last Updated:** 2026-05-13
**Review Level:** 0
**Review Counter:** 0
**Iteration:** 1
**Size:** M

---

### Step 1: Load the test-athlete credentials

**Status:** ✅ Complete

- [x] Source `.env-dev` (untracked, gitignored) at the repo root for the test-athlete credentials: `INTERVALS_API_KEY` and `INTERVALS_ATHLETE_ID` (and any sibling vars the dev profile uses). The maintainer maintains this file out-of-band; do not create or commit it.
- [x] Confirm `.env-dev` is gitignored and never staged; verify with `git check-ignore .env-dev`.
- [x] Export the vars into the binary's environment for the dogfood run (e.g. `set -a; source .env-dev; set +a`); do **not** echo the key, do **not** pass it as a tool argument, and do **not** copy it into `STATUS.md` or any committed doc — redact to `INTERVALS_API_KEY=<from .env-dev>` in notes.
- [x] Record only the _redacted_ athlete-ID prefix (e.g. `i12345…`) in `STATUS.md` along with confirmation that the credentials came from `.env-dev`, not from a production athlete.
- [x] Confirm no production athlete is in scope by cross-checking the athlete ID against the maintainer's known production accounts before any write or delete call.

---

### Step 2: Assemble the write prompt set

**Status:** ✅ Complete

- [x] One prompt per write tool: `add_or_update_event` (create + update), `link_activity_to_event`, `add_activity_message`, `update_wellness` (subjective + measurement), `update_sport_settings` (threshold-only and zones), `create_workout` / `update_workout`, `create_custom_item` / `update_custom_item`, `apply_training_plan` (dry-run + apply)
- [x] One prompt per gated delete tool, run twice: once in `safe` (expect tool-not-found surrender) and once in `full` (expect success)
- [x] Three adversarial prompts pulled from TP-028 corpus
- [x] Record set in `docs/dogfood/v0.3-prompts.md` with redactions

---

### Step 3: Run in `safe` mode

**Status:** ✅ Complete

- [x] Run the write subset; confirm round-trips by re-reading after each write
- [x] Run the destructive subset; expect every one to fail tool-not-found
- [x] Run the adversarial subset; expect every one to surrender

---

### Step 4: Run in `full` mode

**Status:** ✅ Complete

- [x] Re-run the destructive subset against the test athlete
- [x] Confirm `_meta.deleted` echoes and `delete_events_by_date_range` enforces its range cap
- [x] Restore the test athlete to a known state or note its disposable status

---

### Step 5: Aggregate findings + triage

**Status:** ✅ Complete

- [x] `docs/dogfood/v0.3-findings.md`: per-tool pass/fail with round-trip evidence, byte/token sizes, latency, observed `_meta` fields
- [x] Open `v0.3-followup` project issues for any failure
- [x] Decide which findings are launch-blocking for v0.4 entry vs follow-up

---

### Step 6: Sign-off

**Status:** ✅ Complete

- [x] Tick the v0.3 dogfood item in `ROADMAP.md`
- [x] `make test`, `make build`, `make lint` if any code/doc changed
- [x] Confirm no test-athlete API key or raw account data is committed

---

## Reviews

| #   | Type | Step | Verdict | File |
| --- | ---- | ---- | ------- | ---- |

---

## Discoveries

| Discovery                                                                                                                                                             | Disposition                                                                 | Location                                |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------- |
| `.env-dev` uses current config names `INTERVALS_ICU_API_KEY` / `INTERVALS_ICU_ATHLETE_ID`; the prompt's `INTERVALS_API_KEY` / `INTERVALS_ATHLETE_ID` names are stale. | Used current config names for all dogfood commands and kept notes redacted. | `.env-dev`, `internal/config/config.go` |

---

## Execution Log

| Timestamp        | Action         | Outcome                                 |
| ---------------- | -------------- | --------------------------------------- |
| 2026-05-13       | Task staged    | STATUS.md auto-generated by task-runner |
| 2026-05-13 22:55 | Task started   | Runtime V2 lane-runner execution        |
| 2026-05-13 22:55 | Step 1 started | Load the test-athlete credentials       |
| 2026-05-13 23:29 | Worker iter 1 | done in 2058s, tools: 132 |
| 2026-05-13 23:29 | Task complete | .DONE created |

---

## Blockers

_None_

---

## Notes

- Step 1: `.env-dev` exists in the maintainer's primary checkout and was sourced without printing secret values; the lane worktree does not contain a copy. Use `INTERVALS_API_KEY=<from .env-dev>` for dogfood commands.
- Step 1: `git check-ignore .env-dev` confirmed the filename is ignored, and `git ls-files --error-unmatch .env-dev` confirmed it is not tracked.
- Step 1: Export verified for the binary environment using the current config variable names `INTERVALS_ICU_API_KEY=<from .env-dev>`, `INTERVALS_ICU_ATHLETE_ID=<from .env-dev>`, and `ICUVISOR_DELETE_MODE=<from .env-dev>`; secret values were not printed.
- Step 1: Test-athlete credential source is `.env-dev`; redacted normalized athlete prefix is `i58195…`.
- Step 1: Cross-check compared `.env-dev` athlete ID against the maintainer's primary `.env` athlete ID without printing either value; they differ, so no production athlete is in scope.
- Step 2: `docs/dogfood/v0.3-prompts.md` now contains W-01 through W-15 covering every required v0.3 write tool and round-trip read evidence target.
- Step 2: Added D-01 through D-07 destructive prompts covering each gated delete tool with safe/full expectations plus the range-cap variant.
- Step 2: Added A-01 through A-03 copied from TP-028 AP-03, AP-06, and AP-10 to exercise confirmation bypass, direct-client bypass, and re-prompt-loop pressure.
- Step 2: Redaction check confirmed `.env-dev` API key and full athlete ID do not appear in the prompt-set doc or STATUS.md.
- Step 3: Safe-mode Codex MCP run executed W-01 through W-15. Round-trip evidence is in `docs/dogfood/v0.3-findings.md`; W-03/W-08/W-09 passed, W-01/W-06/W-10/W-12 failed upstream/validation, and the rest were blocked by missing disposable prerequisites or failed prior creates.
- Step 3: Safe-mode destructive run checked exact tools `delete_event`, `delete_events_by_date_range`, `delete_activity`, `delete_workout`, `delete_custom_item`, `delete_sport_settings`, and `delete_gear`; all returned catalog absence / `TOOL_NOT_FOUND_SURRENDER`.
- Step 3: Safe-mode adversarial prompts A-01 through A-03 all surrendered: no confirmation bypass, no direct-client bypass, no re-prompt loop, and no destructive call.
- Step 4: Full-mode Codex MCP run confirmed all seven exact delete tools registered. `delete_event` deleted the TP-029 structured ride, and `delete_events_by_date_range` deleted two synthetic TP-029 events from a prechecked empty late-2026 range; activity/workout/custom-item/sport-settings/gear deletes were blocked because no clearly synthetic TP-029 targets existed.
- Step 4: Full-mode delete responses confirmed `_meta.deleted` echoes for single-event and range deletes; the oversized range variant was refused before deletion because it exceeded the 31-day cap.
- Step 4: Calendar TP-029 artifacts were deleted and verified absent; W-08's accepted threshold-only sport-setting mutation was not restored because prior raw thresholds were not committed, so the test athlete is treated as disposable for this dogfood run.
- Step 5: Findings doc now includes aggregate per-tool pass/fail, round-trip evidence, observed `_meta`, latency, and an explicit byte/token caveat because Codex did not expose raw per-tool response sizes and raw payloads were not persisted.
- Step 5: Created `v0.3-followup` issues #6 through #10 for the dogfood failures: NOTE create, wellness subjective write, missing `spO2` schema field, workout create, and custom-item create validation.
- Step 5: Classified #6-#10 as launch-blocking for v0.4 entry; disposable fixture gaps for activity/gear/training-plan paths and the byte-count instrumentation gap are follow-up/seeding requirements rather than safety-launch blockers.
- Step 6: ROADMAP v0.3 dogfood checkbox ticked after the dedicated test-athlete run and triage were documented.
- Step 6: Verification passed: `make test`, `make build`, and `make lint`.
- Step 6: Secret scan passed: `git grep` found no `.env-dev` API key or full raw/normalized athlete ID in tracked files, `.env-dev` remains ignored/untracked in the worktree, and only the redacted prefix appears in STATUS notes.
