diff --git a/PROJECT_HYGIENE.md b/PROJECT_HYGIENE.md index 9ca81d1..a8c8f55 100644 --- a/PROJECT_HYGIENE.md +++ b/PROJECT_HYGIENE.md @@ -197,6 +197,7 @@ When the user corrects your approach, append a one-line rule here before ending - **`test_harness.py` is stale: it reads `user_id` from `.credentials.json`, which now holds `email` / `access_token` / `id_token` / `refresh_token`.** It exits before doing anything useful. Fix the key names (and refresh the token per the README's reCAPTCHA step) before relying on it. - **All five files in `openspec/specs/` fail `openspec validate --specs`** for a missing `## Purpose` section. Pre-existing and repo-wide as of 2026-09-06, so a failing spec validation is not necessarily caused by your change — check whether the error is only the Purpose one before chasing it. - **TODO — verification debt from `fix-cognito-signin` (v0.3.5 shipped without on-device checks, maintainer decision 2026-11-07).** The Cognito direct sign-in was verified only by the automated suite (stdlib API tests and pytest config-flow tests) and the README token was checked in Firefox and Chromium; no sign-in reached the live service from Home Assistant. When there is time for a reinstall: (1) add the integration from scratch with a README token and confirm sensors populate; (2) a wrong password must return to the email/password form with `invalid_credentials` and Cognito's reason, and a token older than 2 minutes must stay on the token step with `token_rejected`; (3) trigger a reauth and confirm it succeeds (with a keg fitted, this also clears the Keg Freshness TODO above). Details in the archived change's `tasks.md`, section "Deferred". +- **TODO — verification debt from `add-keg-48180` (card 0.4.3 shipped without an on-device check, maintainer decision 2026-11-07).** Do it together with the `fix-cognito-signin` checks above: on a dashboard with card 0.4.3, confirm the card editor's beer picker lists Camden Stout with its artwork; with a 48180 keg fitted, confirm the Keg sensor reads "Camden Stout" and the card brands it. - **TODO — own OpenSpec change: persist Cognito-refreshed tokens back to the config entry.** `PerfectDraftApiClient.refresh_access_token()` updates `_access_token`/`_id_token` in memory only, so every HA restart reloads the stale access token and burns a wasted 401-plus-refresh round trip before the first successful poll. Harmless today because the refresh token is what actually gates reauth and Cognito's `REFRESH_TOKEN_AUTH` never issues a new one, so nothing is lost — just wasteful. Deferred out of `fix-reauth-flow` to keep that diff surgical. - **TODO — housekeeping, after `fix-cognito-signin` / `add-keg-48180` ship: take the GitHub token out of the `github` remote URLs** in both this repo and `Hassio-PerfectDraftPro-Component`. Not a leak (never committed; `.git/` is untracked), but `git remote -v` prints it. Order matters: first change `credential.helper` to an **absolute** path (`store --file=/home/rick/Lab/Dev//.git/credentials`) — the current relative `.git/credentials` resolves against the worktree root, where `.git` is a file, so pushes from `.worktree/` only reach `github` (whose URL carries the token); pushing to `origin` from a worktree fails with "unable to open .git/credentials: Not a directory". Until fixed, push agent branches from the main checkout: `git push origin agent/` (no branch switch needed). Then strip the URL, run `git ls-remote github` from a worktree to prove auth, and update the `AGENTS.md` helper command to the absolute form. - **Config-flow tests run in `.venv-test` (main checkout) on the system Python 3.14** with `pytest-homeassistant-custom-component==0.13.375` (core 2026.10.4). Run them from a worktree as `../../.venv-test/bin/pytest tests/`. Do not pin a harness that needs Python 3.12: there is no 3.12 and no C compiler on the dev host, so old numpy cannot build. diff --git a/openspec/changes/add-keg-48180/tasks.md b/openspec/changes/add-keg-48180/tasks.md index 1ff19ab..cab83dc 100644 --- a/openspec/changes/add-keg-48180/tasks.md +++ b/openspec/changes/add-keg-48180/tasks.md @@ -24,7 +24,12 @@ Work in `Hassio-PerfectDraftPro-Component`. ## 4. Joint verification -- [ ] 4.1 With `fix-cognito-signin` also applied, install integration 0.3.5 and card 0.4.3 on Home Assistant; if a 48180 keg is unavailable, confirm instead that the card editor's beer picker lists the new entry with its artwork, and that `getBeerByKegId("48180")` resolves it in a browser console on the dashboard + +## Deferred: shipping without on-device checks + +Maintainer decision, 2026-11-07: ship card 0.4.3 and the 48180 catalog entry without this check (no time for a Home Assistant reinstall), as with `fix-cognito-signin` 5.2–5.4. Coverage at release: catalog unit tests (117 keys, ordering), `npm run lint`, `npm run check:catalog` (117/117) and a clean `npm run build` with the artwork in `dist/`. The open TODO is in `PROJECT_HYGIENE.md`. + +- 4.1 With `fix-cognito-signin` also applied, install integration 0.3.5 and card 0.4.3 on Home Assistant; if a 48180 keg is unavailable, confirm instead that the card editor's beer picker lists the new entry with its artwork, and that `getBeerByKegId("48180")` resolves it in a browser console on the dashboard ## Workflow follow-up