High · Payment API
Concurrent cache eviction interrupts active archive reads
The clear path removes the content-addressed store without coordinating with active readers.
- Time to answer
- 23s
- Files read
- 14
- Hypotheses
- 2
Legwork checks out the exact commit that broke and reads the code until it finds the cause. Every claim comes back cited to a line, including the hypotheses it ruled out.
High · Payment API
Concurrent cache eviction interrupts active archive reads
The clear path removes the content-addressed store without coordinating with active readers.
Twenty-three seconds, replayed at speed. Every step, including the one that went nowhere.
Resolved payments-api to the deploy that preceded the first alert.
0fab160216e8
Sandbox created.
Queried Grafana across the incident window. Error rate steps at 14:02; p99 latency unchanged.
Read 14 files across internal/cache and internal/archive.
Hypothesis: the archive reader leaks file handles under load.
Handle count is flat across the incident window.
internal/archive/reader.go:210–244
Hypothesis: cache eviction removes the store while readers still hold open paths.
The evict path calls os.RemoveAll without coordinating with active readers.
internal/cache/layers.go:94–107
Sandbox destroyed. Working copy gone.
Legwork sits between the alert that wakes you and the channel you would have posted in anyway.
Connect
Grafana and Sentry post their alerts straight in. Anything else opens a case over the API.
Incident
Idempotent on your incident key, so a retrying alert cannot open the same case twice.
Investigate
Your repository at the exact commit that broke, through a read-only GitHub App. Then logs, metrics, traces, and linked issues from the connections above.
Answer
Root cause, cited evidence, and whatever it could not check — delivered to your channel or signed and posted back to your own endpoint.
POST an incident
curl -X POST https://legwork.dev/api/v1/services/payments-api/incidents \
-H "Authorization: Bearer $LEGWORK_API_KEY" \
-d '{"title":"5xx spike on /checkout","severity":"high"}'Legwork App 2:14
High · payments-api · closed in 23s
Concurrent cache eviction interrupts active archive reads
internal/cache/layers.go:94–107
Not verified: production eviction rate was out of scope.