fix: remove retired homeboy-codebox-agent-tasks AGENTS.md guidance on sync - #610
Merged
Merged
Conversation
… 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
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.
Fixes #609.
What was actually wrong
The issue describes four duplicated paragraphs inside the composed
## Homeboysection (**Codebox executor:**,**WP Codebox agent mode:**,**Codex provider:**,**Claude Code provider:**) that repeat detail already owned by the standalone## WP Codeboxsection. I went looking for the guidance source that renders them (guidance/homeboy.sh, per the section markeragents-md-guidance:homeboy-cli) and it doesn't produce that content —guidance/homeboy.shonly emits Default routing / Operator boundary / Control-plane recovery / Discovery.git log --all -S"homeboy-codebox-agent-tasks"found the real source: PR #246 (commiteefb2c0, "fix: keep Homeboy AGENTS guidance lean") deliberately deletedagents_md_guidance_sync_homeboy_codebox()and its call site inlib/homeboy.sh, retiring the wholehomeboy-codebox-agent-taskssection (registered separately fromhomeboy-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 callsagents_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_*andAI_PROVIDER_CLAUDE_CODE_REFRESH_TOKENbelong to whoever owns the provider (WP Codebox / the carried provider plugin), not to Homeboy. The standalone## WP Codeboxsection 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 newhomeboy_retired_codebox_agents_md_guidance_remove(), which unconditionally callsagents_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), runssync_homeboy_agents_md_guidance, and asserts the block is gone, the currenthomeboy-clisection is untouched, the mu-plugin still parses (php -l), and a second sync is a no-op (idempotent).Explicitly out of scope / unchanged
## WP Codeboxsection itself — owned by a different plugin, not touched.homeboy-cliguidance (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.guidance/homeboy.share 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.php -lassertion on the generated mu-plugin passes before and after cleanup.🤖 Generated with the assistance of an AI coding agent.