Files
mtusi2026lab6/student-tests/GRAFANA-CASES.md

5.7 KiB

Native Grafana acceptance cases

The owner approved at most600000000 new network bytes on omarchy for pinned Grafana13.3.1 and existing OpenObserve plugin1.0.1. Historical113-file/native-only receipts remain immutable. These cases precede browser/fault implementation; failures are retained rather than reclassified by HTTP status alone.

Situation or input Example Observable expected result Level
Authorized dependency identity/budget Pinned native image manifest and plugin SHA Exact size/SHA/platform/version, total fetched bytes≤600MB, no other images/browser/model downloads Native operation
First-user initialization Existing own password file, empty Grafana user DB Actual13.3.1 initializer/policy checked, encrypted private roundtrip before first start, no credential printed Native operation
Initial startup convergence SQLite migrations before HTTP bind Wait bounded convergence; distinguish running/migrating from failed/OOM; preserve actual failed readiness outcome Integration
Intended owner context Native login with own encrypted-owner credential Login200 and actual admin principal, cookies only in isolated browser memory; anonymous stars403 is retained separately, roles/publicness unchanged Browser
Real datasource/provisioning Metrics UIDprometheus and plugin UIDopenobserve Both loaded and query actual own retained data through Grafana gateway; all mandatory panels imported Integration and browser
Required dashboard signals Actual retained upload workload window 18 panels query real data, finite active percentiles, actual request/job labels, queue/DB/worker/process values; idle NoData remains explicit Browser and data readback
Canonical trace Retained actual42-span upload trace Actual waterfall renders correct span count, nanosecond→millisecond units/durations and41 parent relations, API/publisher/worker/S3/DB visible Browser and native frame
Correlation/navigation API and worker logs for same trace and HTTP request_id Structured logs visible; log→trace and trace→log navigate to the same actual trace with preserved time bounds Browser
Actual response bound Bounded own query whose result exceeds1MiB Native Grafana proxy rejects/truncates with explicit failure rather than silently treating incomplete output as full data; ordinary positive query still succeeds Integration
Worker stopped Own worker stopped while a unique valid upload is accepted API stays usable; queue age increases, actual queue/readiness alerts fire; restore worker drains backlog and alerts becomeNormal Fault integration
Database slowed Own bounded SQL table lock plus steady business requests postgres.query error/latency and HTTP5xx distinguish DB failure from handler delay; actual high-error/burn alert transitions; restore releases lock andNormal returns Fault integration
Short spike versus sustained failure Brief DB lock, then longer DB lock under same bounded rate Record duration/detection/recovery, false positives and expected multiwindow/for filtering, not substituted vector rules Controlled experiment
Fresh volume path New isolated project/ports/volumes with checked source/config Complete bootstrap/provisioning/core+Grafana/smoke works with empty storage; old volumes untouched and receipts distinctly attributed Integration
Final compatibility/source Exact final files and original contracts Required upstream/source checks pass; backend95 remains byte-identical, independent review and self-contained package checks precede full completion claim Source and artifact

Operational failures include bad digest/size, lost partial download, password-policy rejection, migration timeout, plugin load/provisioning/auth failure, empty/NaN result during a known positive workload, dropped trace parents, incorrect duration or link window, response overflow, alert evaluationError/NoData, fault cleanup failure and empty-volume bootstrap failure. No external notification delivery is required or performed. Tests use only owned resources and synthetic data; browser and fault workers inherit low-priority background.slice. This is correctness testing, not a benchmark.

The measured browser proxy returned2097625 bytes despite the1MiB setting, while the plugin SDK backend rejected the same2MiB result. Public tag and deployed image report different commits, so an applicable additional native frontend limit remains unknown. The approved minimal fallback is a bounded recognized Content-Length contract at the existing HAProxy gateway, not a universal streaming/decompression counter. Before changing it, native cases cover normal small/exact1048576/cap+1, encoded responses, Transfer-Encoding/chunked, EOF-delimited bodies, invalid/overflow/leading-zero Content-Length, duplicate/conflicting fields, and actual metadata/search/Prom queries. Native HTTP parser refusal is recorded separately from the ACL's static response code. Raw identical Content-Length normalization is reported explicitly if the native parser canonicalizes it; it is never called proof of rejecting every raw duplicate.

Native histogram compatibility delta

The original8-file response-boundary snapshot remains immutable. A later actual-browser query omitted query.size; native OpenObserve1.1.2 accepts missing/0 as full aggregation. This delta permits absent size and native integer0..1000 without rewriting requests. Negative/oversize values remain gateway-denied; fractional/string/null/object inputs fail closed. Native9-case comparison is retained in evidence/grafana/histogram-native-red.json and histogram-native-green.json. Size is a requested query parameter, not a hard returned-row or byte limit; window, body, response, engine and resource budgets remain active.