Repository navigation
fix(generator): write the actionlint ignore for concurrency.queue - #1095
Conversation
`concurrency.queue` is valid GitHub Actions syntax that actionlint's schema rejects, so every adopter that lints its workflows goes red the moment the nightly regen lands tend-review.yaml — including on the regen PR itself, which then cannot merge. `init` now merges the ignore into .github/actionlint.yaml, which the binary reads however it is invoked; a `-ignore` flag covers one caller only. The entry is scoped to `tend-*.yaml`, and the file stays the adopter's — their config is merged into, never overwritten. Closes #1094
tend-agent
left a comment
There was a problem hiding this comment.
Two findings, both about whether the ignore actually reaches the adopters #1094 describes.
The nightly regen never commits the file. The regen step in plugins/tend-ci-runner/skills/nightly/SKILL.md scopes all three of its path arguments to .github/workflows and .config: detection (git status --porcelain .github/workflows .config), the no-value gate (NON_STAMP_DIFF=$(git diff --no-color .github/workflows .config ...), and the commit (git add -A .github/workflows .config). init writes .github/actionlint.yaml outside both, so in the /tmp/tend-update-workflows worktree the file is created, left untracked, never staged, and then thrown away by the git worktree remove --force that ends the step.
That is the delivery path the issue is about — "every adopter that lints its workflows goes red the moment the nightly uvx tend init regeneration lands". install-tend stages with a bare git add ., so a fresh install picks the file up, but an existing adopter gets the regenerated workflow with no ignore beside it, exactly as today.
The commit line needs the path. Naming both filenames in one call aborts the whole git add when one is absent (fatal: pathspec '.github/actionlint.yml' did not match any files, nothing staged), so it has to be conditional:
git add -A .github/workflows .config
for f in .github/actionlint.yaml .github/actionlint.yml; do
[ -e "$f" ] && git add "$f"
doneThe detection line wants the path too. NON_STAMP_DIFF is the awkward one: git diff cannot see a file that is not tracked yet, so a regen whose only change is the new config still reads as 0 and skips the PR. The release shipping this also bumps the action refs, so the first regen opens a PR regardless — but an adopter who later deletes the file would get no repair.
The bail branches are the untested half. The four _bail paths in actionlint_config are what stop init from rewriting an adopter's config into a shape they did not ask for, and none of the five new tests exercises one — fresh write, merge, idempotence, .yml in place, and --dry-run are all happy paths. Per CLAUDE.md complexity earns its place by preventing wrong outward actions, and clobbering an adopter's linter config is precisely that, so a case asserting the file is byte-for-byte unchanged and the warning is emitted (say paths: holding a list) is worth the few lines.
How the first finding was checked
Scratch repo with a tracked .github/workflows/tend-review.yaml and an untracked .github/actionlint.yaml:
git status --porcelain .github/workflows .config→ no outputgit diff --no-color .github/workflows .config | wc -l→0git add -A .github/workflows .configthengit diff --cached --name-only→ no output
The mechanism itself checks out otherwise: actionlint's Config.PathConfigs matches the paths key with doublestar against the path relative to cwd, and IgnorePatterns compiles each entry as a regex, so .github/workflows/tend-*.yaml and the unanchored message pattern both do what the diff intends. ParseConfig uses non-strict unmarshalling, so an adopter on actionlint older than v1.7.5 silently ignores the paths key rather than failing on it.
The regen step scoped detection, the no-value gate, and the commit to .github/workflows and .config, so the .github/actionlint.yaml that `init` now writes was created in the /tmp worktree, left untracked, and thrown away with it — the delivery path for existing adopters. Widen the pathspec to .github, and stage before diffing so an untracked file counts as a change (git diff cannot see one, so a regen whose only change is the new config read as no change at all). Also cover a bail branch: an actionlint config the generator cannot merge into is left byte-for-byte with a warning, which is what stops init from rewriting an adopter's linter config.
|
Both findings addressed in 3037d53. The regen never committed the file. Widened the three pathspecs in the nightly regen step from The bail branches were untested. Added VerificationScratch repo, tracked
Negative control for the gate the change moves: with the config already tracked and the only edit a
|
tend-agent
left a comment
There was a problem hiding this comment.
The regen fix checks out — I reproduced both the old and new behaviour in a scratch repo: with only an untracked .github/actionlint.yaml, the old git status/git diff pair reported no change and NON_STAMP_DIFF was 0; staging first and diffing --cached gives A .github/actionlint.yaml and 4. A stamp-only header bump on a tracked config still gives 0, so the no-value skip survives. The new bail-branch test passes.
Two findings on the generator half, both from running the pinned actionlint v1.7.12 against the merged tree rather than from reading.
A malformed actionlint.yaml crashes init rather than bailing. The four _bail branches cover config shapes the merge can't handle, but not a file that doesn't parse — _YAML_BLOCK.load(existing) propagates ParserError/ScannerError straight out of actionlint_config, and nothing in _update_actionlint_config catches it. An adopter mid-rebase with conflict markers in that file, or a tab-indented one, gets a traceback from tend init; worse, the crash lands after every workflow file is written and before the stale-tend-*.yaml cleanup, so the repo is left half-regenerated. A parse error is the most likely form of "a config the generator does not understand", so it wants the same warn-and-leave the shape mismatches get. The inline suggestion routes it through the existing bail; that needs YAMLError on the from ruamel.yaml import YAML line, and you may prefer to hoist _bail above the load and pass it a "YAML" reason so the message says so rather than "unexpected top level".
Reproduction
.config/tend.yaml with bot_name: test-bot, .github/actionlint.yaml holding paths:\n - a\n b: c:
wrote .github/workflows/tend-review-runs.yaml
CRASH: ParserError
All seven tend-*.yaml were on disk at that point; the cleanup pass and the summary never ran. Also raises on paths: {unclosed and on a tab-indented file.
The paths glob is narrower than "however it is invoked." ACTIONLINT_TEND_GLOB carries a directory prefix, and actionlint matches the key against the path string as it received it, not normalised to the project root — so the ignore silently stops applying for two ordinary invocations. Dropping the prefix to **/tend-*.yaml covers every form while keeping the tend-*.yaml filename contract that does the actual scoping, which is what README and CLAUDE.md already describe ("scoped to tend-*.yaml").
actionlint v1.7.12 runs
Against this branch's committed .github/actionlint.yaml:
| invocation | result |
|---|---|
actionlint (no args) |
exit 0 |
actionlint .github/workflows/tend-review.yaml |
exit 0 |
actionlint "$PWD/.github/workflows/tend-review.yaml" |
exit 0 |
actionlint ./.github/workflows/tend-review.yaml |
exit 1 — unexpected key "queue" |
cd generator && actionlint ../.github/workflows/tend-review.yaml |
exit 1 |
The ./-prefixed form is what find . -name ... | xargs actionlint produces. With paths: {'**/tend-*.yaml': ...} all five are exit 0, and both negative controls still hold: the same queue: max in a my-release.yaml still fails, and an unrelated bogus top-level key in tend-review.yaml still fails.
The glob change also means regenerating the committed .github/actionlint.yaml and updating the four test assertions that spell out .github/workflows/tend-*.yaml. ruamel quotes the new key ('**/tend-*.yaml':) on dump, which actionlint parses fine — a bare **/… key would be a YAML alias error.
`paths` keys are matched against the path actionlint was handed, not normalised to the project root, so the `.github/workflows/` prefix made the ignore miss `actionlint ./…/tend-review.yaml` (what find|xargs produces) and any run from a subdirectory. Drop the prefix to `**/tend-*.yaml`; the `tend-*.yaml` filename still does the scoping. Also bail on an actionlint config that doesn't parse. The four shape checks covered configs the merge can't handle, but a `ParserError` from the load propagated out of `init` — after every workflow file was written and before the stale-file cleanup, leaving a half-regenerated repo. Warn and leave it, like the shape mismatches. The by-hand snippet in that warning quotes the key: bare `**` opens a YAML alias, so an adopter pasting it would get a scanner error.
The repo-local half of the weekly pin sweep: `uv-pre-commit` 0.12.5 →
0.12.7, `mirrors-typos` v1.49.0 → v1.50.0, `WORKTRUNK_VERSION` 0.74.0 →
0.75.0, and the lockfile's `click` 8.4.2 → 8.5.0 and `wcwidth` 0.8.2 →
0.8.3. Nothing here ships to adopters. `pre-commit run --all-files` and
`uv run pytest` (763) pass.
`ruff-pre-commit` is deliberately held back — v0.14.11 → v0.16.5 reports
66 findings across the repo (37 auto-fixable, 29 not) plus reformatting
in 3 files, so it gets its own PR rather than riding along here.
<details><summary>Worktrunk verification</summary>
Nothing in CI runs `.config/codex-cloud/environment.sh`, and it runs
under `set -euo pipefail`, so the overlay asks for both of its
preconditions to be checked by hand. Both were, against v0.75.0 on this
runner:
- `worktrunk-installer.sh` still ships in the release assets, and the
install honours `WORKTRUNK_UNMANAGED_INSTALL`.
- `wt --version` prints `wt v0.75.0`, matching the `"wt
v${WORKTRUNK_VERSION}"` equality the script guards on — a format change
there would reinstall on every run.
- `wt config approvals add --yes` records without a TTY: all 7 commands
`.config/wt.toml` declares were approved and saved, exit 0, and `wt
config approvals list` shows an empty UNAPPROVED section afterwards.
</details>
Co-authored-by: tend-agent <[email protected]>
Moves the pinned `claude` binary from 2.1.241 to 2.1.251, npm's current `latest` dist-tag (`stable` still sits at 2.1.236, and `CLAUDE.md` pins `latest`). A stale pin resolves `--model opus`/`sonnet` to a superseded alias target, so the bump is what keeps the harness on the model the workflows name. `uv run pytest` passes (763). <details><summary>CHANGELOG skim, 2.1.242 → 2.1.251</summary> Seven releases carry notes (2.1.243, .245, .246, .247, .248, .250, .251), skimmed for the paths this action exercises — plugin/skill loading, slash-command dispatch, headless `-p`, `--model` alias resolution, first-run onboarding, and sandboxing. **Nothing in the range changes an agent path tend exercises.** Item by item: **Plugin and skill loading (2.1.246, 2.1.251).** Three entries look like they land on `tend-ci-runner`'s layout and none of them reaches this action. `/reload-plugins` reporting 0 skills for `skills/*/SKILL.md` plugins (2.1.246) — `/reload-plugins` appears nowhere in the repo; `shared/steps/install-tend-plugins.sh` runs `claude plugin marketplace add` then `claude plugin install`. The doubled `<plugin>:` prefix in the slash menu (2.1.246) — no `plugins/tend-ci-runner/skills/*/SKILL.md` frontmatter `name` carries the prefix, and headless `-p` renders no slash menu to double it in. The plugin-skills race (2.1.251) is scoped upstream to *background sessions* racing a concurrent marketplace refresh; the action starts one one-shot `claude -p` per job. **2.1.245** has a single entry: a startup crash on distributions shipping glibc 2.44 (Arch, CachyOS, Fedora Rawhide). Jobs run on `ubuntu-24.04` (glibc 2.39), so it doesn't apply. **Sandbox items (2.1.243, 2.1.251).** 2.1.243 stopped listing allowed network hosts in the sandboxed Bash prompt and stopped dropping network-violation detail when a blocked command still exits 0; 2.1.251 changed how sandboxed commands' output files are created and now requires approval for server-managed settings that route sandbox traffic through a proxy or inject credentials. All of these are Claude Code's *own* Bash sandbox. This action doesn't use it: isolation is a separate non-sudo OS user, and the proxy is wired through the environment by `proxy/setup-sandbox.sh`, not through managed settings. **Security fixes that read as relevant (2.1.247, 2.1.251).** Marketplace names containing control or invisible characters are now rejected (2.1.247) — both tend marketplaces use plain ASCII names. The file-tool symlink swap and the plugin path-traversal fix (2.1.251) harden Claude Code's permission check, which isn't the boundary here: `claude/action.yaml` documents the run as `permissions.defaultMode: bypassPermissions`, so the non-sudo sandbox user and the proxy are what contain it. **Project settings (2.1.251).** `.claude/settings.json` `env` no longer sets `CLAUDE_CONFIG_DIR`, `CLAUDE_CODE_TMPDIR`, or `TMPDIR`. No-op here — the repo's `.claude/settings.local.json` has no `env` block, and `shared/steps/install-claude-binary.sh` pins the XDG dirs through `sudo -u ... env`. **Neutral to this action:** `--restricted` (2.1.248), the `PreModelSwitch`/`PostModelSwitch` hooks and `/cost` cache reporting (2.1.251), and the plan-mode fix for `claude -p --continue`/`--resume` (2.1.246), since runs here are one-shot `-p` and never resumed. 2.1.250 is "Bug fixes and reliability improvements" with no itemised notes. </details> Co-authored-by: tend-agent <[email protected]>
Moves the pinned `@openai/codex` from 0.149.0 to 0.151.0, npm's current `latest` dist-tag. CI's `test-codex-surface` job installs whatever is pinned and asserts the CLI surface this action depends on, so a bump that breaks `codex plugin add`, `codex exec`, or `--output-last-message` fails on this PR. <details><summary>Release-notes skim, 0.150.0 and 0.151.0</summary> Read for the three things the overlay asks about — model availability, sandbox behaviour, and `--output-last-message`. Nothing in either release touches `--output-last-message`, and no model was withdrawn. **Worth watching: project-level `AGENTS.md` under an untrusted project.** 0.150.0 — *"Untrusted projects no longer supply project-level `AGENTS.md` instructions"* ([#39837](openai/codex#39837), [#40004](openai/codex#40004)). This action stages its own `AGENTS.md` into `$CODEX_HOME`, which is unaffected, but the adopter's repo-root `AGENTS.md` is read from the working directory and is not. `codex exec` here runs with `--sandbox` and no explicit trust configuration, so whether a CI checkout counts as trusted is not something this repo can determine from the notes. No `OPENAI_API_KEY` reaches this repo's runs, so a live session stays unverified either way — flagging it as the item to watch if a Codex adopter reports repo instructions going unread. **Relevant to the plugin install step:** 0.151.0 — plugin catalogs now combine per-repository configuration and report invalid project marketplaces without hiding valid ones. The install step's `codex plugin marketplace add` + `codex plugin add tend-ci-runner@tend` pair is what `test-codex-surface` exercises. **Sandbox:** 0.151.0 restores permission profiles across TUI turns and stops `/cd` weakening sandbox restrictions, and improves remote-sandbox enforcement using the executor's real home directory and OS conventions. The TUI and `/cd` items don't apply to `codex exec`. **Neutral:** `@`-mentions of Codex tasks, `/copy`, `/rename`, `Interrupt` hooks, Windows sandbox setup, Bedrock compaction, MCP grace periods and extension hooks. `uv run pytest` passes (763); the codex surface assertion runs in this PR's CI. </details> Co-authored-by: tend-agent <[email protected]>
Moves the pinned `uv` that launches the credential-injection proxy from 0.12.5 to 0.12.7, PyPI's current release. `mitmproxy` is already at its latest (12.2.3), so the paired pin in the root `pyproject.toml` doesn't move with it this time — `uv` goes alone, as it did the last time the two diverged. This `uv` only runs `mitmdump`; the agent never sees it, and skills that need `uv` install their own. CI smokes the pair together, so a `uv` that can no longer launch the pinned mitmproxy fails on this PR. `uv run pytest` passes (763). Co-authored-by: tend-agent <[email protected]>
…the draft flag (#1087) ## Problem The review skill decides whether to withhold an APPROVE from the `isDraft` flag alone. A non-draft PR whose body says, in prose, that it must not merge yet gets read as ready, and both approving paths — step 5's "no issues, approve with an empty body" and the incremental path's "your earlier findings are now addressed" — reach APPROVE without consulting the body. The incremental path is the sharper one: its notion of "resolved" is scoped to the bot's own findings, so a PR can be simultaneously "everything the reviewer raised is fixed" and "the author says this must not merge", and the rule as written only sees the first half. Reported in #1086 with a verified case: numbagg/numbagg#769 (`draft: false`) opened with `This should not merge until two design choices are resolved`, drew three bot COMMENT reviews on code-level findings, and got an empty-body `APPROVED` at 17:50 once the maintainer's commits closed those findings out. It was closed unmerged six hours later on the first of the two design choices the body had already named. The approval was the only verdict standing on the PR at close time. ## Solution Generalize the draft carve-out's reasoning — "the author hasn't asked for a verdict yet" — from the flag to the statement. Edits to `plugins/tend-ci-runner/skills/review/SKILL.md`, the rule stated once and pointed at from every approving path: - **Step 5 (Submit)** carries the rule, directly above the POST recipe every approving path is sent to: a PR body or later author/maintainer comment withholding merge readiness draws a COMMENT naming the blocker, not an APPROVE. It says explicitly that the bot's own findings closing out doesn't clear it — the two conditions are independent — and bounds itself to one statement: the surrounding silence rules are keyed on threads, so a body-only COMMENT would otherwise restate the same blocker on every push. - **Step 1's two approving sentences** each get a pointer, since that path jumps straight to the recipe without reading step 5's prose: the trivial-skip sentence (the path that fired) and the dedup rule's `resolves the last open one (then approve with an empty body)`, which reaches the same trigger from the substantive-incremental path. - **The pre-APPROVE peek** in Posting mechanics re-checks the gate alongside the existing red-check gate, because a blocker can land in a comment after the review began. The asymmetry is the argument for spending a condition here: withholding a warranted approval costs one re-review on the next push, while an APPROVE standing on a PR its author gated is a wrong outward signal that persists until someone notices. ## Testing `generator/tests/test_cross_file_contracts.py` gains `test_review_approval_gates_on_author_stated_readiness`, which pins the rule, all three pointers, and the once-only bound — the split is exactly the drift this file exists to catch, since a later edit to either approval path can silently lose its route to the gate. Confirmed failing before the skill edit and passing after; full `uv run pytest` is green (761 passed), as is `pre-commit` on both changed files. --- Closes #1086 — automated triage --------- Co-authored-by: tend-agent <[email protected]>
Moves `ruff-pre-commit` from v0.14.11 to v0.16.5, held out of #1099 because it isn't an ordinary rev bump: ruff 0.16.0 expanded the default rule set from 59 rules to 413, and 0.15.0 moved the formatter to the 2026 style guide. The repo carries no ruff configuration, so it takes those defaults directly — 64 findings appear on a codebase that reports `All checks passed!` under the old pin. Every change here is behaviour-preserving; the point is to move the pin without smuggling in a semantic change. Three findings are suppressed rather than fixed, each with the reason inline. Each is in code where satisfying the rule would be a real change: the mitmproxy addon's root-logger call (`LOG015`) sits in the credential-injection path and follows mitmproxy's documented addon pattern, `preexec_fn` in the OAuth helper (`PLW1509`) is what gives the child its controlling terminal, and `UP017` in `shared/steps/_common.py` would rewrite `datetime.timezone.utc` to the 3.11+ `datetime.UTC` in a directory documented as 3.10-compatible (those step bodies run on the runner's system `python3`, which is 3.10 on an `ubuntu-22.04` `runs-on` override). Say the word and either can become a named logger / restructured spawn instead. <details><summary>What the 64 findings were, and how each was handled</summary> | Rule | n | Handling | |---|---|---| | `I001` unsorted-imports | 27 | ruff's own safe fix | | `PLW1510` subprocess-run-without-check | 19 | explicit `check=False` at every site — this is the current behaviour spelled out, not a change to it | | `RUF059` unused-unpacked-variable | 5 | ruff's fix (`rows` → `_rows`) | | `UP037` quoted-annotation | 3 | ruff's fix; the file carries `from __future__ import annotations`, so unquoting is safe | | `UP017` datetime-timezone-utc | 2 | one ruff's fix (a test); one suppressed in `shared/steps/`, reason inline | | `PIE810` multiple-starts-ends-with | 2 | ruff's fix (tuple argument) | | `FURB167` regex-flag-alias | 2 | ruff's fix | | `PLR1730` if-stmt-min-max | 1 | ruff's fix | | `PERF102` incorrect-dict-iterator | 1 | ruff's fix; the discarded key was genuinely unused | | `LOG015` root-logger-call | 1 | suppressed, reason inline | | `PLW1509` subprocess-popen-preexec-fn | 1 | suppressed, reason inline | `PLW1510` has no autofix in ruff, so `check=False` was inserted at each call's closing paren via an AST pass that refused to write any file it couldn't re-parse, then normalised by `ruff format`. **Formatting.** 14 files are reformatted. One is the 2026 style guide's own doing — it is the only file `ruff format --check` rewrites against `main` at v0.16.5. The other 13 are the `check=False` insertions being wrapped back onto their lines. **Verification.** `pre-commit run --all-files` passes at the new rev, and `uv run pytest` passes (763), including the regtest snapshots — so no generated workflow output moved. `worker/` and `site/` are untouched. **The alternative, not taken.** Pinning `select = ["E4", "E7", "E9", "F"]` would reproduce the pre-0.16 default exactly and drop the diff to one line. That trades a config-free repo for a frozen rule set, which reads like the wrong direction for a repo that has deliberately carried no ruff config — but it is a one-line change if you'd rather have it. </details> --------- Co-authored-by: tend-agent <[email protected]>
Moves the site from Astro 5 to Astro 7 (`^5.14.0` → `^7.2.9`), the last pin in the weekly sweep still behind. Two majors, so this is checked against the built output rather than just a green build: the rendered page is semantically unchanged, and the one behaviour change that does reach the output — Astro 7 makes `compressHTML: 'jsx'` the default, which strips whitespace between elements — lands only in places where flex or grid already ignores it. `publish-site.yaml` builds on PRs precisely for this, so CI is the second check. The one Astro 7 major that doesn't land on the built site is `astro dev` backgrounding itself under an agent environment, which would break the `wt` worktree dev-server tether. A second commit sets `ASTRO_DEV_BACKGROUND` on that post-start step to keep the foreground behaviour; details in the review thread. <details><summary>How the output was compared</summary> Both versions were built from the same source and the `dist/` trees diffed. **Structure and text.** With scope hashes and asset hashes normalised, the two `index.html` files are identical in tag sequence and attributes, and all **123 text nodes are byte-identical**. The `<pre>` block carrying the install commands is byte-identical too, newlines included. **The whitespace change.** Astro 7 removes inter-element whitespace at 239 of 286 tag gaps. Most sit between block elements, where it never rendered. Six kinds of gap have an inline-capable element on both sides, and each is inside a container that does not render whitespace between its children: | Gap | Container | Why it can't show | |---|---|---| | `</svg> <span>tend</span>` (wordmark) | `.site-header .wordmark` | `display:inline-flex; gap:.55rem` — flex ignores it, the gap supplies the space | | `</a> <a>` ×2 (footer links) | `.site-footer nav` | `display:flex; gap:1.4rem` | | `</span> <span>`, `</span> <a>`, `</a> <time>` ×36 (activity placeholder rows) | `.activity-rows` / `.activity-row` | `display:grid` with `grid-template-columns:subgrid` | Same-line whitespace is preserved as the changelog says: `tended by hand · <a>MIT</a>` still carries its space. **CSS.** Identical selector set. Every declaration difference is a Lightning CSS normalisation with the same computed result — `transparent` → `#0000` and `background:0 0`, `animation:X 3s ease` → `animation:3s ease X`, `.05s` → `50ms`, `grid-column:1 / -1` → `1/-1`, `column-gap:0;row-gap:.5rem` → `gap:.5rem 0`, `transition:opacity .25s ease` → `.25s` (`ease` is the initial value). **JS.** Bundles are re-minified by a different engine, so they don't diff usefully. Every string the runtime depends on is present in the same number of modules in both builds: `api.tend-src.com`, `/activity`, `/currently-tending`, `recent-activity`, `currently-tending`, `stats`, `data-stat-strip`, `activity-row`. Not verified: the bundles were not executed in a browser — there's no headless browser in this environment. **Astro 7 breaking changes, against what this site uses:** `@astrojs/db` removal, `astro:transitions` deprecated-API removal, `experimental.rustCompiler`/`queuedRendering`/`cache`/`routeRules` flag removals, and the Sätteri Markdown processor all touch features the site doesn't use — it is one static `.astro` page with client scripts. Vite 8 and the Rust compiler are internal. **Node.** Astro 7 requires `node >=22.12.0`. `publish-site.yaml` uses `node-version: '22'`, which resolves to the newest 22.x (22.23.2 on this runner), so it is satisfied — worth knowing if that pin is ever narrowed. </details> --------- Co-authored-by: tend-agent <[email protected]>
`prompt:` is a documented per-workflow override, but three of the shapes
it rendered into could hold only one line. Each wrote a workflow file
GitHub rejects, from a config that is valid YAML in the adopter's own
hands — and `init` never parses what it writes, so the adopter's first
sign of trouble was GitHub refusing to load the workflow.
- **review** put the prompt inside a GitHub Actions `format('...')`
expression in a folded scalar, where a newline ends the string literal.
- **ci-fix** used a block scalar whose 12-space indent the template
wrote by hand, reaching only the first line.
- **`block_prompt`** — which triage, nightly, weekly, notifications and
review-runs already used — emitted a bare `prompt: |`, so YAML infers
the block's indent from the first line. A prompt whose *first* line is
itself indented made every later line look like the end of the scalar.
This one predated the other two and hit six workflows.
Reviewing that fix turned up the same bug three lines above it:
`sandbox_path` and `sandbox_setup` render adopter-supplied lists into a
hand-written `|` block scalar and break the same way on an indented
first entry.
## The change
`block_prompt` becomes `block_input(name, text)`, and all four
adopter-supplied inputs render through it with an explicit `|2`
indentation indicator — the indentation is now written once rather than
at each call site. `sandbox_env` keeps its newline rejection, but for
the reason that actually applies now: the action reads one `NAME=VALUE`
pair per line, not because the scalar would break.
That let review substitute `{pr_number}` with `${{
github.event.pull_request.number }}` directly, the way triage has always
handled `{issue_number}`, which retires `_escape_braces` and the
`format()` machinery with it. That's a behaviour improvement as well as
a deletion: braces used to be doubled for `format()`, and *only* when
the placeholder happened to be present, so the same prompt shipped
different text depending on an unrelated part of itself. Now braces and
quotes are the adopter's own text in every workflow.
Also from the review:
- `workflows.mention.prompt` was accepted and silently dropped, while
the config docs promise every workflow takes a `prompt`. mention
composes its prompt from the triggering event, so there is nothing an
override could replace — `Config.load` now refuses it. A non-string
`prompt` raises a `ClickException` instead of an `AttributeError` out of
the renderer.
- A blank `prompt` came in three shapes, none of which did what the
adopter wrote. A whitespace-only value is truthy, so it beat the default
and left the agent step with no instructions — and the harnesses
disagreed about that: the Claude action fails on an empty `TEND_PROMPT`,
while the Codex action hands it to `codex exec` and boots an agent with
nothing to do. `""` and a bare `prompt:` are falsy and reached the
default instead, silently ignoring the key; the bare form also tripped
the type check and reported `got NoneType`. `Config.load` refuses all
three. The prompt checks are also ordered so the type check runs first.
- The docs named only `{pr_number}`, leaving `{issue_number}` and
`{run_id}` undocumented, and said nothing about multi-line prompts. They
now also warn that a `${{ ... }}` written as prose will be evaluated.
## Verification
<details><summary>What was checked, and how</summary>
- Each of the three broken shapes fails the new matrix test when
restored — the `block_prompt` one across all seven prompt-bearing
workflows, the sandbox one across both levers.
- The matrix is pinned to `GENERATORS`, so a new prompt-bearing workflow
cannot join and skip it; mention's exclusion is asserted rather than
merely absent. It runs on both harnesses and checks each placeholder
resolves to its own event rather than to any event.
- New coverage for what the matrix can't reach: the sandbox levers, the
ruamel re-serialisation path that `workflow_extra`/`jobs` overrides
take, and the blank prompt the config now refuses.
- Driving the real `init` CLI over a config with multi-line prompts
produces correct nested indentation, preserved quotes, and ci-fix's run
coordinates appended after the adopter's text.
- `actionlint` on the generated set reports nothing but the known
`concurrency.queue` complaint (#1094).
- On `|2` reaching GitHub's own parser: 128 public workflow files use
`run: |2`, and `microsoft/onnxruntime-genai`'s is `active` with a
successful run — so the indentation indicator is accepted by the same
YAML front-end that reads `with:`.
</details>
The only change to tend's own generated workflows at the next
regeneration is `prompt: |` → `prompt: |2` on six files, plus review's
prompt shape.
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…earch missed (#1096) The weekly `consumers.json` refresh rebuilds the file wholesale from `gh search code`, so the file inherits the search's recall. Today's search returned 6 of the 8 listed consumers, and running the recipe as written would have deleted `jakobtfaber/Faber2026` and `max-sixty/cargo-affected` — both live, both still carrying eight `tend-*.yaml` files — from the data the public site renders. This makes the search a discovery step only: candidates are the union of the search hits and the repos already listed, and a per-repo API check decides who stays. <details><summary>Evidence and verification</summary> **The miss is in the index, not the query or the cap.** The search returns 52 hits against a 100 cap, so nothing is crowded out; both repos simply return zero hits for `max-sixty/tend` while their workflow files demonstrably contain the ref: ``` $ gh search code 'max-sixty/tend' --repo max-sixty/cargo-affected (no results) $ gh api repos/max-sixty/cargo-affected/contents/.github/workflows/tend-review.yaml | ... | grep uses: - uses: max-sixty/tend/[email protected] ``` `max-sixty/cargo-affected` returns nothing for a bare `tend` query either — the repo is absent from the code index, not stale in it. #1093 observed the same 6-of-8 result independently and named this as out of scope for that PR. **Not a retry.** #345 was closed on the principle that a retry wrapper around a transient search blip isn't worth keeping. This adds no retry and re-queries nothing: it stops treating search absence as evidence of removal, and moves the keep/drop decision onto an authoritative per-repo API check that an uninstall actually fails. **Verified.** The recipe was extracted verbatim from the file and run under `set -euo pipefail` against real GitHub: 6 discovered, 8 candidates, 8 retained, output byte-identical to the committed `data/consumers.json`. The drop path was exercised separately against a repo with no matching workflows (`octocat/Hello-World` → `count=0`, dropped). `uv run pytest` passes (763), as does `pre-commit` on the changed file. **Out of scope, worth its own look:** `max-sixty/tend-integration` satisfies both filters — 3 `tend-*.yaml` files and `bot_name: tend-agent` — and is absent from the list only because code search does not index it either. If it is ever indexed, the weekly refresh adds the test fixture to the public site's adopter list. </details> --------- Co-authored-by: tend-agent <[email protected]>
…ng it out (#1105) Rotating a consumer's `CLAUDE_CODE_OAUTH_TOKEN` today meant watching `oauth_token.py` sit silent for its full 900s window with no idea whether it was waiting on a person or had already failed. It had already failed: `claude setup-token` reports a rejected code as `OAuth error: Request failed with status code 400` and then parks at "Press Enter to retry", emitting nothing further. The wrapper watched only for a token, so that state was indistinguishable from an approval still pending. Watch for the TUI's error line, end the run on it, and report what the CLI actually said. A rejected code now fails in seconds and names its own cause instead of timing out under a guess. The same investigation corrected a factual error in the skill. `claude setup-token` holds a localhost listener (observed at `127.0.0.1:56305`) that takes the browser redirect, so approving is normally the whole of the user's job and the run completes with nothing typed. SKILL.md presented the `code#state` paste as a co-equal path; it's the fallback for when the browser shows a code page instead. A code is also good exactly once, so one the listener already redeemed fails at the prompt — which is the likely shape of today's failure. Two integration tests against a fake `claude`: a rejected code must fail fast (this hung for the harness's full 60s timeout before the fix), and the localhost path must produce a token with nothing typed. <details> <summary>Review rounds folded in</summary> Before the PR opened: - A comment claimed the error check's placement preserved a retry that the `break` right under it makes unreachable. - The `failed` flag it set was redundant and slightly wrong: the loop also ends on a closed pty and on an exited child, either of which can carry the error line in the read that ends it, leaving the flag false with the error sitting in the buffer. Reading the buffer unconditionally is both shorter and more correct. From tend's review of the first commit — two real bugs, both reproduced before fixing: - `\s*` after the colon crossed the line break, so an error the CLI prints with no detail captured the *next* line and reported "Press Enter to retry." as the cause. Horizontal whitespace only. - An empty capture is falsy, so that same detail-free error fell through to a message saying the TUI reported no error — about a run that ended because it did. "No error seen" and "an error with nothing after the label" are now distinct. - The comment at the break claimed the error line "has finished arriving"; nothing establishes that, since no read happens between it and the final scan. Rewritten to say the detail may be clipped and that naming the error is what matters. - `PASTE_PROMPT` and the flag timing the stderr hint against it are gone. The hint goes out with the authorize URL, where it's more use, and scheduling it by matching TUI wording was the coupling this change argues against elsewhere. </details> > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
tend-agent
left a comment
There was a problem hiding this comment.
Close-out, no changes requested.
Retracting the glob finding from my last review. 516a5f1 is right and I was wrong. Re-ran the pinned actionlint v1.7.12 against the merged tree with the committed **/.github/workflows/tend-*.yaml, and every invocation form is exit 0 — including the two I reported as broken:
| invocation | exit |
|---|---|
actionlint (no args) |
0 |
actionlint .github/workflows/tend-review.yaml |
0 |
actionlint ./.github/workflows/tend-review.yaml |
0 |
actionlint "$PWD/.github/workflows/tend-review.yaml" |
0 |
cd generator && actionlint ../.github/workflows/tend-review.yaml |
0 |
Both negative controls hold, so the prefix isn't buying its scope back with a false negative: the same queue: max copied to .github/workflows/my-release.yaml still fails, and an extra bogus key under tend-review.yaml's own concurrency: still fails. The directory prefix costs nothing and scopes tighter, and the comment on ACTIONLINT_TEND_GLOB describing that is accurate. Please read **/tend-*.yaml in my previous review as withdrawn rather than as an open thread.
The other finding is addressed — the parse-error path bails through the same warning and test_init_leaves_unparsable_actionlint_config_untouched covers it — and the data is None reparse added in 516a5f1 keeps a comments-only config's comments through the merge.
One observation, not something to act on: the merge round-trips the adopter's file through ruamel with tend's indent settings, so an existing config written with 4-space mappings or flush sequence indentation comes back reindented, and CRLF comes back as LF. Semantics are preserved; byte-level formatting isn't, which is a slightly stronger claim than README's "preserves the rest of the adopter-owned config" makes. For an eight-line linter config landing once, that seems like the right trade rather than something to engineer around.
How this was checked
actionlint v1.7.12 from the release tarball, run against the merged tree (a2a5c77), which carries both the committed .github/actionlint.yaml and a tend-review.yaml with queue: max at line 22.
Negative controls:
$ cp .github/workflows/tend-review.yaml .github/workflows/my-release.yaml
$ actionlint .github/workflows/my-release.yaml
.github/workflows/my-release.yaml:22:7: unexpected key "queue" for "concurrency" section ... [syntax-check]
$ # bogus-key inserted under tend-review.yaml's concurrency:
$ actionlint .github/workflows/tend-review.yaml
.github/workflows/tend-review.yaml:23:7: unexpected key "bogus-key" for "concurrency" section ... [syntax-check]
Reformatting observation, calling actionlint_config directly:
| input | output |
|---|---|
ignore:\n - 'x' (flush sequence) |
ignore:\n - 'x' |
self-hosted-runner:\n labels:\n - my-runner |
reindented to 2/4 |
| CRLF line endings | LF |
flow style ({labels: [my-runner]}) |
unchanged |
uv run pytest → 821 passed. The repo's own lint job is green on this head, which is the root-relative row of the table above running for real.
Nightly regeneration of tend's workflow files, picking up two upstream releases. **tend version:** 0.1.22 → 0.1.24 ### Notable changes - **The frequent poll now repairs conflicted bot PRs**, not just unread notifications — the `tend-notifications` boot gate gained a GraphQL query that test-merges open bot PRs and looks for deferral markers in recent comments, so a conflicted PR wakes the queue instead of waiting for the nightly sweep ([max-sixty/tend#1108](max-sixty/tend#1108)). - **Review gating tightened**: `APPROVE` is now conditioned on the author stating merge readiness rather than the draft flag alone, the posting preflight is bound to the outward action, and the code-review pass became its own step gated at submit ([max-sixty/tend#1087](max-sixty/tend#1087), [max-sixty/tend#1107](max-sixty/tend#1107), [max-sixty/tend#1080](max-sixty/tend#1080)). - **Generator fixes that change this repo's YAML**: an adopter's `prompt:` may now span more than one line (the `|2` block-indent markers in the diff), pre-check setup guards are preserved, and the `concurrency.queue` actionlint ignore is written out ([max-sixty/tend#1103](max-sixty/tend#1103), [max-sixty/tend#1106](max-sixty/tend#1106), [max-sixty/tend#1095](max-sixty/tend#1095)). - **`uv` is provisioned for agent sessions**, and Gist-backed Claude memory ships as experimental ([max-sixty/tend#1109](max-sixty/tend#1109), [max-sixty/tend#1110](max-sixty/tend#1110)). - Pinned harness versions moved with the releases: Claude 2.1.251, Codex 0.151.0, uv 0.12.7. ### A second commit, outside the usual regen `tend init` now also writes `.github/actionlint.yaml` (the `concurrency.queue` ignore from max-sixty/tend#1095). The nightly recipe stages only `.github/workflows` and `.config`, so it landed untracked and would be re-created on every future run — the second commit tracks it. This repo runs no actionlint job or pre-commit hook, so the file is inert here; it only suppresses a false positive for anyone linting these workflows locally. Full compare: max-sixty/tend@0.1.22...0.1.24 --------- Co-authored-by: worktrunk-bot <[email protected]>
) The nightly Step 7 gap #1116 reports was already closed on `main` — #1095 widened the recipe's pathspecs to `.github .config` and moved the stamp-only check to `git diff --cached` in the same commit that taught the generator to write `.github/actionlint.yaml`. What #1095 did not add is anything that keeps the pair in sync, so this adds the missing contract test. The adopter still saw the bug because the two halves ship on different clocks: the nightly skill comes from the action ref pinned in the adopter's workflow files (the *previous* release), while `uv tool run tend@latest init` is always the newest generator. A release that adds an output path is therefore run by the prior release's recipe for exactly one night. That skew is structural and this PR does not change it; what it does prevent is the recipe and the generator disagreeing *within* a release, which is what turns a one-night gap into a permanent one. `test_nightly_regen_stages_every_path_init_writes` runs `tend init` into a temp repo and asserts every file it writes is covered by the `git add -A` pathspecs parsed out of the nightly skill, that both `git add -A` lines in Step 7 name the same set, and that the stamp-only skip reads `git diff --cached` rather than the worktree. <details><summary>Verification that the guard catches the reported bug</summary> Run against the recipe as it stood at `0.1.22`, the version the reporter's adopter was on: ``` 0.1.22 pathspecs: ['.github/workflows .config'] has --cached: False uncovered under 0.1.22 recipe: ['.github/actionlint.yaml'] ``` Both assertions fail there and pass on `main`. Local run: `uv run pytest generator/tests/test_cross_file_contracts.py` — 14 passed; `pre-commit run --files generator/tests/test_cross_file_contracts.py` clean. </details> --- Closes #1116 — automated triage --------- Co-authored-by: tend-agent <[email protected]>
Problem
GitHub accepts
concurrency.queue: max, but actionlint 1.7.12 rejects thatgenerated syntax. A repository-wide command-line ignore only helped Tend's own
pre-commit invocation, not adopters using actionlint directly or through other
linters.
Solution
When
tend initemits the review workflow, it merges a narrowly scoped ignoreinto the adopter-owned
.github/actionlint.yaml(or existing.yml). It:**/.github/workflows/tend-*.yamlfor root-relative,./, absolute,and subdirectory invocation forms
queuesyntax ispresent
writes
Closes #1094.
Verification
wt test(821 Python tests, 32 worker tests, TypeScript typecheck)pre-commit run --all-filespre-commit run --all-files./, absolute, andsubdirectory paths