← Go: Production EngineeringCONTENT HISTORY

Update to Go: Production Engineering

Snapshot Sep 30, 2026 · 23:15 UTC · version 0.4.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Use when asked to design or debug Go tests, fuzzing, race/leak checks, or deterministic verification. Do not use for profiling.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 258
    },
    {
      "relative_path": "evals.json",
      "size_in_bytes": 3430
    },
    {
      "relative_path": "references/deterministic-concurrency.md",
      "size_in_bytes": 2143
    },
    {
      "relative_path": "references/oracle-design.md",
      "size_in_bytes": 686
    },
    {
      "relative_path": "skill.json",
      "size_in_bytes": 2133
    }
  ],
  "name": "go-testing-and-verification",
  "skill_md_contents": "---\nname: go-testing-and-verification\ndescription: \"Use when asked to design or debug Go tests, fuzzing, race/leak checks, or deterministic verification. Do not use for profiling.\"\nlicense: Apache-2.0\ncompatibility: \"Go 1.24 or newer; testing/synctest guidance targets Go 1.25 and 1.26.\"\n---\n\n# Go testing and verification\n\nStart with the invariant and the cheapest environment that can falsify it. A test shape is not a quality goal by itself.\n\n## Select evidence by failure mode\n\n- Direct unit tests for pure decisions and edge cases.\n- Integration tests with the real database, broker, filesystem, or protocol when their semantics are the claim.\n- Contract tests for public request, response, schema, and compatibility behavior.\n- Fuzz tests for parsers, decoders, canonicalization, state transitions, and algebraic properties.\n- Race-enabled tests for executed concurrent paths; they are not proof over unexecuted schedules.\n- Leak checks for owned goroutines after cancellation and shutdown.\n- Deterministic time and synchronization rather than sleeps; use `testing/synctest` where supported.\n\n## Build a strong oracle\n\nAssert externally meaningful state, output, side effects, and errors. Prefer invariant checks over call choreography. Make fixtures expose the failure: concurrent starts, crash windows, duplicate identities, partial reads, invalid encodings, and boundary sizes.\n\nParallel tests must not share mutable globals, environment, ports, clocks, random sources, or fixtures without explicit isolation. Call `t.Helper()` in helpers and preserve useful failure context.\n\n## Fuzz responsibly\n\nSeed representative valid and invalid values. Keep targets deterministic, fast, and independent across calls. Persist minimized failures as regressions. A fuzz target without a semantic property often discovers only panics, not wrong results.\n\nRead [references/oracle-design.md](references/oracle-design.md) for distributed and financial oracles.\n\nFor timer, deadline, or asynchronous goroutine tests on Go 1.25 or 1.26, read [references/deterministic-concurrency.md](references/deterministic-concurrency.md). A `synctest` bubble virtualizes only work it owns; external I/O and goroutines are not made deterministic merely because the assertion runs inside `synctest.Test`.\n\n## Output contract\n\nName the invariant, chosen test layer, and remaining blind spots. Do not inflate coverage metrics or mock interactions into claims of system correctness.\n"
}

SHA-256 of public snapshot: 4a133af2d2af3f96b8e7441ba02749bd75a3da1b1353fff74b0bd805d68d2ee5