Repository navigation
Run Worktrunk Tend workflows with Codex on gpt-6-sol - #4240
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
Feedback on work in progress — not a merge verdict; mark the PR ready when you want the full review. Three things worth settling while the cutover runs.
.github/CLAUDE.md still documents the Claude credential as the one in play. It is hand-maintained (not generated), and both of its tables go stale on merge: the Tokens table lists CLAUDE_CODE_OAUTH_TOKEN | "Authenticates Claude Code to the Anthropic API" | tend environment, and the Environment-protection table's tend row lists CLAUDE_CODE_OAUTH_TOKEN, TEND_BOT_TOKEN as its secrets. After this diff no workflow reads either Anthropic input; every agent job reads OPENAI_API_KEY and CODEX_AUTH_JSON, and tend-codex-auth-refresh adds CODEX_REFRESH_AUTH_JSON and CODEX_REFRESH_PAT. That file is where the next reader goes to find out which secret lives where, so it wants updating in this PR rather than after.
The refresh-only secrets land in the environment every agent job already joins. tend-codex-auth-refresh.yaml names environment: {name: tend, deployment: false} — the same environment as tend-review, tend-mention, and the rest. .github/CLAUDE.md states the consequence under Environment protection: "Each environment holds what one phase needs, since a job that joins an environment can read every secret in it." The two secrets that workflow adds are the sensitive half of the chain — upstream's refresh_pat input is described as "GitHub PAT allowed to update secrets in the tend environment", and codex_auth_json as a bundle that "must use auth_mode chatgptAuthTokens and contain no refresh token, so concurrent jobs cannot rotate shared auth state". The split is deliberate upstream, and the generated workflow's own comment restates it ("Only this workflow may rotate the refresh-token chain"), but a shared environment is not what enforces it: a pull_request_target agent session would be able to read both a secrets-writing PAT and the full refreshable bundle. Worth deciding before the credentials are created — and since the workflow hardcodes environment: tend, splitting them into an environment the agent jobs don't join needs an upstream lever rather than a local edit.
.claude/skills/running-tend/SKILL.md names the old invocation syntax. It refers to the bundled skills as /tend-ci-runner:run-tend, /tend-ci-runner:review, /tend-ci-runner:triage, /tend-ci-runner:act-in-other-repos, and /tend-ci-runner:fix-a-bug — the form this PR's prompts replace. The Codex action's prompt input documents the replacement: "$skill-name mentions resolve to the corresponding SKILL.md (e.g. $review, $triage)". That is a repo-owned file pointing the Codex agent at a syntax the harness doesn't use, so the cross-references stop being followable at exactly the moment the sessions start needing them.
This reverts commit b7ea2ad.
Regenerates the nine `tend-*.yaml` workflows from tend 0.3.1, up from 0.2.15. Behavior here is unchanged: the only substantive diff is two new action inputs, `merge: maintainer` and `control_plane_owner: ""`, both of which are the action's own defaults. `maintainer` is the merge authority this repo already runs under — the bot proposes, a maintainer merges. What the upgrade changes for this repo: - **`tend check` audits protected refs and credential environments more strictly** ([max-sixty/tend#1382](max-sixty/tend#1382)). A protected branch must now restrict creation, update and deletion together rather than update alone, and the credential audit no longer treats a ref-qualified reusable workflow as this tree's copy. This repo does not clear the new bar yet — the nightly filed #4242 with the single ruleset gap and the remediation. - **Yolo merge mode exists, and is off** ([max-sixty/tend#1172](max-sixty/tend#1172), [#1390](max-sixty/tend#1390)). The new inputs are how a repo would opt into letting the bot merge its own PRs; leaving them at the defaults keeps the current arrangement, and the `merge: maintainer` value is what the mitmproxy cache step is now gated on. - **`review-runs` sees the whole night** ([max-sixty/tend#1377](max-sixty/tend#1377)). Run listing now pages to the Actions ceiling instead of stopping at the first page, so a busy night's early runs stop falling out of the census; [#1374](max-sixty/tend#1374) keeps each correction row's author alongside it. - **CI polling is bounded by elapsed time, not iteration count** ([max-sixty/tend#1376](max-sixty/tend#1376), reinstating [#1371](max-sixty/tend#1371) after [#1375](max-sixty/tend#1375) reverted it). A settle loop against slow checks now stops on a sleep budget, so a long matrix can't quietly stretch a session. - **Install-test drift detection tightened** ([max-sixty/tend#1381](max-sixty/tend#1381)): generator output a PR never committed now fails tend's own drift check, which is the check that makes a regeneration PR like this one trustworthy. Full comparison: [0.2.15...0.3.1](max-sixty/tend@0.2.15...0.3.1). This PR does not touch `.config/tend.yaml`, whose `sandbox_setup:` key 0.3.1 now warns "will be refused in a later release". That migration is a separate change. #4240 overlaps this completely: it was generated with the same 0.3.1, so it carries the identical headers and the identical `merge: maintainer` / `control_plane_owner: ""` on the same lines, underneath a Claude → Codex harness swap. The only thing that distinguishes the two is which harness the action runs. Whichever lands first leaves the other conflicting on the eight `uses:` lines, resolved by regeneration rather than by hand. So this PR is worth landing on its own only for as long as the Codex cutover stays in draft — if that lands first, close this one. Verified by regenerating in the merged tree: `uvx [email protected] init` reproduces these nine files byte-for-byte, and the action declares `default: maintainer` and `default: ""` for the two new inputs at `0.3.1`, so neither changes behavior. Co-authored-by: worktrunk-bot <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
Holding the verdict because the PR description still sets a merge condition: it asks to keep this PR in draft until it has a refreshable Codex login whose token chain isn't copied from another repo, a repo-scoped refresh PAT, and a tend check run that passes the main-branch lifecycle and credential-environment rules. The PR is now marked ready, but the description hasn't dropped that condition. I'm treating it as still in force until you say it's met.
The diff at this head is the same as the one the earlier draft feedback covered, and those points still apply. Since the merge from main, the credential listing lives in .github/AGENTS.md ("tend admits main and holds CLAUDE_CODE_OAUTH_TOKEN and TEND_BOT_TOKEN"), so that's the line to update. .claude/skills/running-tend/SKILL.md still uses the /tend-ci-runner: form in 4 places.
## Summary - Give the serialized Codex subscription refresh job a dedicated `tend-codex-refresh` environment restricted to the default branch. A preceding job in `tend` passes only whether consumer auth is configured. - Publish the rotated full credential back to the refresh environment and the access-only credential to `tend`. Update provisioning, environment checks, generated workflows, tests, and setup documentation for that split. - Preserve API-key mode and fail on missing, partial, misplaced, or orphan subscription secrets. This enables [Worktrunk PR #4240](max-sixty/worktrunk#4240) to use a separately provisioned Codex subscription without placing refresh credentials in agent jobs. Consumer workflows need a Tend release before they can pin the updated action. ## Validation - `wt test` - `uv tool run pre-commit run --all-files` - Independent security review of the generated workflow, action, checks, and provisioner > _This was written by Codex on behalf of @max-sixty_
## Release Bump Tend to 0.3.3 and add the changelog for changes since 0.3.2. This release includes the isolated Codex subscription refresh environment from [#1418](#1418), needed by [Worktrunk #4240](max-sixty/worktrunk#4240). The changelog also covers control-plane CODEOWNERS, the PR-check verdict output, installer and security documentation, and explicit Tend skill dependencies. ## Validation - `wt test`: 1,331 Python tests, 32 worker tests, TypeScript typecheck - `uv tool run pre-commit run --all-files` - `uv lock` > _This was written by Codex on behalf of @max-sixty_
Regenerates the tend workflows for tend 0.3.3 → 0.3.4. The diff here is the version stamp and the `max-sixty/tend/claude` action pin; the behavior changes ship in the action and bundled skills: - **Relayed review replies no longer re-surface.** After the bot answers a PR review relayed through `tend-mention-relay`, the action now marks the matching notification read, so the notifications sweep doesn't pick the same review up again (max-sixty/tend#1425). - **Triage replies to feature requests are shorter.** The triage skill stops opening its reply by restating that the requested feature doesn't exist yet (max-sixty/tend#1423). - **Codex subscription setup fixes** in `install-tend`: the refresh PAT setup is now repository-specific, and forced terminal color no longer breaks the refresh environment setup (max-sixty/tend#1421, max-sixty/tend#1424). These only matter when running tend on Codex, as #4240 proposes. No model pins in `.config/tend.yaml` changed. Full comparison: max-sixty/tend@0.3.3...0.3.4 Co-authored-by: worktrunk-bot <[email protected]>
|
@worktrunk-bot Please refresh this PR branch against current main and resolve its mechanical merge conflicts so it can get current CI. Preserve the proposed behavior and the current draft state, run the focused checks for the resulting diff, and report any conflict that requires a semantic or product decision. This requests branch maintenance; the outstanding maintainer review remains pending.
|
Regenerate the tend workflows with tend 0.3.13 (main's version) from this branch's .config/tend.yaml, keeping main's setup-uv v10.3.0 pin. Merge .github/AGENTS.md: keep this branch's tend and tend-codex-refresh entries and main's consolidated release environment.
|
Merged current main (
None of the conflicts needed a product decision. Pre-commit hooks pass on the touched files. |
Regenerate Tend 0.3.14 workflows from the Codex configuration with external subscription refresh. Keep the refresh chain on the Mackup rotator and document its access-only publication contract. Co-authored-by: Codex <[email protected]>
Switch Worktrunk's Tend agent workflows to Codex on
gpt-6-sol, generated with Tend 0.3.14. Mackup's existing account rotator owns subscription refresh (codex.auth_refresh: false) and publishes access-onlyCODEX_AUTH_JSONplusCODEX_ACCOUNT. Refresh tokens remain on the rotator host; no repository-hosted refresher or refresh PAT is needed.Validation: all 5,388 Rust tests passed (one skipped), along with documentation checks, final full pre-commit checks, and
actionlint. GitHub CI including Codecov passed, and worktrunk-bot approved commit8e842331aa0f29949579050551dd2d0b67fb04b1before the squash merge.The cutover is complete at
45d9b4e842877691210e7062b4f92bb1636ace71: Mackup published the consumer credential, everytend checkcheck passed, and hosted validation succeeded. The hosted session used subscription authentication and completed sixgpt-6-solturns. The unused hosted-refresh PAT secret and former Claude credential/account marker were removed.