Repository navigation
Conversation
Expose the Claude SDK harness at max-sixty/tend/[email protected] so all three harnesses are named subpaths (claude, interactive, codex). The generator now emits /claude@ for `harness: claude`; the bare root max-sixty/tend@ is retained as a back-compat alias for already-pinned adopters. The root action.yaml stays the single canonical definition; claude/ re-exposes it via symlinks (action.yaml, shared, .claude-plugin, plugins). A composite action can't delegate to a sibling local action through a relative uses: — that path resolves against the consumer workspace, not the action dir (actions/runner#1348) — so symlinks are the zero-duplication alias. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tend-agent
left a comment
There was a problem hiding this comment.
The subpath mechanism itself is clean — the four claude/ symlinks (action.yaml, shared, plugins, .claude-plugin) cover every ${{ github.action_path }}-relative lookup in the current PR's action.yaml, the regtest/test churn is consistent, and the new test_claude_action_ref is a good guard. But this PR was branched before #704, and that changes the picture in two ways worth resolving together rather than as a plain conflict fixup.
1. Merge conflict — based on pre-#704 main. GitHub reports this PR as CONFLICTING/DIRTY. #704 ("Run the default claude harness headless behind the credential proxy") landed on main and rewrote the same action.yaml, CLAUDE.md, README.md, and docs/security-model.md regions this PR edits. The PR's descriptive text ("Claude SDK — invokes claude-code-action with the tend plugin marketplace") describes the old mechanism; main now describes and runs the Claude harness as headless claude -p behind the credential proxy. So this needs a rebase onto main, and the new prose in claude/README.md and CLAUDE.md needs reconciling with the headless description rather than a mechanical conflict resolution.
2. The symlink set won't be complete after the rebase. The alias design was validated against the pre-#704 action.yaml, which only read shared/system-prompt.md and passed plugin_marketplaces: ${{ github.action_path }} to claude-code-action. Main's headless action.yaml reads more under github.action_path, and claude/ has no interactive symlink:
action.yaml(on main) runsbash "${{ github.action_path }}/interactive/proxy/setup-sandbox.sh"and setsACTION_PATH: ${{ github.action_path }}/interactiveso${ACTION_PATH}/proxy/inject_credentials.pyresolves. Run asmax-sixty/tend/[email protected], both resolve under.../claude/interactive/proxy/..., which doesn't exist — the proxy setup would fail.- The plugin-install step does
MARKETPLACE_SRC="$(realpath "${{ github.action_path }}")"thencp -a "$MARKETPLACE_SRC/.claude-plugin" "$MARKETPLACE_SRC/plugins" "$SANDBOX_MKT/".realpathresolves theclaude/dir itself (not a symlink), so the children stay as symlinks;cp -apreserves symlinks (-a⇒--no-dereference), so the copied.claude-plugin/pluginsland in the sandbox as dangling relative links (../.claude-pluginresolves outside$SANDBOX_MKT). The old path worked becauseclaude-code-actiondereferenced the marketplace at read time; the new physical copy does not.
So after rebasing, the /claude invocation likely needs an interactive symlink too (and the cp -a would want to dereference, e.g. cp -aL or copy from realpath-resolved child paths) — i.e. the alias needs re-validating against the headless action, not just a textual merge.
(These are based on reading main's action.yaml; I haven't run the rebased /claude ref in CI. Flagging for human review given the supply-chain-sensitive surface.)
#704 rewrote the root action.yaml to run `claude -p` behind the credential-injecting proxy. Reworked the /claude symlink alias to match: - add claude/interactive -> ../interactive (the action runs interactive/proxy/setup-sandbox.sh via github.action_path) - drop the now-unused claude/plugins symlink - action.yaml: resolve MARKETPLACE_SRC through .claude-plugin/.. so the sandbox `cp -a` copies the real .claude-plugin/plugins dirs (preserving their internal symlinks), not the alias's own dangling symlinks - claude-smoke.yaml: alias-integrity job deterministically asserts the alias resolves to the root action and its resources - reconcile CLAUDE.md / README / security-model / release skill with #704's proxy framing and the /claude subpath rename Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The symlinks are committed git objects and the root claude-smoke covers the byte-identical action body; a standalone job asserting "symlinks resolve" was belt-and-suspenders. Restores claude-smoke.yaml to its prior shape. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Superseded by #712, now merged. #712 lands the same harness-named subpaths ( The one deliberate difference from this PR: #712 cuts over fully (moves the root action into
|
What
Adds
max-sixty/tend/[email protected]as a named subpath for the Claude SDK harness, so all three harnesses are consistent named subpaths instead of the Claude one sitting at the repo root:max-sixty/tend/[email protected]— Claude SDK (headlessclaude -pbehind the credential proxy)max-sixty/tend/[email protected]— Claude interactive (PTY-supervised)max-sixty/tend/[email protected]— CodexThe generator now emits
max-sixty/tend/claude@<version>forharness: claude. The bare rootmax-sixty/[email protected]keeps working unchanged for adopters already pinned to it — published immutable tags can't be rewritten, so the root must remain. This is a deliberate exception to tend's cut-over-completely rule.This branch was rebased onto and merged with #704 (the headless-
claude -p-behind-proxy rewrite of the root action), which landed while this was in flight; the alias is built against that new action.Design: one definition, no duplication
The obvious approach — a root passthrough whose only step is
uses: ./claude— does not work. In a composite action a relativeuses:resolves against the consumer's$GITHUB_WORKSPACE, not the action's own directory, anduses:can't take${{ }}expressions (actions/runner#1348, still open).uses: ./claudewould look forclaude/action.yamlin the adopter's repo and fail.So the root
action.yamlstays the single canonical definition. Theclaude/subpath re-exposes it via symlinks to it and to the resources its steps reach through${{ github.action_path }}:When invoked as
max-sixty/tend/[email protected],github.action_pathis.../claude, and every${{ github.action_path }}/...lookup resolves through a symlink back to the real repo-root resource, exactly as atmax-sixty/[email protected]. The action body is byte-identical for both refs; only path resolution differs. Git stores these as symlinks (mode 120000) and preserves them on action checkout; tend runs only on Linux runners. There is no second copy of the action to drift —claude/action.yamlis the root file.One edit to
action.yamlmakes the alias work end-to-end: the sandbox marketplace step now resolvesMARKETPLACE_SRCviarealpath "${{ github.action_path }}/.claude-plugin/..", which follows the alias's.claude-pluginsymlink back to the real repo root. Itscp -athen copies the real.claude-plugin/pluginsdirs (preserving their internal symlinks) instead of the alias's own symlinks (whichcp -awould copy as dangling links). The change is a no-op for the root ref (resolves to the same dir).Considered and rejected: a recursive
claude -> .symlink (makesrealpathcollapse to the root for free, but a self-referential dir is a footgun for any tool that walks the tree);cp -aLto dereference during the copy (would flatten the plugin trees' real internal symlinks, a behavior change for the root ref too); copying the action body intoclaude/(duplicates ~670 lines, drifts).Changes
claude/— symlink alias (action.yaml,shared,interactive,.claude-plugin) + READMEaction.yaml— resolve the sandbox marketplace source through.claude-plugin/..(one line, no-op for the root ref)generator/src/tend/templates/macros.yaml.j2— emit/claude@for the claude harness; interactive/codex untouchedtest_claude_action_ref, and the conftest version-scrub regex broadened from(?:/codex)?@to(?:/\w+)?@so it scrubs the/claude@(and/interactive@) subpathuses:line is now/claude@(codex and install-test snapshots unchanged)README.md,CLAUDE.md,docs/security-model.md,running-tend/releaseskills — describe/claudeas the canonical Claude ref and the root as a retained aliasVersion-pin note
max-sixty/tend/[email protected]only resolves once a release tags a commit that already containsclaude/— the same bootstrap theinteractiveandcodexsubpaths went through. Tend's own committed.github/workflows/tend-*.yamlare intentionally not regenerated here (the in-tree generator would stamp a tag that doesn't exist yet); they pick up/claude@at the next release. The regtest snapshots do reflect the new ref, since they test generator output rather than live workflows.Tests
wt test(256 passed) andpre-commit run --all-files(actionlint over the newaction.yaml, check-yaml, ruff, typos, uv-lock, reference sync) pass. Theclaude-smokeagent run on this PR validates the action body end-to-end via the root ref — and since the/claudebody is byte-identical (same file via symlink), that coverage transfers. The/claudepath resolution is verified locally; it's exercised end-to-end by the post-release integration smoke (the release-pinnedmax-sixty/tend/claude@ref only exists once a release tagsclaude/).