Repository navigation
fix(workflow): run agent tasks on WP Codebox v0.33.4 - #185
Merged
Merged
Conversation
Pin run-agent-task.yml, its helpers, and the release ref to the v0.33.4 tag commit 126f85b2a8b887ae8e2457d1cb71b15ebdb712cd. Refs Automattic/wp-codebox#2567. AI assistance: Extra Chill Bot (Claude), via a Roadie subagent.
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.
Refs Automattic/wp-codebox#2567
Summary
maintain-docs.ymlcalled WP Codeboxrun-agent-task.ymlata6fe2d208e990a8d04104aa74aacbb8d1539fbc1(releasev0.12.29). On that revision, agent workspace writes could fail to reach the host workspace without any trace, and the uploaded transcript was a 248-byte stub (wp-codebox#2567). This PR moves Docs Agent to v0.33.4, which includes wp-codebox#2588 (merge commitded3cbc08a810b34fc7912824e30598b1efa7b5d).refs/tags/v0.33.4points to annotated tag678b7773f9ce781f14af3158a5361f3f97171f6a, which dereferences to commit126f85b2a8b887ae8e2457d1cb71b15ebdb712cd("release: v0.33.4", the direct child ofded3cbc0).uses:,wp_codebox_workflow_ref, and thevalidate.ymlproducer checkout all pin126f85b2….wp_codebox_release_refisv0.33.4.Changes
.github/workflows/maintain-docs.ymlandvalidate.yml: new pins.tests/wp-codebox-release.fixture.json: new tag, revision, producer revision, and package version. Published asset digests now cover all three v0.33.4 assets:wp-codebox-cli-linux-x64.tar.gz,wp-codebox-workspace-0.33.4.tgz, andwp-codebox.zip. I took them from the release API'sdigestfield and checked them againstsha256sumof the downloaded files; all three matched. I also added three coverage flags for the v0.33.4 behaviour (see below).tests/validate-wp-codebox-run-agent-task-contract.php:ded3cbc0…, a plausible but non-release SHA, and a second case checks for a helper ref that diverges fromuses:.workspace_apply(wp-codebox/runner-workspace-apply-outcome/v1),writes-not-appliedfailing closed atstage: apply, verification being skipped after an apply failure, therejected_pathslist, the decoded transcript with the write ledger,workspace_applyin the reviewer-safe projection,metadata.runner_workspace_publicationwithpull_request.url, andcallback_data.tests/validate-docs-agent-packages.php: new pins. The README assertion for the "private package-recovery manifest" now checks that the apply outcome is documented instead. That manifest no longer appears anywhere in WP Codebox source or in the v0.33.4 release.README.mdand.github/workflows/README.md: rewrote the WP Codebox sections to describe v0.33.4. I condensed the v0.12.25–v0.12.29 changelog paragraphs into one paragraph of inherited behaviour, removed the obsolete split between the release tag and the producer revision, and documented the new apply outcome, glob semantics, transcript, and publisher behaviour. I also corrected the README claim that "a write-tool call that leaves no byte diff producesno_changes", which v0.33.4 changes.Compatibility review (
a6fe2d2→126f85b)run-agent-task.ymlandcontracts/run-agent-task-reusable-workflow-interface.v1.jsonare byte-identical between the two revisions, so inputs, secrets, and outputs are unchanged. All of the producer-side change is in.github/scripts/run-agent-task/*.package.jsonreports0.33.4, which matcheswp_codebox_release_ref: v0.33.4. The executor now importsscripts/process-marker.mjs. The workflow does a full checkout of the helper ref, so that file is available.metadata.runner_workspace_publication.pull_request.url,output_projections(optional-projection skip still in place),callback_data, typedartifact_declarationsand required-only-when-required: true, and the declared-artifact upload allowlist. No Docs Agent workflow logic needed to change.stage: applywithwrites-not-applied. In that case verification, drift, and the completion check do not run. A maintenance pass that rewrites a file with identical bytes therefore fails, where it used to produceno_changes. Runs with no write calls are unaffected.**spans directories, and*,?, and[...]stay within one segment. Patterns likedocs/**/*.mdandplugins/*/docs/user/**now match on the host too.<branch>-<base-sha-12>branch. If the open PR's branch is behind the base, publication fails and asks for a rebase.branch_prefix + run_id. Withbranch_prefixset todocs_branch, that yields<docs_branch><workload_id>. This is the same on both revisions and out of scope.wp-codebox#2588 is a
Refs, not aFixes. It makes lost writes fail loudly with path evidence and fixes the glob mismatch, but the issue stays open until a real run confirms the fix.Verification
Run locally on PHP 8.4, with
WP_CODEBOX_DIRpointing at a wp-codebox checkout of126f85b2…:php tests/validate-docs-agent-packages.php: passedphp tests/validate-docs-agent-completion-contract.php: passedphp tests/validate-external-native-package-sources.php: passedphp tests/validate-wp-codebox-run-agent-task-contract.php: passed. Run against the olda6fe2d2checkout, it fails as expected (package version mismatch), and the new producer strings are absent there.php tests/repair-docs-links-smoke.php: passedAGENTS_API_DIR=<agents-api@78e2dd4> php tests/native-agent-import.php: all 42 assertions passedactionlint1.7.12: cleanmainagainsta6fe2d2before the change.I have not done a live agent run against v0.33.4.
AI assistance: Extra Chill Bot (Claude), via a Roadie subagent.