doc-update: gascity-agents.md cites Agent.EffectiveWorkQuery() in internal/config/config.go and its Refresh-procedure drift command greps only that file — upstream split the work-query codegen into internal/config/workquery.go, so the doc's own audit now silently returns nothing for every WorkQuery change (tk-fn53m)#222
doc-update: gascity-agents.md cites Agent.EffectiveWorkQuery() in internal/config/config.go and its Refresh-procedure drift command greps only that file — upstream split the work-query codegen into internal/config/workquery.go, so the doc's own audit now silently returns nothing for every WorkQuery change (tk-fn53m)#222zook-bot wants to merge 1 commit into
Conversation
…efresh-procedure drift command still point at config.go; upstream split the work-query codegen into workquery.go, so the doc's own audit silently returns nothing (tk-fn53m)
gascity d26a54adb ("simplify(S04): move the 700-line shell-codegen block
out of config.go") moved `(*Agent).EffectiveWorkQuery` — and the whole
work-query codegen — into a new `internal/config/workquery.go`. Two places
in the brief still track the old location:
- The "session_origin" section cites the quoted Tier 3 gate as coming from
`internal/config/config.go`; the symbol is no longer in that file.
- The `## Refresh procedure` drift-audit command diffs only `config.go`, so
every work-query change since the split is invisible to it — and the
failure is silent, since an empty result reads as "upstream didn't move."
Verified at gascity origin/main 89e2e699f:
- `EffectiveWorkQuery` resolves to `internal/config/workquery.go` only; the
quoted `case "$GC_SESSION_ORIGIN" in` block is intact there (~line 237),
so the three-tier model and the ephemeral-only Tier 3 rule still hold.
- The command as written yields 0 matching lines since 2026-07-07; widened
to both paths it yields 5, covering #4060 (table-driven Effective*Query
resolver) and #4284 (recovery-hook release surfacing).
- `NamedSession` (config.go:449), `(*NamedSession).QualifiedName()` (:485)
and `validateNamedSessions` (:3952) are all still in `config.go`, so the
`NamedSession` half of the grep and every other config.go citation in the
brief remain correct and are left alone.
Fix: correct the source citation to `workquery.go`, name that file in the
refresh signal bullet, widen the audit pathspec to both files, and note that
the two halves now live in different files — so the next split is caught
rather than silently swallowed.
|
Codex signoff (pre-open, comment-only — not an approval): Code Review ResultsScope: branch-remote Reviewers: correctness, testing, maintainability, project-standards, agent-native/learnings inline. Runtime/security/migration/adversarial conditionals skipped because this is instruction-prose only and changes no executable behavior. Findings: none. Coverage:
Verdict: COMMENT / ready. No rework requested. |
Summary
Target
Change
The brief grounds its work-routing section on
Agent.EffectiveWorkQuery()andcites its source as
rigs/gascity/internal/config/config.go("## Work routingvisibility" → "Source:
Agent.EffectiveWorkQuery()inrigs/gascity/internal/config/config.go"). Upstream moved that function — andthe whole ~700-line work-query shell-codegen block — into a NEW file,
internal/config/workquery.go. The citation now points at a file that doesnot contain the symbol.
The load-bearing half: the brief's own
## Refresh procedureends with anexecutable drift-audit command —
Because it diffs only
config.go, every work-query change since the splitis invisible to it, and the failure is silent: an empty result is
indistinguishable from "upstream didn't move." Measured at gascity
origin/main(89e2e699f),--since=2026-07-07: the command as written yields0 matching lines, while the same grep over
internal/config/workquery.goyields 5, covering two real work-query changes (#4060 table-driven
Effective*Queryresolver + Agent-helper rehome; #4284 recovery-hook releasesurfacing). This is the doc's own drift-detection mechanism failing closed-open.
Suggested shape of the fix (the worker should verify, not copy): correct the
source citation to
internal/config/workquery.go, and widen the refreshcommand's pathspec to cover both files — e.g.
-p -- internal/config/config.go internal/config/workquery.go— so theNamedSessionhalf and theWorkQueryhalf each still hit. Consider notingthat the two halves now live in different files, so a future split is caught.
What is still TRUE and must be preserved (do not "fix" these away):
type NamedSession struct,(*NamedSession).QualifiedName(), andvalidateNamedSessionsare all still ininternal/config/config.go—the
NamedSessionhalf of the grep still works, and every otherconfig.gocitation in the brief (Identity model, Variant A lifecycle /sleep policy, the
NamedSessionrefresh signal) is still correct.case "$GC_SESSION_ORIGIN" in ephemeral|"") ;; *) exit 0 ;; esacblock thebrief quotes verbatim is intact, now at
internal/config/workquery.go(~line 237). The tier table, the
ephemeral-only Tier 3 rule, and thecontroller-probe empty-string branch all still hold.
The audit does not propose prose: read the cited commits ('git log -p' in the
named repo) and write the real edit. If review shows nothing needs changing,
close as a no-op.
Provenance
d26a54adb(2026-07-07) — "simplify(S04): move the 700-lineshell-codegen block out of config.go (#4030)". Creates
internal/config/workquery.goand moves(*Agent).EffectiveWorkQuerythere.Confirm with:
git -C "$GC_CITY/rigs/gascity" show d26a54adb --statgit -C "$GC_CITY/rigs/gascity" log --diff-filter=A --oneline origin/main -- internal/config/workquery.go236785f37(2026-07-13) — "simplify(S04b):table-driven Effective*Query resolver + rehome Agent helpers (#4060)"; and
a7b248348(2026-07-17) — "feat(config): surface failed releases from thedefault recovery hooks (#4284)". Both land in
workquery.goand are exactlywhat the stale refresh command misses.
origin/main89e2e699f(2026-07-23):git -C "$GC_CITY/rigs/gascity" grep -l 'func (a \*Agent) EffectiveWorkQuery' origin/main -- internal/returns
internal/config/workquery.goonly.provenance-SHA churn elsewhere in the brief is standing not-drift and should
not be chased here.
Implementation notes
Implemented: corrected the EffectiveWorkQuery source citation to internal/config/workquery.go and widened the Refresh-procedure drift-audit pathspec to both config.go + workquery.go (plus a note that the two halves now live in different files, so the silent-empty failure mode is called out). Verified at gascity origin/main 89e2e699f: symbol resolves to workquery.go only; quoted GC_SESSION_ORIGIN gate intact at workquery.go:237; old command yields 0 lines since 2026-07-07, corrected command yields 5. NamedSession/QualifiedName/validateNamedSessions confirmed still in config.go (449/485/3952) — those citations left untouched. Branch polecat/tk-fn53m @ ebbfb92 (signed).
Refinery handoff
tk-fn53m(task, P2)polecat/tk-fn53mmainebbfb928; PR opened codex-green.