Tool availability checks with TTL caching #688

Closed
opened 2026-10-27 13:37:21 +00:00 by sam · 0 comments
Owner

Implement the check_fn pattern for tool availability predicates (e.g. 'is Docker running'). Results should be TTL-cached (e.g. 30s check interval) with a failure grace period (e.g. 60s before re-checking on error). This prevents redundant checking on every invocation while keeping availability fresh.

Notes

2026-09-19 analysis: exact-title duplicate pair. Each 'Verify: X' bead has a non-prefixed twin (167->146, 157->163, 159->182) from a doubled import. The implementation twin of 167 (archie-core-...-146) is verified complete and closed. Resolve each pair to one bead.
CORRECTION to the previous note: these are implementation/verification PAIRS linked by VALIDATES/VALIDATED BY (an upstream 'Verify:' discipline), not duplicate imports. Only the impl side needs an open bead once the impl has landed; the Verify side is the adversarial-review pass.
2026-09-19 analysis: NOT complete. internal/tools/availability.go defines AvailabilityCache (TTL + FailureGracePeriod) exactly as the bead specifies, but NewAvailabilityCache/AvailabilityCache have ZERO call sites outside that file — internal/tools/registry.go's Available() re-evaluates CheckFn on every call. The mechanism exists, the wiring does not. This is the 'implemented but unreachable' category the reachaudit epic describes.

Close reason

Closed


Imported from beads archie-core-1786637494041-163-961e45bb · GitHub #184 · type task · priority P2 · created 2026-08-08 · closed 2026-10-01

Implement the check_fn pattern for tool availability predicates (e.g. 'is Docker running'). Results should be TTL-cached (e.g. 30s check interval) with a failure grace period (e.g. 60s before re-checking on error). This prevents redundant checking on every invocation while keeping availability fresh. ### Notes 2026-09-19 analysis: exact-title duplicate pair. Each 'Verify: X' bead has a non-prefixed twin (167->146, 157->163, 159->182) from a doubled import. The implementation twin of 167 (archie-core-...-146) is verified complete and closed. Resolve each pair to one bead. CORRECTION to the previous note: these are implementation/verification PAIRS linked by VALIDATES/VALIDATED BY (an upstream 'Verify:' discipline), not duplicate imports. Only the impl side needs an open bead once the impl has landed; the Verify side is the adversarial-review pass. 2026-09-19 analysis: NOT complete. internal/tools/availability.go defines AvailabilityCache (TTL + FailureGracePeriod) exactly as the bead specifies, but NewAvailabilityCache/AvailabilityCache have ZERO call sites outside that file — internal/tools/registry.go's Available() re-evaluates CheckFn on every call. The mechanism exists, the wiring does not. This is the 'implemented but unreachable' category the reachaudit epic describes. ### Close reason Closed --- _Imported from beads `archie-core-1786637494041-163-961e45bb` · GitHub #184 · type task · priority P2 · created 2026-08-08 · closed 2026-10-01_
sam added the mediumtask labels 2026-10-27 13:37:21 +00:00
sam self-assigned this 2026-10-27 13:37:21 +00:00
sam closed this issue 2026-10-27 13:37:21 +00:00
sam added a new dependency 2026-10-27 13:42:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#688