← Files Go: Distributed SystemsARCHIVED FILE

skills/go-distributed-coordination/evals.json

4.45 KB · Oct 2, 2026 · 00:32 UTC

↓ Download file

{"schema_version":2,"skill":"go-distributed-coordination","cases":[{"id":"route-stale-lease","kind":"routing","split":"development","prompt":"A paused Go lease holder resumes after a new leader and overwrites newer state.","should_activate":true,"reason":"Stale-owner fencing dominates."},{"id":"avoid-local-mutex","kind":"routing","split":"development","prompt":"Protect a map shared by goroutines in one process.","should_activate":false,"reason":"Local synchronization belongs to go-concurrency-lifecycle.","confuses_with":["go-concurrency-lifecycle"]},{"id":"quality-fence","kind":"quality","split":"development","prompt":"Make an external write safe when lease owner A pauses and owner B takes over.","expected_invariants":["Issues monotonic fencing tokens","Authoritative store rejects stale tokens"],"forbidden_outcomes":["Relies only on checking lease before write"],"graders":[{"id":"fencing-token","kind":"contains","required":["token","reject"],"weight":1}]},{"id":"quality-saga","kind":"quality","split":"development","prompt":"Design recovery when a remote saga step times out after possibly succeeding.","expected_invariants":["Persists ambiguous state and stable identity","Reconciles before compensation"],"forbidden_outcomes":["Immediately compensates a possibly successful step"],"graders":[{"id":"saga-ambiguity","kind":"contains","required":["ambiguous","reconcile"],"weight":1}]},{"id":"quality-serialized-lease-clock-review","kind":"quality","split":"development","prompt":"Review a Go lease used by two replicas before irreversible remote writes. Each replica stores ExpiresAt = time.Now().Add(30*time.Second) in a shared row, reloads the JSON timestamp after restart, and treats time.Now().Before(ExpiresAt) as proof that it still owns the resource. Replica clocks can differ or step during synchronization, a process can pause, and the remote target accepts no ownership version. State the safety failure and repair invariants without choosing a coordination product.","expected_invariants":["Explains that serialized time.Time values omit Go's process-local monotonic reading","Explains that independently interpreted wall clocks do not establish exclusive cross-replica ownership under skew or adjustment","Requires one authoritative acquisition and renewal decision with conditional owner ordering","Requires a monotonic ownership epoch or fencing token that the effect target rejects when stale","Treats uncertain renewal as loss of admission authority before the safety margin is exhausted","States a weaker idempotency and duplicate-recovery contract when the target cannot fence"],"forbidden_outcomes":["Treats time.Now monotonic behavior as surviving JSON or restart","Fixes ownership only by increasing the TTL or converting timestamps to UTC","Uses a process mutex as cross-replica exclusion"],"graders":[{"id":"serialized-lease-authority","kind":"contains","required":["monotonic","fenc"],"weight":1}]},{"id":"quality-regional-failover-authority-review","kind":"quality","split":"development","prompt":"Review an active-passive Go scheduler. A health timeout changes DNS to region B, promotes an asynchronously replicated database, and restores the coordination store from a snapshot whose lease counter predates the outage. Region A may later resume queued work, and both regions can call a payment provider that accepts idempotency keys but no fencing token. The runbook proposes failback by reversing DNS. Define the authority, data, promotion, reconciliation, and failback invariants.","expected_invariants":["Distinguishes traffic routing coordination leadership data position application writer authority and external-effect authority","Requires an application generation newer than any old region can present and target-side stale-generation rejection where possible","Treats restored coordination state as a new logical lineage and prevents a rolled-back counter from reauthorizing old work","Declares accepted recovery-point loss and validates data and cache or watch state before readiness","Uses stable cross-region operation identity and reconciliation for the non-fenceable provider","Treats failback as a new fenced data migration with a newer generation"],"forbidden_outcomes":["Treats DNS or health checks as writer fencing","Assumes consensus leadership exactly-once fences the payment provider","Reverses DNS before choosing and reconciling the authoritative data lineage"],"graders":[{"id":"regional-failover-authority-review","kind":"contains","required":["generation","reconcil"],"weight":1}]}]}

SHA-256: e3e5390ee01ddf13827de0b4cdab685c5c59386ced3f69d7f98e60441690f1ad