noCV
SKERNEL-106 · Control resources and concurrency

Bound open descriptors while scanning a deep inbox

Practice briefBugAdvanced

Recursive scanning opens every subdirectory before closing any, exhausting the process descriptor limit.

Focused work estimate
4h + prerequisites
Priority in the scenario
High
Engineering practice
Resource bounds · Directory traversal · Cleanup

Estimated field mix

  • Systems programming70%
  • Performance engineering30%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional local agent watches generated inbox files and schedules bounded processing. Direct system calls are scattered across the code, mishandle interrupted operations, and make tests platform-dependent. Build a Rust OS adapter with temporary fixture directories; no kernel module, elevated privilege, or production host modification is required.

Setup prerequisites

  • System calls
  • File descriptors
  • Monotonic clocks

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Traversal has an explicit descriptor and work-queue bound
  • Directory handles close on success, skip, and error
  • Unreadable entries are reported without aborting unrelated roots

Implementation constraints

  • Use a generated tree and configured low limit; do not change host-wide limits.

Verification to include

  • Scan a deep and wide tree while measuring peak open handles.
  • Inject an unreadable directory and repeated short reads, then check cleanup.

Deliverables

  • Bounded scanner and descriptor accounting test

Rollout and recovery

Start with one configured root and expose incomplete scans.

Value of the work

For the engineer: Practice OS error semantics, partial I/O, portability and deterministic abstraction boundaries.

For the team: Review host-facing code whose retries, resource limits, and platform differences are explicit before packaging it as a local agent.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.