Summary
Doctor reads full audit events.jsonl (up to max_audit_log_len) for health checks
Evidence
readFileAlloc events_path limited by max_audit_log_len for last-session checks; MCP dir iterate; multiple integration probes. doctor.zig is 3030 lines monopath pulling nested tests.
Trigger
ryk doctor interactive/check
Files
src/cli/doctor.zig:922-928
src/cli/doctor.zig:1388+
Adversarial check
Doctor is offline UX not hook path; large audit logs make doctor slow and memory-heavy.
Metadata
- Audit ID:
P022
- Severity:
P2
- Confidence:
medium
- Area:
cli/doctor
- Category:
performance
- Source: adversarial memory/perf audit 2026-08-16 (static evidence; product code untouched)
- Checkout: local rykan_codebase @ ryk 0.2.18
Guidance
Do not weaken fail-closed / lock / fsync semantics on security-critical paths without an explicit durability tradeoff. Prefer mtime caches, long-lived evaluator/prewarm, caps/rings, and errdefer ownership fixes.
Summary
Doctor reads full audit events.jsonl (up to max_audit_log_len) for health checks
Evidence
readFileAlloc events_path limited by max_audit_log_len for last-session checks; MCP dir iterate; multiple integration probes. doctor.zig is 3030 lines monopath pulling nested tests.
Trigger
ryk doctor interactive/check
Files
src/cli/doctor.zig:922-928src/cli/doctor.zig:1388+Adversarial check
Doctor is offline UX not hook path; large audit logs make doctor slow and memory-heavy.
Metadata
P022P2mediumcli/doctorperformanceGuidance
Do not weaken fail-closed / lock / fsync semantics on security-critical paths without an explicit durability tradeoff. Prefer mtime caches, long-lived evaluator/prewarm, caps/rings, and errdefer ownership fixes.