|
| 1 | +# Final verification: populated audit history |
| 2 | + |
| 3 | +## Scope and commits |
| 4 | + |
| 5 | +This handoff verifies the recovered, restored functional lab and the populated |
| 6 | +audit-history UI evidence produced by this work. |
| 7 | + |
| 8 | +Commits created before this handoff: |
| 9 | + |
| 10 | +- `5556dbe9 test(ui): persist audit history in functional lab` |
| 11 | +- `52bbe45f test(ui): verify functional audit persistence` |
| 12 | +- `e722ba7c test(ui): exercise populated audit history` |
| 13 | + |
| 14 | +Initial report commit: `d3c81f67 docs(ui): record populated audit verification`. |
| 15 | + |
| 16 | +No production UI correction was required after browser review. |
| 17 | + |
| 18 | +## Recovery and audit evidence |
| 19 | + |
| 20 | +The controlled failure produced successful `DeadMaster` recovery records for |
| 21 | +`mysql1:3306`; the recorded successor was `mysql2:3306`. Two recovery records |
| 22 | +are present, each records `IsSuccessful: true`, `AnalysisEntry.Analysis: |
| 23 | +DeadMaster`, and the successor `mysql2:3306` (the most recent is ID 2). |
| 24 | + |
| 25 | +Fresh API counts from 2026-08-12 14:54 ICT: |
| 26 | + |
| 27 | +| Endpoint | Records | |
| 28 | +| --- | ---: | |
| 29 | +| `/api/audit/0` | 20 | |
| 30 | +| `/api/audit-failure-detection/0` | 2 | |
| 31 | +| `/api/audit-recovery/0` | 2 | |
| 32 | + |
| 33 | +Both detection records and both recovery records represent `DeadMaster` for |
| 34 | +`mysql1:3306`; the recovery records are successful with `mysql2:3306` as |
| 35 | +successor. |
| 36 | + |
| 37 | +## Restored topology and identity |
| 38 | + |
| 39 | +Fresh container inspection retained the IDs captured by the recovery harness: |
| 40 | + |
| 41 | +| Service | Container ID | State | Role / replication | |
| 42 | +| --- | --- | --- | --- | |
| 43 | +| mysql1 | `76e92eb4a8be` | healthy | `read_only=0` | |
| 44 | +| mysql2 | `ca05b9577b38` | healthy | source `mysql1`; IO `Yes`; SQL `Yes` | |
| 45 | +| mysql3 | `cf2ffd96825e` | healthy | source `mysql1`; IO `Yes`; SQL `Yes` | |
| 46 | + |
| 47 | +This matches the pre-restoration identity record: no MySQL container was |
| 48 | +recreated. `SHOW REPLICA STATUS\\G` for mysql2 and mysql3 also reported zero |
| 49 | +last IO and SQL errors and zero seconds behind source. |
| 50 | + |
| 51 | +## Automated verification |
| 52 | + |
| 53 | +All prescribed commands were run fresh and exited zero: |
| 54 | + |
| 55 | +| Command / suite | Result | |
| 56 | +| --- | --- | |
| 57 | +| `go test ./go/http -count=1` | 1 package passed; fresh JSON run counted 77 passing Go tests | |
| 58 | +| `for file in go/http/testdata/*_test.js; do node --test "$file" \|\| exit 1; done` | 4 Node test files; 23/23 tests passed | |
| 59 | +| `node --check resources/public/js/*.js` | 30/30 JavaScript files parsed successfully | |
| 60 | +| `bash tests/functional/test-smoke.sh` | 35 passed, 0 failed, 0 skipped | |
| 61 | +| `git diff --check` | no whitespace errors | |
| 62 | + |
| 63 | +The smoke run rediscovered all three instances and passed its audit-persistence, |
| 64 | +web/API, health, metrics, and ProxySQL checks. |
| 65 | + |
| 66 | +## Commit hygiene |
| 67 | + |
| 68 | +After the initial report commit `d3c81f67`, `git status --short` produced no |
| 69 | +output. The tracked worktree was clean; this report was the only file staged |
| 70 | +and committed for that handoff. |
| 71 | + |
| 72 | +## Browser evidence |
| 73 | + |
| 74 | +Task 3 inspected the populated application at the default desktop viewport and |
| 75 | +again at 390x844. At both sizes: |
| 76 | + |
| 77 | +- `/web/audit` displayed its populated rows and correct pager states. |
| 78 | +- `/web/audit-failure-detection` displayed two `DeadMaster` detections; the |
| 79 | + expanded detection showed the two replicas, changelog, processing node, and |
| 80 | + its recovery link. |
| 81 | +- `/web/audit-recovery` displayed two `DeadMaster` recoveries and working UID |
| 82 | + detail links. |
| 83 | +- `/web/audit-recovery/id/2` displayed failed `mysql1:3306`, successor |
| 84 | + `mysql2:3306`, timing and acknowledgement data, affected replicas, and all |
| 85 | + 26 recovery steps. Its related-detection link also rendered the corresponding |
| 86 | + detail. |
| 87 | + |
| 88 | +At 390px, the table/detail shells scrolled internally without document-level |
| 89 | +horizontal overflow; empty and unavailable states stayed hidden while populated |
| 90 | +content was shown. Browser console inspection found **0 errors and 0 warnings** |
| 91 | +at both viewport sizes. |
| 92 | + |
| 93 | +## Safety and unresolved concerns |
| 94 | + |
| 95 | +The final state has the original mysql1 writer and two healthy replicas sourced |
| 96 | +from mysql1. The recovery workflow restored this topology without recreating |
| 97 | +containers, deleting volumes, or discarding SQLite history. |
| 98 | + |
| 99 | +Unresolved concerns: **none**. Docker Compose emitted its pre-existing |
| 100 | +obsolete-top-level-`version` notice and the MySQL client emitted its standard |
| 101 | +password-on-command-line warning during the earlier live verification. |
| 102 | + |
| 103 | +## Final safety corrections (2026-08-12) |
| 104 | + |
| 105 | +Three Important review findings were corrected without running another live |
| 106 | +failover: |
| 107 | + |
| 108 | +- The recovery poll now uses a `SECONDS + 90` wall-clock deadline, limits each |
| 109 | + curl to at most two seconds (and to the remaining deadline budget near the |
| 110 | + boundary), and reports actual elapsed seconds. |
| 111 | +- `restore_lab` returns immediately unless this harness stopped mysql1. During |
| 112 | + restoration it starts only mysql1; mysql2/mysql3 are never started, and |
| 113 | + replication repair is attempted only through `exec` against their existing |
| 114 | + running containers. |
| 115 | +- successful `begin-maintenance` responses retain the existing Code, Message, |
| 116 | + `Details.Hostname`, and `Details.Port` fields while adding the created key as |
| 117 | + `Details.MaintenanceKey`. The smoke test accepts only the direct successful |
| 118 | + response for mysql2, extracts its positive integer key, and ends maintenance |
| 119 | + only through `/api/end-maintenance/{key}`. |
| 120 | + |
| 121 | +Strict RED evidence was captured before each correction. The handler contract |
| 122 | +first failed to build with `undefined: maintenanceBegunResponse`. After the |
| 123 | +minimal API response change exposed the shell regressions, the focused test |
| 124 | +reported all missing deadline/no-op/keyed-cleanup contracts and detected both |
| 125 | +unsafe instance cleanup branches. A second deadline-boundary RED reported the |
| 126 | +missing remaining-budget calculation before that behavior was added. |
| 127 | + |
| 128 | +A final scoped review found that the first key-returning response had replaced |
| 129 | +the historical instance details with a number. The additive compatibility test |
| 130 | +failed against that version because numeric Details could not decode into |
| 131 | +`Hostname`, `Port`, and `MaintenanceKey`. The corrected response preserves the |
| 132 | +two historical fields and adds the key; the smoke consumer now verifies all |
| 133 | +three before cleanup. Failure responses remain unchanged. |
| 134 | + |
| 135 | +Fresh GREEN verification: |
| 136 | + |
| 137 | +| Command | Result | |
| 138 | +| --- | --- | |
| 139 | +| focused three-regression `go test` | pass | |
| 140 | +| `go test ./go/http -count=1` | pass | |
| 141 | +| four `go/http/testdata/*_test.js` files | 23/23 pass | |
| 142 | +| `bash -n` on both changed functional scripts | pass | |
| 143 | +| `bash tests/functional/test-smoke.sh` | 35 passed, 0 failed, 0 skipped | |
| 144 | +| `git diff --check` | pass | |
| 145 | + |
| 146 | +The test binary was rebuilt for the lab's Linux/arm64 platform and only the |
| 147 | +Orchestrator service was recreated. The smoke test received |
| 148 | +`Details.MaintenanceKey` 1 alongside the historical instance fields, ended |
| 149 | +exactly that key, and passed 35/35 checks. MySQL container ID comparison before |
| 150 | +and after had no diff. The first smoke attempt failed safely at readiness |
| 151 | +because a host Darwin binary had been mounted into the Linux container; no |
| 152 | +maintenance call occurred. Rebuilding in the existing `golang:1.25.7` Linux |
| 153 | +image corrected that environment mismatch. No live failover was run. |
| 154 | +command-line-password warning during topology inspection; neither is an |
| 155 | +application/browser-console warning or a verification failure. |
0 commit comments