Skip to content

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

TypeScript
5.8 KB
Raw Blame
{
  "schema": "gstack-detector-corpus/v1",
  "case": "shared-libs-plan-callers",
  "detector": "test/helpers/shared-libs-plan-actor.ts#createSharedPlanReuseSelector",
  "series_identity": "531a8389999349df",
  "source": {
    "run": "37186854666",
    "sha": "b24b6d8fcf57db7e9c8ded236d31b8a5d0b4504a",
    "lane": "periodic",
    "artifact": "paid-slice-5-a1",
    "path": "shards/skill-e2e-shared-libs-periodic/1.91.19-garrytan-severe-fix-wave-oct3-e2e-2026-10-04-0751.json#tests[name=shared-libs-plan-callers].transcript[tool_use name=AskUserQuestion].input"
  },
  "census_outcome": "failed",
  "git_path": "fallback",
  "git_path_evidence": "Recorded in CI's eval image (ubuntu:24.04, git 2.43), which rejects --no-lazy-fetch (exit 129), so gstack-safe-git took its unsupported-Git fallback (local history unavailable, branch HEAD unknown).",
  "census_error": "Error: shared-libs-plan-callers actor: question expands beyond unchanged-helper reuse and its required proof: hardening",
  "expected": "pass",
  "justification": "Fixed false red: every option reuses the unchanged lib/retry-after.ts helper and names hardening only as excluded scope or a risk; census-time actor (b24b6d8f) did not treat the verbless \"... and helper hardening unchanged.\" list as an exclusion; fcb4024, then 2a6b766 (verb+object expansions), squashed to main in 2db0b3a.",
  "expected_answer": "Reuse lib helper + contract tests",
  "input": {
    "questions": [
      {
        "question": "D1 — Should the two new callers import the existing Retry-After parser or each carry a local copy?\nProject/branch/task: fixture repo on `main`, planning src/import-worker.ts and src/sync-route.ts (PLAN.md).\nELI10: Both new files need to turn a Retry-After header into a wait time exactly the way the scheduler does. The scheduler already gets that behavior from one small shared function in lib/retry-after.ts, which already takes null, an injected clock, a 3600-second cap and a caller fallback. The plan instead writes that logic again inside each new file. Three copies of \"the same\" rule tend to drift apart, and nothing would prove they still match.\nStakes if we pick wrong: with local copies, a later fix to one parser silently leaves the others behind and a caller waits the wrong amount or ignores a header; with reuse but no extra tests, an edge like a past date or empty header is matched by accident rather than by proof.\nRecommendation: A because the shared helper already has the required contract, is proven by the scheduler and its test, and reuse is a net line saving; the extra contract assertions cost minutes and turn \"matches the scheduler\" from assumption into proof.\nCompleteness: A=10/10, B=7/10, C=4/10\nPros / cons:\nA) Reuse lib helper + contract tests (recommended)\n  ✅ One source of truth: both callers inherit scheduler semantics by construction, not by copying\n  ✅ Adds the missing contract assertions (empty string, past date, date ceiling, injected now) so edge compatibility is proven\n  ✅ Net ~26 implementation lines never written; ~18 saved after tests\n  ❌ A bug in lib/retry-after.ts now affects the scheduler and both new callers at once\nB) Reuse lib helper only\n  ✅ Same single source of truth and same implementation saving as A\n  ✅ Smallest possible diff: two import lines plus the already-planned integration tests\n  ❌ Edge cases the callers rely on (past date→0, date cap, empty header) stay unpinned, so a later helper change could break them unnoticed\nC) Local parser per caller\n  ✅ No change to anything shared; each file is self-contained\n  ✅ Matches the current draft, so no plan amendment needed\n  ❌ Three near-identical copies with no parity test; the plan's \"must match scheduler semantics\" requirement is asserted, never proven\n  ❌ ~28 duplicated lines and extra per-caller tests just to re-establish an existing contract\nNet: trading a slightly larger shared blast radius (mitigated by a contract test) for provable compatibility and less code, versus independence bought with duplication and unproven parity.",
        "header": "Parser reuse",
        "multiSelect": false,
        "options": [
          {
            "label": "Reuse lib helper + contract tests",
            "description": "✅ Both new callers import retrySeconds from lib/retry-after.ts; no local parser is written. ✅ Extend test/retry-after.test.ts with the untested edges the callers rely on: empty/whitespace→fallback, \"0\"→0, \"3601\"→3600, far-future date→3600, past date→0, unsafe integer→fallback, injected now honored. ✅ Each caller's integration test asserts its own fallback and injected now are passed through. ❌ Shared failure now reaches scheduler plus both callers. Effort human ~1h / CC ~5 min. Scheduler semantics, existing callers and helper hardening unchanged."
          },
          {
            "label": "Reuse lib helper only",
            "description": "✅ Both new callers import retrySeconds from lib/retry-after.ts; no local parser is written. ✅ Only the already-planned per-caller integration tests; no new shared-contract assertions. ❌ Edge cases (past date, date ceiling, empty header, injected now) remain unpinned beyond the existing 5 expects. Effort human ~45 min / CC ~3 min. Scheduler semantics, existing callers and helper hardening unchanged."
          },
          {
            "label": "Local parser per caller",
            "description": "✅ Keeps the draft as written: each caller carries its own ~14-line parser. ✅ No shared code touched. ❌ Compatibility with scheduler semantics is unproven unless each caller also gets parity tests, adding more duplicated lines. ❌ Three copies to keep in sync with no mechanism to detect drift. Effort human ~2h / CC ~10 min. Scheduler semantics, existing callers and helper hardening unchanged."
          }
        ]
      }
    ]
  }
}