docs: v0.111.0 CHANGELOG + README (telemetry context/tails) + REUSE entries

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
2026-07-10 15:45:45 +02:00
parent 544c42a618
commit 30927b6816
3 changed files with 39 additions and 0 deletions
+28
View File
@@ -1,5 +1,33 @@
## Changelog
### v0.111.0 — remote app-log diagnostics: error context + on-demand log tails (2026-07-10)
Extends the app-telemetry pipeline with what the live Peti support session lacked: readable error
context and a way to pull an app's logs WITHOUT any access to the customer box. Pairs with hub v0.43.0.
- **Error context (Part B) — `internal/metrics`:** the log scraper now attaches `LogIssue.Context`
up to ±5 raw lines around the FIRST occurrence of each error-severity issue in the scrape window
(never on repeats; warns carry none). Caps: ≤11 lines, ≤400 chars/line (`…`), and a HARD 16KB
per-report budget enforced in `internal/report` (context dropped from the lowest-count issues
first). The scan loop was extracted into the pure `analyzeLogLines` (first unit tests for the
scanner). Additive `context` field on the report's `issues` — old hubs ignore it.
- **Sanitization (Part E) — `metrics.RedactLine`:** authoritative controller-side redaction applied
to every context + tail line before it leaves the box: `password|passwd|secret|token|api[_-]?key|
authorization|bearer` values → `[REDACTED]` (incl. `Authorization: Bearer <tok>` in one pass) +
64-hex strings → `[REDACTED-HEX64]` (repo-password shape).
- **On-demand log tails (Part D) — pull-based, ACK-flag pattern (same as escrow/config-refresh):**
the report ACK gains `log_tail_requests: [app…]`; the NEXT report ships
`log_tails: [{app, collected_at, lines[]}]` — 200 lines via the existing plumbing
(`stacks.GetLogs` compose-logs for stacks, scanner-style `docker logs` for the controller
container), ordered as emitted, ≤400 chars/line, ≤64KB/app head-truncated (newest kept),
redacted. Consume-once: drained at build; a failed push re-arms from the hub's still-pending
request. NO hub→controller push channel — the guest listens to no one.
- Tests + red-proofs (all three failed exactly as designed, then restored green): context capture
dropped → "context has 0 lines, want 11" FAIL; redaction gutted → `password=hunter2` shipped
visibly → FAIL; consume-once clear removed → "second drain = [gokapi cwa]" (tails every cycle)
→ FAIL. Plus: exact ±5 ordered window, first-occurrence-only context, warn-no-context, truncation,
budget drop order, byte-budget newest-kept, fetch-error skip, empty-ACK clears stale pending.
### v0.110.0 — offbox stale-lock self-heal (campaign C2) + crash-truthful status (C1) (2026-07-10)
Fixes the overnight campaign's HIGH finding: a crash mid-prune left a restic EXCLUSIVE lock the controller