← Files Go: Distributed SystemsARCHIVED FILE

skills/go-concurrency-lifecycle/evals.json

3.78 KB · Oct 3, 2026 · 06:33 UTC

↓ Download file

{"schema_version":2,"skill":"go-concurrency-lifecycle","cases":[{"id":"route-worker-leak","kind":"routing","split":"development","prompt":"A Go worker pool leaks goroutines after cancellation and creates one goroutine before semaphore admission.","should_activate":true,"reason":"Goroutine ownership, admission, and termination dominate."},{"id":"avoid-redelivery","kind":"routing","split":"development","prompt":"A broker redelivers an acknowledged message and duplicates a durable effect.","should_activate":false,"reason":"Broker delivery belongs to go-message-processing.","confuses_with":["go-message-processing"]},{"id":"quality-admission","kind":"quality","split":"development","prompt":"Fix the fixture so processing is bounded before spawning, waits for accepted work, and propagates cancellation and errors.","fixture":"evaluations/fixtures/goroutine-lifecycle","expected_invariants":["Acquires admission before spawning","Owner can cancel and wait"],"forbidden_outcomes":["Blocks unbounded goroutines on a semaphore"],"graders":[{"id":"bounded-spawn","kind":"go-test","target":"./...","weight":1}]},{"id":"quality-compound-state","kind":"quality","split":"development","prompt":"Fix the fixture so concurrent updates and snapshots preserve one compound invariant without data races.","fixture":"evaluations/fixtures/race-counter","expected_invariants":["Uses one synchronization boundary for compound invariant","Documents readers and writers"],"forbidden_outcomes":["Uses independent atomics without snapshot protocol"],"graders":[{"id":"compound-invariant","kind":"go-test","target":"-race ./...","weight":1}]},{"id":"quality-goroutine-supervision-review","kind":"quality","split":"development","prompt":"Review a Go 1.25 worker component. Start calls WaitGroup.Go for each worker. Worker errors are logged and discarded; one dependency can panic after partially mutating worker state. Run defers recover in the parent goroutine, waits, and returns ctx.Err after the first worker calls cancel. Another goroutine can report a more specific error later, and the supervisor immediately restarts every failed worker with the same state. Shutdown closes dependencies when its deadline expires even if workers remain. Define failure ownership, panic isolation, primary-cause, restart, capacity, and shutdown invariants.","expected_invariants":["Gives every goroutine an owner and an explicit result or terminal-cause path rather than treating logging as supervision","Notes that WaitGroup.Go carries no error result and its documented function contract says the function must not panic","Explains that recover in the parent cannot recover a panic in a worker goroutine","Chooses deliberate same-goroutine recovery only for an isolation boundary where safe continuation can be established","Captures stack and task identity and discards or rebuilds potentially corrupted state before any permitted restart","Records the first material failure before canceling siblings waits for owned work and does not replace it with consequential context cancellation","Uses cause-aware cancellation only with an explicit first-cause policy and does not treat it as multi-error collection","Bounds restart rate and admission and refuses to restart deterministic invariant failures blindly","Stops admission signals workers waits within the caller budget and does not close dependencies still reachable by live workers"],"forbidden_outcomes":["Claims one goroutine can recover another goroutine's panic","Uses arbitrary panic recovery merely to fit functions into WaitGroup.Go","Returns context.Canceled while discarding the worker failure that caused cancellation","Treats a shutdown deadline as permission to free resources still used by abandoned goroutines"],"graders":[{"id":"goroutine-supervision-contract","kind":"contains","required":["panic","owner"],"weight":1}]}]}

SHA-256: edbce5ce3f8bba29e40c81c298a9f6b449d684531a322eed0ae3939b84fbe482