Handover: correct the test count to 484

This commit is contained in:
ai-bot committed 2026-10-15 16:02:17 +00:00
1 parent 31fcc2b611
commit c8079cd3b8
1 file changed
+8 -5
+8 -5
View File
@@ -8,7 +8,7 @@ Short working handover for the next model. Keep it short.
## Status ## Status
- **Done and verified:** sections 1–31 and section 18 steps 1–11. **Section 32.2, the UI pass with the retro theme, and the SVG half of section 32.1, the icon, are also done**, together with **section 32.4, the bug report** (round 32-A and round 32-B) and **section 32.3, the alert and page texts**. Schema version 12. **485 green tests.** The StartOS package is built, sideloaded and running on a StartOS 0.4.0 box; the package version is still `0.1.0:0`. - **Done and verified:** sections 1–31 and section 18 steps 1–11. **Section 32.2, the UI pass with the retro theme, and the SVG half of section 32.1, the icon, are also done**, together with **section 32.4, the bug report** (round 32-A and round 32-B) and **section 32.3, the alert and page texts**. Schema version 12. **484 green tests.** The StartOS package is built, sideloaded and running on a StartOS 0.4.0 box; the package version is still `0.1.0:0`.
- **What is left of section 32:** the two PNG icons at 192 and 512 px (they need a rasterizer), 32.6 the documentation drift, and 32.5 the raise to `1.0.0:0` together with section 18 step 12. 32.6 has to come after 32.1–32.2 and before 32.5. One item inside 32.4 is left to the user: **BR-003** — read the 32.4 section below before acting on it, because the report's own wording for it is out of date. - **What is left of section 32:** the two PNG icons at 192 and 512 px (they need a rasterizer), 32.6 the documentation drift, and 32.5 the raise to `1.0.0:0` together with section 18 step 12. 32.6 has to come after 32.1–32.2 and before 32.5. One item inside 32.4 is left to the user: **BR-003** — read the 32.4 section below before acting on it, because the report's own wording for it is out of date.
- **A round stops when it is done.** Do not start the next item unless the user asks. - **A round stops when it is done.** Do not start the next item unless the user asks.
- **Verified how:** the automated suite, the user's manual browser testing, and the install and test round on a StartOS 0.4.0 box. The user runs the suite; the agent has no shell. - **Verified how:** the automated suite, the user's manual browser testing, and the install and test round on a StartOS 0.4.0 box. The user runs the suite; the agent has no shell.
@@ -26,18 +26,20 @@ Short working handover for the next model. Keep it short.
## Round 32.2 — the UI pass and the retro theme ## Round 32.2 — the UI pass and the retro theme
`static/styles.css` was rewritten as a Windows application of the mid-1990s: background `#c0c0c0`, fields `#ffffff`, dark edge `#808080`, darkest `#000000`, a navy `#000080` title bar with white text, and no radius, shadow or gradient anywhere. Depth comes from two-tone bevels only. Headings are title bars, buttons are raised and go sunken on `:active`, fields are sunken wells, focus is the classic `outline: 1px dotted #000000`, and the tables are a 1 px grid. The responsive rules and every selector the scripts and the tests rely on are unchanged, including the exact string `.rotation-list { margin-top: 22px; }`. `static/styles.css` was rewritten as a Windows application of the mid-1990s: background `#c0c0c0`, fields `#ffffff`, dark edge `#808080`, darkest `#000000`, a navy `#000080` title bar with white text, and no rounded corner, shadow or gradient anywhere. Depth comes from two-tone bevels only. Headings are title bars, buttons are raised and go sunken on `:active`, fields are sunken wells, focus is the classic `outline: 1px dotted #000000`, and the tables are a 1 px grid. The responsive rules and every selector the scripts and the tests rely on are unchanged, including the exact string `.rotation-list { margin-top: 22px; }`.
- **The only `border-radius` in the sheet is an explicit reset to 0.** It is there so a browser's own rounded control never shows through, and the test asserts exactly that: every `border-radius` value found in the sheet must be `0`. Do not drop the reset, and do not add a rounded corner.
- **`theme-color` and the manifest move together.** The five pages, `/login` and `theme_color`/`background_color` in `static/manifest.webmanifest` are all `#c0c0c0` now, and `tests/test_pwa.py` asserts that. - **`theme-color` and the manifest move together.** The five pages, `/login` and `theme_color`/`background_color` in `static/manifest.webmanifest` are all `#c0c0c0` now, and `tests/test_pwa.py` asserts that.
- **The key card changed shape.** The number and the type share the top line (`01 · Hardware` via `keyTypeLabel()`), the type has no line of its own, the path stands alone in italics (`.key-path`) with no `Address path:` prefix, the model is a line of its own under the name with no `Model:`/`Service:` prefix and is **left out entirely when it only repeats the key's name** (`sameLabel()` normalizes case and whitespace), and only `Next check due` is shown — `Last checked` is gone. `tests/test_key_status.py` and `tests/test_health_check_form.py` pin the new order, so a fourth line or a reordered card breaks them. - **The key card changed shape.** The number and the type share the top line (`01 · Hardware` via `keyTypeLabel()`), the type has no line of its own, the path stands alone in italics (`.key-path`) with no `Address path:` prefix, the model is a line of its own under the name with no `Model:`/`Service:` prefix and is **left out entirely when it only repeats the key's name** (`sameLabel()` normalizes case and whitespace), and only `Next check due` is shown — `Last checked` is gone. `tests/test_key_status.py` and `tests/test_health_check_form.py` pin the new order, so a fourth line or a reordered card breaks them.
- **The dashboard heading is dynamic.** `p#setup-shape` in `index.html` carries the fallback `Bitcoin Health Monitor for a Multisig Setup.`, and `renderSetupHeading()` in `app.js` replaces it with `Bitcoin Health Monitor for a ${threshold}-of-${key_count} Multisig Setup.` from `/api/setup`. The static description and the whole `section.setup-card` are gone, and `setupTitle`, `setupDescription` and `renderSetupShape()` were removed with them, so no `null` reference is left. **The manifest description stays `Bitcoin Multisig Health Monitor`** (section 29) — only the dashboard line is dynamic. `tests/test_app.py` asserts that the dashboard no longer contains the static description. - **The dashboard heading is dynamic.** `p#setup-shape` in `index.html` carries the fallback `Bitcoin Health Monitor for a Multisig Setup.`, and `renderSetupHeading()` in `app.js` replaces it with `Bitcoin Health Monitor for a ${threshold}-of-${key_count} Multisig Setup.` from `/api/setup`. The static description and the whole `section.setup-card` are gone, and `setupTitle`, `setupDescription` and `renderSetupShape()` were removed with them, so no `null` reference is left. **The manifest description stays `Bitcoin Multisig Health Monitor`** (section 29) — only the dashboard line is dynamic. `tests/test_app.py` asserts that the dashboard no longer contains the static description.
- **The field reminder moved.** `Never paste a seed phrase or a private key here.` now stands **once**, as a `p.secret-warning` above the whole key list in `setup.html`. It is gone from `health-check.html` (3 static fields), `health-check.js` (3), `settings.js` (2) and `setup.js` (one per card). `secretWarning()` no longer exists in `setup.js` at all. The server is untouched: `secret_guard.py`, `validation.py` and `auth.py` still refuse a secret in every free-text field. `WarningTests` in `tests/test_secret_guard.py` was rewritten to pin the new rule, and `TODO.md` §2, §12 and §15 were reworded. - **The field reminder moved.** `Never paste a seed phrase or a private key here.` now stands **once**, as a `p.secret-warning` above the whole key list in `setup.html`. It is gone from `health-check.html` (3 static fields), `health-check.js` (3), `settings.js` (2) and `setup.js` (one per card). `secretWarning()` no longer exists in `setup.js` at all. The server is untouched: `secret_guard.py`, `validation.py` and `auth.py` still refuse a secret in every free-text field. `WarningTests` in `tests/test_secret_guard.py` was rewritten to pin the new rule (5 tests, down from 6), and `TODO.md` §2, §12 and §15 were reworded.
- **Two review lists went.** `Needs assessment` is gone from the Review summary in `health-check.js` (the form itself shows what is missing), and so is the `Key N: … · Check date: … · Next check due: …` line. `Results requiring follow-up` stays, and `tests/test_health_check_form.py` now asserts `assertNotIn("Needs assessment", script)`. - **Two review lists went.** `Needs assessment` is gone from the Review summary in `health-check.js` (the form itself shows what is missing), and so is the `Key N: … · Check date: … · Next check due: …` line. `Results requiring follow-up` stays, and `tests/test_health_check_form.py` now asserts `assertNotIn("Needs assessment", script)`.
- **The history list card changed.** It shows the date, `Key N: <name>` for each key (from the new `key_names`), and one short status, `All OK` or `Needs follow-up` (from the new `needs_follow_up`). `Next check due` and the `Software` text are gone from the card; the read-only detail view keeps every field it had. - **The history list card changed.** It shows the date, `Key N: <name>` for each key (from the new `key_names`), and one short status, `All OK` or `Needs follow-up` (from the new `needs_follow_up`). `Next check due` and the `Software` text are gone from the card; the read-only detail view keeps every field it had.
- **The two new summary fields are additive.** `GET /api/health-checks` still returns everything `list_health_checks()` returns and adds `key_names` (the name each key has now, in the same order as `key_numbers`) and `needs_follow_up` (whether that check raised anything to follow up, from `build_alerts()` — the same rules the dashboard uses). `needs_follow_up` is a property of the saved check itself, so closing an alert or renaming the key later does **not** change it; that is deliberate and pinned by `test_the_history_list_marks_a_check_that_needs_follow_up`. The enrichment lives in `app.py`'s `_send_health_check_list`, so `database.py` is untouched. - **The two new summary fields are additive.** `GET /api/health-checks` still returns everything `list_health_checks()` returns and adds `key_names` (the name each key has now, in the same order as `key_numbers`) and `needs_follow_up` (whether that check raised anything to follow up, from `build_alerts()` — the same rules the dashboard uses). `needs_follow_up` is a property of the saved check itself, so closing an alert or renaming the key later does **not** change it; that is deliberate and pinned by `test_the_history_list_marks_a_check_that_needs_follow_up`. The enrichment lives in `app.py`'s `_send_health_check_list`, so `database.py` is untouched.
- **The tables stay inside the page.** `table-layout: fixed` and `overflow-wrap: break-word` on `.detail-table`, plus a smaller font and tighter padding in the `max-width: 700px` query, keep `Security status` and `Follow-up closed` from running off a narrow screen. CSS only, no new JavaScript. - **The tables stay inside the page.** `table-layout: fixed` and `overflow-wrap: break-word` on `.detail-table`, plus a smaller font and tighter padding in the `max-width: 700px` query, keep `Security status` and `Follow-up closed` from running off a narrow screen. CSS only, no new JavaScript.
- **`Local service` and `Your data stays local.` are gone** from the top bar and the footer on all six pages, including `/login`. - **`Local service` and `Your data stays local.` are gone** from the top bar and the footer on all six pages, including `/login`.
- **Tests:** `tests/test_health_check_form.py` (+6), `tests/test_app.py` (+2, one renamed), `tests/test_secret_guard.py` (WarningTests rewritten, same count), `tests/test_key_status.py` (one test renamed and extended) and `tests/test_pwa.py` (colours). The suite went from 477 to 485. - **Tests:** `tests/test_health_check_form.py` (+6), `tests/test_app.py` (+2, one renamed), `tests/test_secret_guard.py` (WarningTests rewritten, 6 → 5), `tests/test_key_status.py` (one test renamed and extended) and `tests/test_pwa.py` (colours). The suite went from 477 to 484.
- **The help-line test is page-aware on purpose.** `settings.html` has no `class="field-grid"` at all, so the test maps each of the three pages to the block it actually puts under the help line: a field grid on the setup page, a stack on the check form and on the settings page. Do not "simplify" it back to one block name for all three.
## Section 32.4 — the bug report, as it turned out ## Section 32.4 — the bug report, as it turned out
@@ -52,7 +54,7 @@ Short working handover for the next model. Keep it short.
- **BR-007 — confirmed and fixed.** The service worker only stores a successful, same-origin, non-redirected response. - **BR-007 — confirmed and fixed.** The service worker only stores a successful, same-origin, non-redirected response.
- **BR-008 — confirmed and fixed.** The address-path comparison is canonical. - **BR-008 — confirmed and fixed.** The address-path comparison is canonical.
- **The report was written against a different file set.** It asks for `SECURITY.md`, `PRIVACY.md`, `THREATMODEL.md`, `PLATFORM-ACCESS.md`, `ENCRYPTION.md`, `OFFLINE.md`, `AI-STATUS.md` and `DATA-MODEL.md`; none of them exist here. Do not create them. - **The report was written against a different file set.** It asks for `SECURITY.md`, `PRIVACY.md`, `THREATMODEL.md`, `PLATFORM-ACCESS.md`, `ENCRYPTION.md`, `OFFLINE.md`, `AI-STATUS.md` and `DATA-MODEL.md`; none of them exist here. Do not create them.
- **The counts in the report were partly wrong and are corrected there.** Round 32-A added ten tests, not eight, and `tests/test_secret_guard.py` holds 43, not 44: 5 wordlist tests, 10 detection tests, 17 field-level tests, 6 warning tests and 5 API tests. The suite went from 422 to 475, which is the number the user confirmed. Round 32.3 added two more — one in `tests/test_alerts.py` and one in `tests/test_health_check_form.py` — and round 32.2 added eight, for 485. - **The counts in the report were partly wrong and are corrected there.** Round 32-A added ten tests, not eight, and `tests/test_secret_guard.py` holds 43, not 44: 5 wordlist tests, 10 detection tests, 17 field-level tests, 6 warning tests and 5 API tests. The suite went from 422 to 475, which is the number the user confirmed. Round 32.3 added two more — one in `tests/test_alerts.py` and one in `tests/test_health_check_form.py` — and round 32.2 added seven net, for 484. The seven are six new tests in `tests/test_health_check_form.py` and two in `tests/test_app.py`, minus the one `WarningTests` test that the rewritten class no longer has.
## Round 32.3 — the alert texts and the page texts ## Round 32.3 — the alert texts and the page texts
@@ -196,6 +198,7 @@ Five things that are easy to break:
- **`static/health-check.js` must not use `placeholder` anywhere.** A test asserts the string is absent, because a previous value is a real input value. - **`static/health-check.js` must not use `placeholder` anywhere.** A test asserts the string is absent, because a previous value is a real input value.
- **The key card's line order is pinned by two test modules.** `tests/test_key_status.py` asserts `card.append(top, name)` → `card.append(model)` → `card.append(path)`, and `tests/test_health_check_form.py` asserts that the top line is `${String(entry.key_number).padStart(2, "0")} · ${keyTypeLabel(entry.type)}`, that `card.append(type)` is gone, and that the model line is skipped by `sameLabel(entry.model, entry.name)`. Adding a line, reordering them, or dropping `sameLabel()` breaks them. - **The key card's line order is pinned by two test modules.** `tests/test_key_status.py` asserts `card.append(top, name)` → `card.append(model)` → `card.append(path)`, and `tests/test_health_check_form.py` asserts that the top line is `${String(entry.key_number).padStart(2, "0")} · ${keyTypeLabel(entry.type)}`, that `card.append(type)` is gone, and that the model line is skipped by `sameLabel(entry.model, entry.name)`. Adding a line, reordering them, or dropping `sameLabel()` breaks them.
- **The dashboard heading is dynamic and the static description is gone.** `tests/test_app.py` asserts `id="setup-shape"` and the fallback text on the dashboard and `assertNotIn("Bitcoin Multisig Health Monitor")` there, while `tests/test_pwa.py` still asserts that exact description in the manifest. Do not move the one into the other. - **The dashboard heading is dynamic and the static description is gone.** `tests/test_app.py` asserts `id="setup-shape"` and the fallback text on the dashboard and `assertNotIn("Bitcoin Multisig Health Monitor")` there, while `tests/test_pwa.py` still asserts that exact description in the manifest. Do not move the one into the other.
- **The stylesheet test asserts on the shape of the theme, not on its wording.** `test_stylesheet_is_the_retro_theme` checks the two bevel colour pairs, the dotted focus outline, the font stack, the absence of `box-shadow` and `gradient`, and that every `border-radius` in the sheet is `0`. It reads the values, so a restyled rule that keeps the palette passes, and a rounded corner does not.
- **`make x86` runs `prettier --check startos`, and the config is the SDK's own.** `.prettierrc` is the single line `"@start9labs/start-sdk/prettier.config.json"`, which is `{ trailingComma: "all", tabWidth: 2, semi: false, singleQuote: true }` — everything else is prettier's default, so `printWidth` is 80 and `quoteProps` is `"as-needed"`. That last one silently unquotes a single-word i18n key (`Username: 21`, not `'Username': 21`), and 80 columns decides when an array element or an argument collapses onto one line. Write it the way prettier would, or run `npx prettier --config node_modules/@start9labs/start-sdk/prettier.config.json --write startos`. - **`make x86` runs `prettier --check startos`, and the config is the SDK's own.** `.prettierrc` is the single line `"@start9labs/start-sdk/prettier.config.json"`, which is `{ trailingComma: "all", tabWidth: 2, semi: false, singleQuote: true }` — everything else is prettier's default, so `printWidth` is 80 and `quoteProps` is `"as-needed"`. That last one silently unquotes a single-word i18n key (`Username: 21`, not `'Username': 21`), and 80 columns decides when an array element or an argument collapses onto one line. Write it the way prettier would, or run `npx prettier --config node_modules/@start9labs/start-sdk/prettier.config.json --write startos`.
- **The page heading uses `class="eyebrow"` too.** A regex over `health-check.html` finds `Annual security check` before the numbered sections. `settings.html` starts with the `h1` `Settings`, then `01 / Wallet software` and `02 / Key rotation` — the eyebrow that repeated the `h1` was removed in round 32.3. `tests/test_health_check_form.py` asserts those two lists **exactly**, so a new eyebrow on either page breaks it, and so does a removed one: update the list in the same change. The 32-B warnings deliberately used `class="secret-warning"`, not an eyebrow. - **The page heading uses `class="eyebrow"` too.** A regex over `health-check.html` finds `Annual security check` before the numbered sections. `settings.html` starts with the `h1` `Settings`, then `01 / Wallet software` and `02 / Key rotation` — the eyebrow that repeated the `h1` was removed in round 32.3. `tests/test_health_check_form.py` asserts those two lists **exactly**, so a new eyebrow on either page breaks it, and so does a removed one: update the list in the same change. The 32-B warnings deliberately used `class="secret-warning"`, not an eyebrow.
- **A static help line that the script overwrites is dead text.** `#software-help` in `health-check.html` was emptied in round 32.3, because `lockSoftwareFields()` fills it before the user can read it. `static/health-check.js` must keep setting it — the wording depends on the selected key. A test pins both halves: the empty element in the markup and `softwareHelp.textContent` in the script. - **A static help line that the script overwrites is dead text.** `#software-help` in `health-check.html` was emptied in round 32.3, because `lockSoftwareFields()` fills it before the user can read it. `static/health-check.js` must keep setting it — the wording depends on the selected key. A test pins both halves: the empty element in the markup and `softwareHelp.textContent` in the script.