Skip to content

The paid auto-decide check counts a start step that ran while the skill loaded - #4543

Merged
capy-ai[bot] merged 1 commit into
mainfrom
auto-decide-check-reads-load-time-start
Nov 19, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
auto-decide-check-reads-load-time-start

Conversation

@garrytan

@garrytan garrytan commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Since #4509, Claude Code skills run their start step as they load, so the paid /plan-ceo-review auto-decide check could miss a run that really did auto-decide. It now accepts the start output in the loaded skill text.
Why: one of the five passing runs captured for that check was credited only through the session journal, and that path needed a start command in the tool calls.
Nothing to do: this changes test code and the journal reader the tests use; no skill text changes.

What changed

The journal reader now keeps the skill text Claude Code loaded, so the check can find a start that ran at load

The journal reader now keeps the skill text Claude Code loaded, so the check can find a start that ran at load.

Before/after as text: The journal reader now keeps the skill text Claude Code loaded, so the check can find a start that ran at load
--- Before · before.txt · captured output
+++ After · after.txt · captured output
+$ readPlanCountTranscript on the same journal (this branch, da098f2)
+{"status":"ready","skills":["plan-ceo-review"],"sessions":["s1"]}
-$ readPlanCountTranscript on a journal whose skill ran its start at load (base 7f9c1bc)
-{"status":"ready","skills":[],"sessions":[]}
 

A /plan-ceo-review run that auto-decided its review mode could still fail the paid check, because the check looked for the start step only among Bash tool calls, and since #4509 the start runs while the skill loads. The check now also reads the start output that Claude Code put into the loaded skill text, and still requires exactly one start per session.

  • lib/claude-public-transcript.ts: the journal reader also keeps the skill text Claude Code loaded for a slash command or the Skill tool (skillLoads). It keeps only records in the run's own session and folder, with a timestamp, marked as loaded text, and starting with Base directory for this skill:.
  • test/helpers/native-auto-decide.ts: the check reads the start output between the "Preamble (run first)" heading and the "If the line above is not the start output" sentence. Together with start commands run through Bash, the session must still have exactly one start.
  • test/helpers/touchfiles-data.ts: the plan-mode and auto-decide paid cases also run when bin/gstack-skill-load or scripts/resolvers/load-injection.ts changes.
Why

"The paid auto-decide check could never find a start Bash call" after skills began running their start at load. Without this, a real auto-decided run can be scored as a failure, so the paid gate case reports a regression that isn't there.

Blast radius

The new skillLoads field is optional and only the auto-decide test helper reads it; every other caller of readPlanCountTranscript ignores it, and the full free suite passed at this exact commit (CI run 44625475053, 1717 test files). No skill text, setup or runtime path changes.

Pre-Landing Review

No issues at or above the blocking floor. One reviewer pass (testing, security, state-machine and red-team checklists) found nothing; the adversarial pass found one low-severity note, listed below.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL test/helpers/native-auto-decide.ts:338 A load whose start timed out (partial start output followed by 'SKILL_START: timed out ... at load') is credited as the session's one start; the changelog says failed loads are refused
Exploratory QA

Three bounded functional probes of the journal reader (synthetic journals, owned temp folders): an owned skill load is kept with its skill and session (pass); a base directory with a trailing slash still names the skill (pass); a Windows-style base directory is not split, so a Windows load would not be credited (observation only; the paid check runs on Linux).

Design Review

No frontend files changed — design review skipped.

Eval Results

The selector picked three paid probes (auq-format-gate, office-hours-auto-mode, plan-ceo-review-plan-mode); none ran in this review because paid runs were out of scope. plan-ceo-review-plan-mode passed earlier at dd98bcc (see Agent notes).

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix.

TODOS

No TODO items completed in this PR.

Documentation

Scope: The diff from 7f9c1bc touches 6 files, all test and helper code: the transcript reader now records the skill text Claude Code loaded, the auto-decide check accepts a start step that ran while the skill loaded, and the touchfiles were updated. There is one changelog.d fragment. There are no uncommitted changes.

Result: The docs are current. docs/TEST_PORTFOLIO.md and docs/hosts.md mention the touched area and are still accurate. No user-facing docs needed an edit.

Debt: None.

Tests
  • Full free suite in CI at da098f2 (run 44625475053): 1717 test files passed
  • macOS named regressions in CI at da098f2: passed (job 135918194804)
  • Journal reader probes (3): passed
Agent notes

Follow-up to GST-3157, asked for by the crew's merge owner after #4509's READY. A real plan-mode run of plan-ceo-review-plan-mode at dd98bcc (run gsta634-smoke-1, $0.57) passed with the start output in the first request and no start tool call; that gate case already covers plan mode, so no new paid case was added. lib/skill-route.ts is untouched.

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen dispatches=4
Gate edits: none detected (11 listed, 8 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Approvals

No approvals recorded for branch auto-decide-check-reads-load-time-start.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4543,
  "head": "da098f225b100142175f8df8f5efb47f58992dc1",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1717,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44625475053,
      "attempt": 1,
      "tree": "c1690dee05347a0636151f93dd04e34ff91499b9"
    }
  ],
  "calls": 22,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/gsta634-ship2",
  "head_tree": "c1690dee05347a0636151f93dd04e34ff91499b9",
  "product_patch_id": "c7c316330f3c2aff3fadc5a39ce5b1d46f8b078b",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 9,
    "rules": "1afa38a4be3b5eef",
    "base": "7f9c1bc52ac9e8471aece6190c62addfe60d3205",
    "registry": "7f9c1bc52ac9e8471aece6190c62addfe60d3205",
    "gate_scan": {
      "tagged": 0,
      "head": "da098f225b100142175f8df8f5efb47f58992dc1"
    },
    "reasons": [
      "runtime=9"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @c1690dee0534 (8 checks, current for da098f225b10)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44625475053/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=c1690dee0534 tests=38462 skipped=89 runs=44625475053/1 profiles=ci-reuse/free-tests heads=da098f225b10 verified=2026-11-19T22:29:21.069Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md against the 6-file test-helper diff"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

…aded

Claude Code skills now run their start step as they load, so an auto-decided
/plan-ceo-review run has no start command in its tool calls and the
journal-based check could never credit it. The transcript reader now keeps
the skill text Claude Code loaded, and the check accepts the start output in
that text as the session's one start. A replay of capture 37195203538 with
its start moved to load is credited, and a second start, a failed or
disabled load, another skill or session, or an early load is refused. The
plan-mode and auto-decide paid cases also run when the load-time helper
changes.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai
capy-ai Bot merged commit db2a56e into main Nov 19, 2026
54 checks passed
@garrytan garrytan mentioned this pull request Nov 20, 2026
capy-ai Bot added a commit that referenced this pull request Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549)
- For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543)
- The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534)
- A green CI run still counts when the repository's artifact storage is full. (#4536)
- `/cso` now audits repositories that track symlinks. (#4567)
- A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555)
- The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554)
- Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542)
- A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544)
- When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553)
- The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539)
- Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568)
- /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552)
- /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565)
- The prompt-routing hook no longer acts on words inside backticks. (#4566)
- In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509)
- gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537)
- gstack now says what it's adding before it adds a background job or a browser extension. (#4538)
- For contributors: every flaky pass in Free Tests is now recorded. (#4572)
- For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570)
- Secret values written as `name=value` at the end of a path are now hidden. (#4571)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant