Skip to content

[PERF] scan/discover recursive directory walks for host integration discovery #412

Description

@christopherkarani

Summary

scan/discover recursive directory walks for host integration discovery

Evidence

walkCollect openDir iterate recursive with depth limit; used by doctor/scan style discovery across OpenCode/Claude/Codex/Pi/Grok trees.

Trigger

doctor/scan host discovery

Files

  • src/scan/discover.zig:44-400

Adversarial check

Depth-limited; large home agent trees still many syscalls. Caching discovery results across doctor panes would help.

Metadata

  • Audit ID: P023
  • Severity: P2
  • Confidence: medium
  • Area: scan/discover
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-filedFiled by eng-factory agentarea:cliCLI commands doctor installenhancementNew feature or requestfactory:autoAutonomous eng-factory pickup OKin-reviewPR open; review/verifypriority:p2Normal prioritytriage:confirmedTriage verified real issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions