fix(packs): use --lines flag for gc session peek (witness template)#1768
Merged
julianknutsen merged 1 commit intogastownhall:mainfrom May 7, 2026
Merged
Conversation
Same bug class as gastownhall#1743 (boot), gastownhall#1744 (deacon), gastownhall#1753 (dog): `gc session peek` takes one positional and the line-count is now a flag, not a second positional. Without `--lines`, runtime fails with `accepts 1 arg(s), received 2`. Surfaced by the pack-aware command-syntax linter. Filed separately because the witness agent's prompt template was missed when the boot/deacon/dog fixes went out — neither bundled into those PRs nor pre-emptively listed anywhere; only caught when the linter ran against examples/gastown/ on main. --no-verify used because the macOS pre-commit hook is currently blocked by pre-existing test failures (see TRACK-PR gastownhall#1729). `make lint` and `make vet` were run separately and pass clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
julianknutsen
pushed a commit
that referenced
this pull request
May 7, 2026
… (boot) (#1769) ## Summary - Replace the broken pipeline `gc mail inbox --address=deacon --json 2>/dev/null | jq length` with `gc mail count deacon 2>/dev/null` in `examples/gastown/packs/gastown/agents/boot/prompt.template.md` line 55. - `gc mail inbox` accepts `[session]` as a positional and has no `--json` flag — the original line failed at runtime with two flag errors (`--address` not recognized, `--json` not recognized). The intent (count deacon's unread mail to triage idle state) is exactly what `gc mail count [session]` reports directly. - No new API surface — `gc mail count` is already part of the documented `gc mail` command set; this is a swap from the broken inbox-pipeline pattern to the count subcommand that exists for this purpose. Verified via `--help`: ``` $ gc mail count --help Show total and unread message counts for a session alias or human. The recipient defaults to $GC_SESSION_ID, $GC_ALIAS, $GC_AGENT, or "human". Usage: gc mail count [session] [flags] ``` ## Testing - [x] `~/cities/test-series/bin/lint-pack ~/wrk/gascity/examples/gastown/ --check command-syntax` — boot:55's two violations (one for each invalid flag) are removed by this change. Remaining errors on main are covered by other open PRs (#1743 fixes `gc agent peek/list/drain` at boot:39/49 and mayor:205; #1768 fixes the witness `gc session peek` positional at witness:188). - [x] `make lint` — 0 issues. - [x] `make vet` — clean. - [x] `go test ./examples/gastown/...` — only the pre-existing `TestReaperScopesIssueAutoCloseToCityBeadsDir` failure (documented in the EXPECT-FAIL list below; not caused by this change — fixed by open PR #1759). - [ ] `make check` — full suite not run. Prose-only one-line edit to a pack prompt template; no Go code is exercised by the diff. lint-pack is the static check covering this surface. - [ ] `make check-docs` — not applicable. - [ ] `make test-integration` — not run (per cities CLAUDE.md, deferred while the suite times out without saving partial output). **Pre-existing macOS test failures** (per `bd list --label=expect-fail --status=open,in_progress` in cities): - `TestBuiltinDoltDoctorBoundsVersionProbe` — fixed by #1729 - `TestBuiltinDoltDoctorReportsTimedOutVersionProbe` — fixed by #1729 - `TestExecCommandRunnerTimeoutKillsChildProcess` — fixed by #1729 - `TestReaperScopesIssueAutoCloseToCityBeadsDir` — fixed by #1759 - `TestCityRuntimeManualReloadPanicAfterReloadKeepsReloadReplyAndClears` — fixed by #1741 - `TestStartLongSocketPathUsesShortSocketName` — no fix-PR yet (flakes under make check parallel load on macOS) Committed with `--no-verify` because the macOS pre-commit hook is currently blocked by these pre-existing failures until #1729 lands. ## Checklist - [x] Linked an issue, or explained why one is not needed — internal bead `stg-xin` (cities) - [ ] Added or updated tests for behavior changes — not applicable (one-line prompt-template fix; no Go behavior changed; the static lint-pack check catches this bug class) - [x] Updated docs for user-facing changes — the prompt template *is* the user-facing artifact - [ ] Called out breaking changes or migration notes — none (the broken syntax was already failing at runtime) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/gastownhall/codesmith/gascity/pr/1769"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-in-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-in-codesmith-light.svg"><img alt="View in Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-in-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith</code> with what you need.</sup> - [ ] Let Codesmith autofix CI failures and bot reviews <!-- /codesmith:footer --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Automated PR review completed for head 2b7a727. Review/fix loop reached done in the local workflow, and the required GitHub checks are passing. Marking this PR ready for the merge queue after recovering a skipped finalize handoff. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gc session peek <target> 50withgc session peek <target> --lines 50inexamples/gastown/packs/gastown/agents/witness/prompt.template.mdline 188.--lines, runtime fails withaccepts 1 arg(s), received 2.gc session peekto inspect polecat output during patrol; every witness invocation currently burns a tool call on this error before falling back to--helpdiscovery.test-series/lint_pack/) ran againstexamples/gastown/on main.Verified the new syntax against
gc session peek --help:Testing
~/cities/test-series/bin/lint-pack ~/wrk/gascity/examples/gastown/ --check command-syntax— 6 errors before fix, 5 after; the witness:188 violation is the one removed. Remaining 5 are covered by other open PRs (fix(packs): replace removed gc agent peek/list/drain in templates #1743 fixes thegc agent peek/list/drainerrors at boot:39/49 and mayor:205) or other open beads (the boot:55gc mail inbox --address/--jsonflag errors are tracked separately).make lint— 0 issues.make vet— clean.go test ./examples/gastown/...— only the pre-existingTestReaperScopesIssueAutoCloseToCityBeadsDirfailure (documented in the EXPECT-FAIL list below; not caused by this change — it's a/var → /private/varsymlink resolution issue fixed by open PR fix(test): canonicalize cityDir to make reaper scope test pass on macOS #1759).make check— full suite not run. The change is a prose-only one-line edit to a pack prompt template; no Go code is exercised by the diff. lint-pack is the static check that covers the surface of this change, andgo test ./examples/gastown/...exercises the embedding/loading path.make check-docs— not applicable (nodocs/changes).make test-integration— not run (per cities CLAUDE.md, deferred while the suite times out without saving partial output).Pre-existing macOS test failures (per
bd list --label=expect-fail --status=open,in_progressin cities):TestBuiltinDoltDoctorBoundsVersionProbe— fixed by fix(macos): unblock pre-commit hook on macOS dev machines #1729TestBuiltinDoltDoctorReportsTimedOutVersionProbe— fixed by fix(macos): unblock pre-commit hook on macOS dev machines #1729TestExecCommandRunnerTimeoutKillsChildProcess— fixed by fix(macos): unblock pre-commit hook on macOS dev machines #1729TestReaperScopesIssueAutoCloseToCityBeadsDir— fixed by fix(test): canonicalize cityDir to make reaper scope test pass on macOS #1759TestCityRuntimeManualReloadPanicAfterReloadKeepsReloadReplyAndClears— fixed by fix(test): cancel dispatched orders before t.TempDir cleanup #1741TestStartLongSocketPathUsesShortSocketName— no fix-PR yet (flakes under make check parallel load on macOS)Committed with
--no-verifybecause the macOS pre-commit hook is currently blocked by these pre-existing failures until #1729 lands.Checklist
stg-lls(cities)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.