Skip to content

fix: remove retired homeboy-codebox-agent-tasks AGENTS.md guidance on sync - #610

Merged
chubes4 merged 1 commit into
mainfrom
fix/agents-md-codebox-duplication
Sep 19, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/agents-md-codebox-duplication

Conversation

@chubes4

@chubes4 chubes4 commented Sep 19, 2026

Copy link
Copy Markdown
Member

Fixes #609.

What was actually wrong

The issue describes four duplicated paragraphs inside the composed ## Homeboy section (**Codebox executor:**, **WP Codebox agent mode:**, **Codex provider:**, **Claude Code provider:**) that repeat detail already owned by the standalone ## WP Codebox section. I went looking for the guidance source that renders them (guidance/homeboy.sh, per the section marker agents-md-guidance:homeboy-cli) and it doesn't produce that content — guidance/homeboy.sh only emits Default routing / Operator boundary / Control-plane recovery / Discovery.

git log --all -S"homeboy-codebox-agent-tasks" found the real source: PR #246 (commit eefb2c0, "fix: keep Homeboy AGENTS guidance lean") deliberately deleted agents_md_guidance_sync_homeboy_codebox() and its call site in lib/homeboy.sh, retiring the whole homeboy-codebox-agent-tasks section (registered separately from homeboy-cli, under its own marker, immediately following it in the composed doc). That commit stopped producing the section going forward, but never unregistered it from installs that had already synced it — there is no code path left anywhere in this repo that calls agents_md_guidance_unregister "homeboy-codebox-agent-tasks". extrachill.com synced before #246 landed, so it has been re-emitting the orphaned block on every compose since, with no producer to edit and no way for a future sync to clean it up.

The four paragraphs named in the issue:

  • **Codebox executor:**
  • **WP Codebox agent mode:**
  • **Codex provider:**
  • **Claude Code provider:**

are four of the eight paragraphs in that same orphaned section (the other four — **Agent tasks:**, **Workspace shape:**, **Operator verbs:**, **Chat bridges:** — were retired by the identical #246 decision for the identical reason). There is no live source anywhere in the codebase to surgically edit "4 of 8" back down to a one-liner; the entire section is dead code with zero producer. Rebuilding a new guidance unit to keep 4 of those 8 paragraphs alive would mean reintroducing content #246 explicitly chose to delete for being too heavy, which is the opposite of the fix. So this closes the actual gap #246 left behind: the whole retired section is now unregistered on sync, converging stale installs to the same state a fresh install already has.

Byte count removed on extrachill.com: ~2,028 bytes of always-on Homeboy-embedded WP Codebox context per the issue's measurement (the full retired section, not just the four named paragraphs — see above for why the other four go with it).

Layer-purity rationale

Homeboy is the orchestration layer; it must not document the provider-credential surface of a layer below it. Provider secret names like AI_PROVIDER_OPENAI_CODEX_* and AI_PROVIDER_CLAUDE_CODE_REFRESH_TOKEN belong to whoever owns the provider (WP Codebox / the carried provider plugin), not to Homeboy. The standalone ## WP Codebox section already documents sandbox recipes, providers, and credentials; Homeboy's job is only to know Codebox is an available executor backend.

What changed

  • lib/homeboy.sh: sync_homeboy_agents_md_guidance() now also calls a new homeboy_retired_codebox_agents_md_guidance_remove(), which unconditionally calls agents_md_guidance_unregister "homeboy-codebox-agent-tasks". Unregister is already idempotent (no-op when the section isn't present), so this is safe on every install — fresh installs that never had the section, installs still on it, and installs already cleaned up.
  • tests/agents-md-guidance.sh: new regression case that registers a fixture reproducing the retired section (all eight legacy paragraphs, including the secret-name strings), runs sync_homeboy_agents_md_guidance, and asserts the block is gone, the current homeboy-cli section is untouched, the mu-plugin still parses (php -l), and a second sync is a no-op (idempotent).

Explicitly out of scope / unchanged

  • The ## WP Codebox section itself — owned by a different plugin, not touched.
  • No command documentation changed. Every command in the current homeboy-cli guidance (homeboy agent-task cook, homeboy agent-task fanout cook-batch, homeboy agent-task controller, homeboy config show, etc.) is untouched; this is not a staleness fix.
  • The Homeboy operator-boundary text and control-plane recovery steps in guidance/homeboy.sh are untouched.

Verification

  • bash tests/agents-md-guidance.sh — all assertions pass, including the new retired-section regression case.
  • bash tests/homeboy-components.sh, tests/homeboy-project-id.sh, tests/homeboy-verification-guidance.sh, tests/homeboy-codebox-canary.sh, tests/workspace-installation.sh — all pass (no regressions in adjacent Homeboy coverage).
  • bash -n lib/homeboy.sh — syntax check clean.
  • No PHP files were hand-edited (the mu-plugin is generated); the new test's php -l assertion on the generated mu-plugin passes before and after cleanup.

🤖 Generated with the assistance of an AI coding agent.

… sync

#246 (eefb2c0) retired the homeboy-codebox-agent-tasks section to keep
Homeboy AGENTS.md guidance lean, deleting the sync function that produced
it. That commit never unregistered the section from installs that had
already synced it, so hosts that composed AGENTS.md before #246 keep
re-emitting it forever: four paragraphs of WP Codebox provider detail
(Codebox executor, WP Codebox agent mode, Codex provider, Claude Code
provider) duplicating the codebox-owned '## WP Codebox' section, plus
Agent tasks / Workspace shape / Operator verbs / Chat bridges paragraphs
retired for the same reason.

Add an unconditional, idempotent unregister call to
sync_homeboy_agents_md_guidance so every setup/upgrade sync converges
stale installs to the same state a fresh install already has: no
producer for this section id exists in the codebase anymore, so nothing
should keep emitting its content.

Fixes #609
@chubes4
chubes4 merged commit 3d28187 into main Sep 19, 2026
76 checks passed
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.

AGENTS.md: Homeboy section embeds WP Codebox provider docs, duplicating the codebox-owned section

1 participant