Skip to content

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

Open
zook-bot wants to merge 1 commit into
mainfrom
polecat/tk-fn53m

Conversation

@zook-bot

Copy link
Copy Markdown
Contributor

Summary

Target

  • Brief(s): docs/gascity-agents.md

Change

  • The brief grounds its work-routing section on Agent.EffectiveWorkQuery() and
    cites its source as rigs/gascity/internal/config/config.go ("## Work routing
    visibility" → "Source: Agent.EffectiveWorkQuery() in
    rigs/gascity/internal/config/config.go"). Upstream moved that function — and
    the whole ~700-line work-query shell-codegen block — into a NEW file,
    internal/config/workquery.go. The citation now points at a file that does
    not contain the symbol.

  • The load-bearing half: the brief's own ## Refresh procedure ends with an
    executable drift-audit command —

    git -C rigs/gascity log --since='<last refresh>' \
      -p -- internal/config/config.go \
      | grep -E '^\+.*NamedSession|^\+.*WorkQuery'

    Because it diffs only config.go, every work-query change since the split
    is 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 yields
    0 matching lines, while the same grep over internal/config/workquery.go
    yields 5, covering two real work-query changes (#4060 table-driven
    Effective*Query resolver + Agent-helper rehome; #4284 recovery-hook release
    surfacing). 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 refresh
    command's pathspec to cover both files — e.g.
    -p -- internal/config/config.go internal/config/workquery.go — so the
    NamedSession half and the WorkQuery half each still hit. Consider noting
    that 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(), and
      validateNamedSessions are all still in internal/config/config.go
      the NamedSession half of the grep still works, and every other
      config.go citation in the brief (Identity model, Variant A lifecycle /
      sleep policy, the NamedSession refresh signal) is still correct.
    • The three-tier work-routing model and the Tier 3 gate are unchanged: the
      case "$GC_SESSION_ORIGIN" in ephemeral|"") ;; *) exit 0 ;; esac block the
      brief quotes verbatim is intact, now at internal/config/workquery.go
      (~line 237). The tier table, the ephemeral-only Tier 3 rule, and the
      controller-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

  • Drift: an upstream change moved a surface one or more briefs above track.
  • gascity d26a54adb (2026-07-07) — "simplify(S04): move the 700-line
    shell-codegen block out of config.go (#4030)". Creates
    internal/config/workquery.go and moves (*Agent).EffectiveWorkQuery there.
    Confirm with:
    git -C "$GC_CITY/rigs/gascity" show d26a54adb --stat
    git -C "$GC_CITY/rigs/gascity" log --diff-filter=A --oneline origin/main -- internal/config/workquery.go
  • Follow-on, same surface: gascity 236785f37 (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 the
    default recovery hooks (#4284)". Both land in workquery.go and are exactly
    what the stale refresh command misses.
  • Verified current at gascity origin/main 89e2e699f (2026-07-23):
    git -C "$GC_CITY/rigs/gascity" grep -l 'func (a \*Agent) EffectiveWorkQuery' origin/main -- internal/
    returns internal/config/workquery.go only.
  • Note on scope: this is the file/procedure citation only. Line-number and
    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

  • Issue: tk-fn53m (task, P2)
  • Source branch: polecat/tk-fn53m
  • Target: main
  • Codex signed off pre-open at ebbfb928; PR opened codex-green.

…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.
@zook-bot

Copy link
Copy Markdown
Contributor Author

Codex signoff (pre-open, comment-only — not an approval):

Code Review Results

Scope: branch-remote origin/main...origin/polecat/tk-fn53m (1 file, +14/-3), reviewed OID ebbfb928166202bd11d2129348faf89286119cf2.
Intent: update docs/gascity-agents.md so the EffectiveWorkQuery citation points at internal/config/workquery.go, and widen the refresh-procedure audit pathspec to include both config.go and workquery.go after upstream split the work-query codegen.
Mode: pre-open signoff review.

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:

  • Verified the changed doc line cites rigs/gascity/internal/config/workquery.go for Agent.EffectiveWorkQuery().
  • Verified func (a *Agent) EffectiveWorkQuery() exists in /home/zook/loomington/rigs/gascity/internal/config/workquery.go and the quoted $GC_SESSION_ORIGIN Tier 3 gate remains at workquery.go:237-240.
  • Verified the refreshed audit command from the town root includes both internal/config/config.go and internal/config/workquery.go and returns WorkQuery matches for recent upstream history.
  • Verified git diff --check origin/main...origin/polecat/tk-fn53m -- docs/gascity-agents.md passes.
  • Markdown lint not run: no repo-local markdown lint command was found, and markdownlint-cli2 is not installed.

Verdict: COMMENT / ready. No rework requested.

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