3.4 KiB
3.4 KiB
status, system, created, updated, owners
| status | system | created | updated | owners | |
|---|---|---|---|---|---|
| active | platform | 2026-07-30 | 2026-09-09 |
|
Diagnostic logging Requirements
Overview
Users can see frontend failures that leave no backend evidence, and support cannot rely on one known artifact containing recent backend and browser diagnostics. The product needs a clearly disclosed bundle that users can download and agents can inspect without continuously uploading browser console history or returning an unbounded log export.
Requirements
REQ-PLATFORM-DIAGNOSTIC-LOGGING-001: Diagnostic logging
Intent: Users can see frontend failures that leave no backend evidence, and support cannot rely on one known artifact containing recent backend and browser diagnostics. The product needs a clearly disclosed bundle that users can download and agents can inspect without continuously uploading browser console history or returning an unbounded log export.
Acceptance criteria
- AC-PLATFORM-DIAGNOSTIC-LOGGING-001.1: Every backend process targets
<Kandev home>/logs/backend-logs.log, where<Kandev home>is the resolvedKANDEV_HOME_DIRor its~/.kandevdefault, and writes there whenever the path is available. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.2: Backend startup prints the absolute log-file path to stdout before the backend becomes ready.
- AC-PLATFORM-DIAGNOSTIC-LOGGING-001.3: A normal run writes
infoand higher entries to the file andwarnand higher entries to stdout. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.4: A debug run writes
debugand higher entries to the file while stdout remainswarnand higher. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.5: An explicitly verbose run writes
infoand higher entries to both the file and stdout. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.6:
logging.level/KANDEV_LOG_LEVELremains the supported override for the file threshold, andlogging.formatremains supported.logging.outputPath,logging.maxSizeMb,logging.maxBackups,logging.maxAgeDays, andlogging.compressare removed; the diagnostic path and daily retention policy are not configurable. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.7:
backend-logs.logrepresents the current UTC calendar day. At UTC midnight, the backend atomically rolls it tobackend-logs-YYYY-MM-DD.logand creates a new owner-readable, owner-writable active file. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.8: A restart during the same UTC day appends to
backend-logs.log. On the first startup after a day boundary, the previous active file is rolled to the date it represents before new entries are written. - AC-PLATFORM-DIAGNOSTIC-LOGGING-001.9: A browser debug diagnostic that scans a growing application collection shall compute and emit at most one latest-state sample per 250 ms while that collection changes continuously.
- AC-PLATFORM-DIAGNOSTIC-LOGGING-001.10: A connected frontend shall begin uploading retained browser evidence without first materializing the complete retained history.
- AC-PLATFORM-DIAGNOSTIC-LOGGING-001.11: A frontend capture notification shall include the absolute server deadline and a remaining duration of no more than 15 seconds. A browser wall-clock offset shall not change this duration. The backend shall remain authoritative for job expiry.