From d9c2e94b2e66d85683da1a7b0e6859502d3269b4 Mon Sep 17 00:00:00 2001 From: vishnuatgit Date: Mon, 9 Nov 2026 15:57:09 +0530 Subject: [PATCH] Upgrade runtime dependencies to clear 48 known advisories, fix accessibility findings, and record the automated acceptance check --- docs/sdlc.md | 4 ++-- docs/uat.md | 35 +++++++++++++++++++++++++++++ target_app/deepbell/routes/pages.py | 2 +- target_app/requirements.txt | 20 ++++++++--------- target_app/static/app.js | 1 + target_app/static/styles.css | 10 +++++---- target_app/templates/index.html | 32 +++++++++++++------------- 7 files changed, 71 insertions(+), 33 deletions(-) diff --git a/docs/sdlc.md b/docs/sdlc.md index 267f139..f37e27d 100644 --- a/docs/sdlc.md +++ b/docs/sdlc.md @@ -38,7 +38,7 @@ Every user and system flow, with the functions involved, is in [process-flows.md ## 3. Implementation -- **Stack:** Python 3.11 and 3.12. Runtime pins in [requirements.txt](../target_app/requirements.txt): fastapi 0.104.1, uvicorn 0.24.0.post1, jinja2 3.1.2, psutil 5.9.6, numpy 1.26.4, scikit-learn 1.3.2, langchain-core 0.1.16, langchain-google-genai 0.0.6, prometheus-client 0.26.0. +- **Stack:** Python 3.11 and 3.12. Runtime pins in [requirements.txt](../target_app/requirements.txt): fastapi 0.162.2, uvicorn 0.54.0, jinja2 3.1.6, psutil 7.2.2, numpy 2.4.6, scikit-learn 1.9.1, langchain-core 1.7.6, langchain-google-genai 4.4.3, python-dotenv 1.2.4, python-multipart 0.0.33, prometheus-client 0.26.0. On 2026-11-09 these had 0 known advisories on OSV.dev. - **Dev tools:** [requirements-dev.txt](../requirements-dev.txt) pins pytest 9.1.1, pytest-cov 7.1.0, httpx 0.27.2, ruff 0.6.9 and pyyaml 6.0.3. - **Layout:** `target_app/` holds the app, `tests/` the tests, `monitoring/` the Prometheus and Grafana stack, `docs/` the documents. `run_all.py` is the local entry point. `reports/` holds generated sample incident reports. - **Standards:** ruff checks and formats, configured in [pyproject.toml](../pyproject.toml) (line length 100, rules E, F, W, I, B, UP). CI enforces both. @@ -95,5 +95,5 @@ flowchart LR - **Single author, so no peer review.** Pull requests are self-merged. Next step: ask a reviewer to approve changes, or enable branch protection. - **Some work went directly to `main`.** Next step: require pull requests on `main`. - **No coverage threshold.** Next step: set `--cov-fail-under` in CI. -- **Old runtime pins.** FastAPI 0.104.1 and langchain-core 0.1.16 are old. Next step: add Dependabot and upgrade deliberately. +- **Pins age.** The runtime pins were upgraded on 2026-11-09 (0 OSV advisories) but are exact, so they will age again. Next step: add Dependabot. - **Monitoring stack is local only.** Next step: say so in the README, or host it. diff --git a/docs/uat.md b/docs/uat.md index eed4f42..a04d64a 100644 --- a/docs/uat.md +++ b/docs/uat.md @@ -58,3 +58,38 @@ Mark each task pass or fail. ## Sign-off Tested by: ____________________ Date: ____________ Build or commit: ____________ Result (pass if at least 4 of 5 testers pass T1 to T3): ____________ + +## Automated acceptance check (2026-11-09) + +> Automated stand-in, not a real-user test: a scripted browser ran each task on the live demo. It shows each task *can* be completed, not that people understand the page. The real-user results table above is still to be filled. + +Playwright with Chrome against https://deepbell.onrender.com, at 390x844 and 1280x800. The guided demo was run once and one fault (a 60 MB memory leak, then Release memory) was injected once, both at desktop size; the phone run reused the resulting incidents and only checked that the demo and fault controls were visible and enabled. + +| Task | phone 390px | desktop 1280px | notes | +|---|---|---|---| +| T1 Get started | n/a (needs a person); page shown in 4.0 s, heading and intro text present | n/a (needs a person); page shown in 4.1 s, heading and intro text present | Server was already awake, so the 60 s cold start was not measured. Whether a visitor can say what it is for needs a person. | +| T2 See it work | not re-run (shared demo); "Run the demo again" button visible and enabled | pass: clicked "Run the guided demo", incidents appeared within seconds (4 incidents after the full demo) | Demo run once only, to protect the shared instance. | +| T3 Read the result | pass: incident #4 opens; "Time to detect 3 s" and cause shown | pass: same | Correctness of what a person reads from it needs a person. | +| T4 Judge the report | pass: badge "Built-in template"; cause "Heuristic, low confidence" | pass: same | Whether the visitor gets it right needs a person. Report notes no Gemini key is set, so a template report is the only source seen. | +| T5 Break something yourself | not re-run; "Inject 60 MB leak" and "Release memory" visible and enabled | pass: injected the memory leak, then Release memory; "Released ... MB" confirmed | No cooldown or cap message was hit (the demo's cooldown had ended). Reading such a message correctly needs a person. | + +Screenshots (one per task per size) are kept outside the repo. + +### Accessibility (axe-core 4.10.2) + +Views scanned at both sizes: overview, incidents (list with an incident and its report open), alerts, Chaos Lab. Reports live inside the Incidents view, so there is no separate reports page. Injection worked; no CSP or SRI block. + +Totals across distinct view/size scans: critical 0, serious 14 violation instances across 4 rules, moderate 1 (phone Chaos Lab, 3 nodes), minor 0. + +- `scrollable-region-focusable` (serious, on every view): a scrolling area cannot be reached by keyboard. +- `nested-interactive` (serious, overview, 3 nodes at both sizes): a control sits inside another control, which confuses screen readers. +- `color-contrast` (serious, Chaos Lab, 2 nodes at both sizes): text too faint against its background. +- `skip-link` (moderate, phone Chaos Lab, 3 nodes): a skip link's target is missing or not focusable at that view. + +Fixed the same day: a shared event log and the data tables are now keyboard-focusable with a visible focus ring; the three overview KPI bar charts are role=group instead of role=img, so their links no longer nest inside an image; the faint Chaos Lab text (disabled crash card, warn and orange labels in the light theme) is raised to at least 4.5:1; the nav hash targets now exist. A local re-scan with axe 4.10.2 of overview, incidents, alerts and Chaos Lab at 390 and 1280 px, in both themes, reports 0 violations. The nested-interactive fix was not re-scanned with incident data, as that needs injected faults. + +### Bugs found + +None blocking. Observations: the phone tab bar clips "Live Telemetry" (scrolls sideways); the detail of CPU spike #4 reads "No injected fault on record" even though the demo started it, so the cause is shown as "Heuristic, low confidence"; CPU spike #1 and Memory leak #2 opened at the same second (15:39:29), which may read as a duplicate. + +Dependency check the same day: target_app/requirements.txt had 48 known advisories on OSV.dev; upgraded to fastapi 0.162.2, uvicorn 0.54.0, jinja2 3.1.6, psutil 7.2.2, numpy 2.4.6, scikit-learn 1.9.1, langchain-core 1.7.6, langchain-google-genai 4.4.3, python-dotenv 1.2.4, python-multipart 0.0.33; now 0. diff --git a/target_app/deepbell/routes/pages.py b/target_app/deepbell/routes/pages.py index aeb63d9..6e02956 100644 --- a/target_app/deepbell/routes/pages.py +++ b/target_app/deepbell/routes/pages.py @@ -30,9 +30,9 @@ def static_version() -> str: async def read_dashboard(request: Request): """Serve the dashboard.""" return templates.TemplateResponse( + request, "index.html", { - "request": request, "report": reports.latest_report(), "api_key_configured": bool(llm.get_api_key()), "public_demo": config.PUBLIC_DEMO, diff --git a/target_app/requirements.txt b/target_app/requirements.txt index 297b6ee..f5e1e7d 100644 --- a/target_app/requirements.txt +++ b/target_app/requirements.txt @@ -1,11 +1,11 @@ -fastapi==0.104.1 -uvicorn==0.24.0.post1 -jinja2==3.1.2 -psutil==5.9.6 -numpy==1.26.4 -scikit-learn==1.3.2 -langchain-core==0.1.16 -langchain-google-genai==0.0.6 -python-dotenv==1.0.0 -python-multipart==0.0.6 +fastapi==0.162.2 +uvicorn==0.54.0 +jinja2==3.1.6 +psutil==7.2.2 +numpy==2.4.6 +scikit-learn==1.9.1 +langchain-core==1.7.6 +langchain-google-genai==4.4.3 +python-dotenv==1.2.4 +python-multipart==0.0.33 prometheus-client==0.26.0 diff --git a/target_app/static/app.js b/target_app/static/app.js index 23a655f..cbe2d04 100644 --- a/target_app/static/app.js +++ b/target_app/static/app.js @@ -1016,6 +1016,7 @@ function renderCause(cause) { setHTML($('cause-body'), `

${esc(cause.summary)}

${esc(cause.confidence_reason)}

+ ${cause.confidence === 'low' ? '

Low confidence means no fault was recorded for this incident, so the telemetry shows what moved and when, but not why.

' : ''} ${cause.evidence.length ? `

Evidence

${list(cause.evidence)}` : ''} ${cause.not_found.length ? `

Checked, not found

${list(cause.not_found)}` : ''}

${esc(cause.disclaimer)}

`); diff --git a/target_app/static/styles.css b/target_app/static/styles.css index 31287f0..c0e338a 100644 --- a/target_app/static/styles.css +++ b/target_app/static/styles.css @@ -108,15 +108,15 @@ --ok-text: #047857; --ok-soft: rgba(16, 185, 129, 0.11); - --warn-text: #b45309; + --warn-text: #9a4a08; --warn-soft: rgba(245, 158, 11, 0.13); --bad-text: #b91c1c; --bad-soft: rgba(239, 68, 68, 0.09); --info-text: #0369a1; --info-soft: rgba(56, 189, 248, 0.12); - --orange: #c2410c; + --orange: #b53a0b; --orange-soft: rgba(234, 88, 12, 0.09); - --yellow: #a16207; + --yellow: #8c5606; --yellow-soft: rgba(202, 138, 4, 0.1); --violet: #7e22ce; --violet-soft: rgba(147, 51, 234, 0.09); @@ -2521,6 +2521,8 @@ input { border-color: var(--accent-line); } +.log:focus-visible, +.table-wrap:focus-visible, .incident-row:focus-visible { outline: none; box-shadow: var(--ring); @@ -2958,7 +2960,7 @@ abbr[title] { } .chaos-card.is-disabled { - opacity: 0.66; + opacity: 0.88; } .chaos-card.is-disabled:hover { diff --git a/target_app/templates/index.html b/target_app/templates/index.html index 6217d39..8556892 100644 --- a/target_app/templates/index.html +++ b/target_app/templates/index.html @@ -145,7 +145,7 @@

Overview

-
+
Time to detect -- median, fault to incident - +
Time to recover -- median, incident to resolved - +
@@ -357,13 +357,13 @@

Telemetry watchdog

server_events{% if public_demo %}shared by every visitor{% else %}this run{% endif %}
-
  1. Waiting for events…
+
  1. Waiting for events…
-