The version-checked chain (archie-core-i0scw) reads the policy revision before every Authorize. When the store is alive but slow, each decision waits up to versionTimeout (5s, internal/infrastructure/access/live.go), and dispatch evaluates up to 100 captures x armed bindings sequentially per cycle, so one degraded dependency can stretch a dispatch cycle from milliseconds to minutes. Fail-closed is the right answer to unreadable; the gap is that there is no bound on the total time a cycle spends asking.
Done when a store that is slow-but-answering cannot multiply a cycle's duration by the decision count — e.g. one version read per cycle or per task start rather than per decision, or a short-lived negative cache with a deadline measured from the first failure (not a TTL on a successful read, which would reintroduce the staleness bug).
Notes
Correction to the description: the '100 decisions per cycle' figure is wrong. bindingDispatchBatchLimit caps CAPTURES fetched per pass (daemon.go:467,529), not decisions; decisions are captures x armed bindings matching each capture's source (daemon.go:556,617), typically a couple per event and one pass per 60s by default. The stacked-5s scenario is also close to unreachable: ListUndispatchedCaptures runs earlier in the same pass against the same store, so a hung store logs and returns before any decision. The real residual is one single-row PK select per decision on a path that already makes three store calls per pass. Keep this only if a version read per cycle or per task start turns out to be cheaper in practice; otherwise close it as noise.
Close reason
Not a defect: the per-decision read is the design the maintainer wants — the database is the authority and the in-process engine is only a cache of it, kept current by the revision check. Closed as noise; reopen only if a measured store cost shows up.
Imported from beads archie-core-cxbe3 · GitHub #1847 · type task · priority P3 · created 2026-10-25 · closed 2026-10-25
The version-checked chain (archie-core-i0scw) reads the policy revision before every Authorize. When the store is alive but slow, each decision waits up to versionTimeout (5s, internal/infrastructure/access/live.go), and dispatch evaluates up to 100 captures x armed bindings sequentially per cycle, so one degraded dependency can stretch a dispatch cycle from milliseconds to minutes. Fail-closed is the right answer to unreadable; the gap is that there is no bound on the total time a cycle spends asking.
Done when a store that is slow-but-answering cannot multiply a cycle's duration by the decision count — e.g. one version read per cycle or per task start rather than per decision, or a short-lived negative cache with a deadline measured from the first failure (not a TTL on a successful read, which would reintroduce the staleness bug).
### Notes
Correction to the description: the '100 decisions per cycle' figure is wrong. bindingDispatchBatchLimit caps CAPTURES fetched per pass (daemon.go:467,529), not decisions; decisions are captures x armed bindings matching each capture's source (daemon.go:556,617), typically a couple per event and one pass per 60s by default. The stacked-5s scenario is also close to unreachable: ListUndispatchedCaptures runs earlier in the same pass against the same store, so a hung store logs and returns before any decision. The real residual is one single-row PK select per decision on a path that already makes three store calls per pass. Keep this only if a version read per cycle or per task start turns out to be cheaper in practice; otherwise close it as noise.
### Close reason
Not a defect: the per-decision read is the design the maintainer wants — the database is the authority and the in-process engine is only a cache of it, kept current by the revision check. Closed as noise; reopen only if a measured store cost shows up.
---
_Imported from beads `archie-core-cxbe3` · GitHub #1847 · type task · priority P3 · created 2026-10-25 · closed 2026-10-25_
sam
added the lowtask labels 2026-10-27 13:39:44 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The version-checked chain (archie-core-i0scw) reads the policy revision before every Authorize. When the store is alive but slow, each decision waits up to versionTimeout (5s, internal/infrastructure/access/live.go), and dispatch evaluates up to 100 captures x armed bindings sequentially per cycle, so one degraded dependency can stretch a dispatch cycle from milliseconds to minutes. Fail-closed is the right answer to unreadable; the gap is that there is no bound on the total time a cycle spends asking.
Done when a store that is slow-but-answering cannot multiply a cycle's duration by the decision count — e.g. one version read per cycle or per task start rather than per decision, or a short-lived negative cache with a deadline measured from the first failure (not a TTL on a successful read, which would reintroduce the staleness bug).
Notes
Correction to the description: the '100 decisions per cycle' figure is wrong. bindingDispatchBatchLimit caps CAPTURES fetched per pass (daemon.go:467,529), not decisions; decisions are captures x armed bindings matching each capture's source (daemon.go:556,617), typically a couple per event and one pass per 60s by default. The stacked-5s scenario is also close to unreachable: ListUndispatchedCaptures runs earlier in the same pass against the same store, so a hung store logs and returns before any decision. The real residual is one single-row PK select per decision on a path that already makes three store calls per pass. Keep this only if a version read per cycle or per task start turns out to be cheaper in practice; otherwise close it as noise.
Close reason
Not a defect: the per-decision read is the design the maintainer wants — the database is the authority and the in-process engine is only a cache of it, kept current by the revision check. Closed as noise; reopen only if a measured store cost shows up.
Imported from beads
archie-core-cxbe3· GitHub #1847 · type task · priority P3 · created 2026-10-25 · closed 2026-10-25