Skip to content

Commit 49e4cca

Browse files
committed
Add admin system health diagnostics plan - PR_26171_GAMMA_013-admin-system-health-diagnostics-plan
1 parent 0514f85 commit 49e4cca

7 files changed

Lines changed: 541 additions & 104 deletions

admin/system-health.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ <h2>Admin</h2>
4343
<p>Storage Health</p>
4444
<p>Runtime Environment</p>
4545
<p>Limits &amp; Capacity</p>
46+
<p>Diagnostics Plan</p>
4647
<p>Diagnostics Log</p>
4748
</div>
4849
</details>
@@ -151,6 +152,30 @@ <h2 id="admin-system-health-title">System Health Tables</h2>
151152
</tbody>
152153
</table>
153154
</div>
155+
<div class="table-wrapper">
156+
<table class="data-table" aria-label="Diagnostics plan">
157+
<caption>Diagnostics Plan</caption>
158+
<thead>
159+
<tr>
160+
<th scope="col">Diagnostic Check</th>
161+
<th scope="col">Future Signal</th>
162+
<th scope="col">Planned Source</th>
163+
<th scope="col">Status</th>
164+
</tr>
165+
</thead>
166+
<tbody>
167+
<tr><td>Postgres Connection</td><td>Connection success, latency, and actionable failure detail</td><td>Server-owned Postgres health reader</td><td data-health-status="PENDING" title="Reason: live Postgres connection diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: live Postgres connection diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
168+
<tr><td>Postgres Migration Reader</td><td>Current migration version and pending migration signal</td><td>Server-owned Postgres migration reader</td><td data-health-status="PENDING" title="Reason: Postgres migration diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: Postgres migration diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
169+
<tr><td>R2 Bucket Configured</td><td>Configured bucket name presence without exposing secrets</td><td>Server-owned Cloudflare R2 configuration reader</td><td data-health-status="PENDING" title="Reason: R2 bucket configuration diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: R2 bucket configuration diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
170+
<tr><td>R2 List</td><td>List operation availability and scoped prefix result</td><td>Server-owned Cloudflare R2 storage diagnostic</td><td data-health-status="PENDING" title="Reason: R2 list diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: R2 list diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
171+
<tr><td>R2 Read</td><td>Health object read availability</td><td>Server-owned Cloudflare R2 storage diagnostic</td><td data-health-status="PENDING" title="Reason: R2 read diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: R2 read diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
172+
<tr><td>R2 Write</td><td>Health object write availability</td><td>Server-owned Cloudflare R2 storage diagnostic</td><td data-health-status="PENDING" title="Reason: R2 write diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: R2 write diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
173+
<tr><td>R2 Delete</td><td>Health object cleanup availability</td><td>Server-owned Cloudflare R2 storage diagnostic</td><td data-health-status="PENDING" title="Reason: R2 delete diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: R2 delete diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
174+
<tr><td>Runtime Environment Masking</td><td>Masked display verification for secret-bearing variables</td><td>Server-owned runtime environment diagnostic</td><td data-health-status="PENDING" title="Reason: automated runtime masking diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: automated runtime masking diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
175+
<tr><td>Limits/Capacity Metrics</td><td>DB size, connections, storage usage, and R2 Class A/Class B operation signals</td><td>Server-owned metrics diagnostic</td><td data-health-status="PENDING" title="Reason: limits and capacity diagnostics are intentionally not wired in this foundation PR." aria-label="PENDING: limits and capacity diagnostics are intentionally not wired in this foundation PR.">PENDING</td></tr>
176+
</tbody>
177+
</table>
178+
</div>
154179
</section>
155180
<aside class="tool-column tool-group-platform">
156181
<div class="tool-column-header">
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# PR_26171_GAMMA_013 Instruction Compliance Checklist
2+
3+
## Required Reads
4+
5+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
6+
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
7+
- PASS: Read exact target file `admin/system-health.html`.
8+
- PASS: Read existing target route test `tests/playwright/tools/AdminHealthOperationsPage.spec.mjs`.
9+
10+
## Pre-Step Artifact Gate
11+
12+
- PASS: Refreshed review artifacts before implementation.
13+
- PASS: Committed and pushed the artifact-only refresh before implementation because `codex_changed_files.txt` changed.
14+
- PASS: Verified `git status --short` was clean after artifact refresh commit.
15+
- PASS: Verified local/origin sync was `0 0` after artifact refresh commit.
16+
17+
## Ownership And Branch
18+
19+
- PASS: Queued PR name includes TEAM token `GAMMA`.
20+
- PASS: TEAM ownership was verified against `PROJECT_MULTI_PC.txt`.
21+
- PASS: User explicitly directed continuation on `team/GAMMA/admin`.
22+
- PASS: User explicitly directed updating existing draft PR #36 and not creating a separate PR013 GitHub PR.
23+
- PASS: Work remained within the Admin diagnostics/foundation scope.
24+
25+
## Scope Compliance
26+
27+
- PASS: Added clear diagnostics plan/foundation section to Admin System Health.
28+
- PASS: Defined future diagnostic check for Postgres connection.
29+
- PASS: Defined future diagnostic check for Postgres migration reader.
30+
- PASS: Defined future diagnostic check for R2 bucket configured.
31+
- PASS: Defined future diagnostic checks for R2 list/read/write/delete.
32+
- PASS: Defined future diagnostic check for runtime environment masking.
33+
- PASS: Defined future diagnostic check for limits/capacity metrics.
34+
- PASS: Kept all unwired checks as `PENDING`.
35+
- PASS: Added hover/accessibility reason text for every non-`PASS` status.
36+
- PASS: Did not add API wiring.
37+
- PASS: Did not add persistence.
38+
- PASS: Did not add SQLite.
39+
- PASS: Did not expose client-side secret values.
40+
- PASS: Preserved Theme V2-only implementation.
41+
42+
## Validation Compliance
43+
44+
- PASS: Ran `git diff --check`.
45+
- PASS: Ran targeted Admin System Health static validation.
46+
- PASS: Verified every non-`PASS` status has reason text.
47+
- PASS: Verified no `WARN` or `FAIL` placeholder health statuses exist.
48+
- PASS: Ran targeted Admin System Health Playwright route spec.
49+
- PASS: Did not run samples.
50+
51+
## Reports And Packaging
52+
53+
- PASS: Created queued-scope PR report.
54+
- PASS: Created manual validation notes.
55+
- PASS: Created instruction compliance checklist.
56+
- PASS: Generate `codex_review.diff` after staging scoped files.
57+
- PASS: Generate `codex_changed_files.txt` after staging scoped files.
58+
- PASS: Create repo-structured delta ZIP under `tmp/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan_delta.zip`.
59+
- PASS: Verify no report remains modified after ZIP creation.
60+
61+
## Merge Control
62+
63+
- PASS: No merge performed.
64+
- PASS: Owner-controlled EOD merge approval remains required.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_26171_GAMMA_013 Manual Validation Notes
2+
3+
## Manual Review Notes
4+
5+
- Reviewed `admin/system-health.html` after adding the diagnostics plan section.
6+
- Confirmed `Diagnostics Plan` appears in the Health Sections list and as a table caption.
7+
- Confirmed future diagnostic rows exist for Postgres connection, Postgres migration reader, R2 bucket configuration, R2 list/read/write/delete, runtime environment masking, and limits/capacity metrics.
8+
- Confirmed all diagnostics plan rows are `PENDING`.
9+
- Confirmed every diagnostics plan `PENDING` status includes hover/accessibility reason text through `title` and `aria-label`.
10+
- Confirmed no `WARN` or `FAIL` health status placeholders were added.
11+
- Confirmed no fake failure text was reintroduced.
12+
- Confirmed Postgres-only and Cloudflare R2 wording remains present.
13+
- Confirmed secret-bearing runtime environment rows remain masked as `********`.
14+
- Confirmed no API wiring, persistence, SQLite, page-local CSS, or page-local JavaScript was added.
15+
16+
## Validation Notes
17+
18+
- `git diff --check` passed.
19+
- Targeted Admin System Health static validation passed.
20+
- Existing targeted Admin System Health Playwright route spec passed with 3 tests.
21+
- Samples were not run because samples are outside this queued diagnostics plan scope.
22+
23+
## User Review Focus
24+
25+
- Review whether the diagnostics plan row names match the desired future implementation sequence.
26+
- Review the `PENDING` reason text for enough clarity before future API/runtime wiring PRs.
27+
- Confirm owner approval before any EOD merge.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# PR_26171_GAMMA_013-admin-system-health-diagnostics-plan
2+
3+
## Summary
4+
5+
Queued scope 013 was applied to the existing draft PR #36 workstream branch:
6+
7+
- PR #36: `PR_26171_GAMMA_011-admin-system-health-foundation`
8+
- Branch: `team/GAMMA/admin`
9+
10+
This queued scope adds a diagnostics plan/foundation section to Admin System Health without creating a separate GitHub PR.
11+
12+
## Scope Evidence
13+
14+
- Added a table-first `Diagnostics Plan` section to `admin/system-health.html`.
15+
- Added future diagnostic checks for:
16+
- Postgres connection
17+
- Postgres migration reader
18+
- R2 bucket configured
19+
- R2 list/read/write/delete
20+
- runtime environment masking
21+
- limits/capacity metrics
22+
- Kept all unwired diagnostics plan rows as `PENDING`.
23+
- Added `title` and `aria-label` reason text to each `PENDING` diagnostics plan status.
24+
- Preserved Postgres-only wording.
25+
- Preserved Cloudflare R2/R2 wording.
26+
- Preserved masked secret display and did not expose client-side secret values.
27+
- Did not add API wiring, persistence, SQLite, page-local CSS, or page-local JavaScript.
28+
29+
## Pre-Step Artifact Gate
30+
31+
- Refreshed review artifacts before implementation: PASS
32+
- Artifact refresh changed `docs_build/dev/reports/codex_changed_files.txt`: committed and pushed before implementation
33+
- Artifact-only pre-step commit: `0514f8583`
34+
- Clean status after artifact refresh commit: PASS
35+
- Local/origin sync after artifact refresh commit: PASS (`0 0`)
36+
37+
## Instruction Start Gate
38+
39+
- Instructions read: PASS
40+
- `docs_build/dev/PROJECT_INSTRUCTIONS.md`: read before edits
41+
- `docs_build/dev/PROJECT_MULTI_PC.txt`: read before edits
42+
- Current branch: `team/GAMMA/admin`
43+
- TEAM token: `GAMMA`
44+
- TEAM ownership: PASS by explicit Master Control/user assignment for diagnostics/admin workstream
45+
- Implementation path: `admin/system-health.html`
46+
- Existing draft PR target: PR #36
47+
- Separate PR creation: SKIP by explicit user instruction
48+
- Merge: SKIP, owner-controlled EOD approval remains required
49+
50+
Note: the merged instruction file still contains the older main-only branch guard. This queued update proceeded only after explicit user instruction to continue on `team/GAMMA/admin` and update existing draft PR #36 rather than creating a separate PR.
51+
52+
## Validation
53+
54+
- PASS: `git diff --check`
55+
- PASS: targeted Admin System Health source check found 37 status cells and 25 non-`PASS` statuses with reasons.
56+
- PASS: targeted source check found no fake failure text, no `WARN`/`FAIL` health status cells, and no SQLite text in `admin/system-health.html`.
57+
- PASS: targeted source check verified Postgres, Cloudflare R2, and all requested diagnostics plan labels.
58+
- PASS: targeted source check verified secret-bearing runtime environment rows remain masked as `********`.
59+
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --config=codex_playwright_system_chrome.config.cjs --project=playwright` (3 passed)
60+
61+
## Skipped Lanes
62+
63+
- Full samples smoke: skipped by request because this diagnostics plan foundation does not touch samples.
64+
- Full Playwright suite: skipped because the existing targeted Admin System Health route spec covers the changed route.
65+
- Runtime/API validation: skipped because no API wiring or persistence was added.
66+
67+
## Required Reports
68+
69+
- `docs_build/dev/reports/codex_review.diff`
70+
- `docs_build/dev/reports/codex_changed_files.txt`
71+
- `docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan.md`
72+
- `docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-manual-validation-notes.md`
73+
- `docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-instruction-compliance-checklist.md`
74+
75+
## ZIP Artifact
76+
77+
- `tmp/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan_delta.zip`
78+
- Generated from the current `team/GAMMA/admin` branch delta against the branch merge-base with `origin/main`, preserving the existing PR #36 workstream context.
79+
80+
## EOD Approval
81+
82+
No merge was performed. EOD merge remains owner-controlled and requires explicit approval.
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
Base merge-base: e8845dae6e990164072d4ee9b37ec81eda563fc3
2-
Head at artifact refresh: 2f4b8a5d493d479ed2442f5025cc2b2be863a3c3
2+
Head at artifact refresh: 0514f858342704357ec1cdf9b8af9497a9d40a1d
33

44
Working tree status at artifact generation:
5+
M admin/system-health.html
6+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-instruction-compliance-checklist.md
7+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-manual-validation-notes.md
8+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan.md
9+
M tests/playwright/tools/AdminHealthOperationsPage.spec.mjs
510

611
Changed files against merge-base:
712
M admin/system-health.html
@@ -11,19 +16,25 @@ A docs_build/dev/reports/PR_26171_GAMMA_011-admin-system-health-foundation.md
1116
A docs_build/dev/reports/PR_26171_GAMMA_012-admin-system-health-status-reason-cleanup-instruction-compliance-checklist.md
1217
A docs_build/dev/reports/PR_26171_GAMMA_012-admin-system-health-status-reason-cleanup-manual-validation-notes.md
1318
A docs_build/dev/reports/PR_26171_GAMMA_012-admin-system-health-status-reason-cleanup.md
19+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-instruction-compliance-checklist.md
20+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan-manual-validation-notes.md
21+
A docs_build/dev/reports/PR_26171_GAMMA_013-admin-system-health-diagnostics-plan.md
1422
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
1523
M docs_build/dev/reports/playwright_v8_coverage_report.txt
1624
M tests/playwright/tools/AdminHealthOperationsPage.spec.mjs
1725

1826
Stat against merge-base:
19-
admin/system-health.html | 360 +++++----------------
27+
admin/system-health.html | 367 ++++++---------------
2028
...-foundation-instruction-compliance-checklist.md | 32 ++
2129
...em-health-foundation-manual-validation-notes.md | 34 ++
2230
...171_GAMMA_011-admin-system-health-foundation.md | 65 ++++
2331
...son-cleanup-instruction-compliance-checklist.md | 57 ++++
2432
...tatus-reason-cleanup-manual-validation-notes.md | 26 ++
2533
...12-admin-system-health-status-reason-cleanup.md | 70 ++++
34+
...ostics-plan-instruction-compliance-checklist.md | 64 ++++
35+
...lth-diagnostics-plan-manual-validation-notes.md | 27 ++
36+
...MMA_013-admin-system-health-diagnostics-plan.md | 82 +++++
2637
.../dev/reports/coverage_changed_js_guardrail.txt | 6 +-
2738
.../dev/reports/playwright_v8_coverage_report.txt | 31 +-
28-
.../tools/AdminHealthOperationsPage.spec.mjs | 74 +++--
29-
10 files changed, 434 insertions(+), 321 deletions(-)
39+
.../tools/AdminHealthOperationsPage.spec.mjs | 87 ++++-
40+
13 files changed, 636 insertions(+), 312 deletions(-)

0 commit comments

Comments
 (0)