Repository navigation
fix(generator): preserve pre-check setup guards - #1106
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
One finding, on the new ${{ }} normalization in Config.load: the unwrap tests only the first three and last two characters, so a condition that starts with an interpolation and ends with one — but isn't a single wrapper — gets sliced through the middle.
Reproduced on this branch. With setup: - run: ./x.sh and if: "${{ runner.os == 'Linux' }} && ${{ github.event_name == 'push' }}", tend-notifications.yaml renders:
if: (steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch') && (runner.os == 'Linux' }} && ${{ github.event_name == 'push')init exits 0 and says nothing; GitHub rejects the expression when the workflow runs. The unwrapped mixed form has the same shape from the other side — if: "a || ${{ b }}" skips the strip entirely and carries a live ${{ into the parenthesized conjunct. Both were passed through untouched before this PR, so the mangling is new here.
Since these forms can't be composed with the guard, rejecting them at load is the cut-over CLAUDE.md asks for ("old formats should fail with a clear error, not silently parse"), and it matches what checks.py already does with "${{" in environment for a dynamically-named environment. Inline suggestion below; with it applied uv run pytest generator/tests is 585 passed and the mixed form fails init with a message naming the fix.
tend-agent
left a comment
There was a problem hiding this comment.
The mixed-interpolation case from the last review is fixed, and I re-verified it on this head: if: "${{ a }} && ${{ b }}" and if: "a || ${{ b }}" both fail init now, if: "${{ runner.os == 'Linux' }}" normalizes to the bare expression, and tend-notifications renders if: (steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch') && (runner.os == 'Linux') with the check step still ahead of every guarded step. uv run pytest generator/tests is 588 passed.
Two suggestions inline, plus two notes:
- The
"${{ }}"empty-wrapper branch (ifmust contain an expression) is the only one of the three new rejection paths with no test; the other two are parametrized. _setup_yaml's replacement here is byte-for-byte the change #1088 also carries, so whichever lands second conflicts inworkflows.pyandtest_generate.py. Worth dropping it from #1088 once this merges.
Automated nightly regeneration of tend's workflow files. **tend version:** 0.1.22 → 0.1.24 ## Notable changes - **Conflicted bot PRs are now repaired on the frequent poll** (max-sixty/tend#1108). `tend-notifications` gains a `conflict_count` boot gate: it runs a GraphQL scan for open bot PRs whose `mergeable` is not `MERGEABLE`, skips ones already carrying a `tend-conflict-deferred` marker for the current head, and boots the agent when either notifications or conflicts are outstanding. This is the bulk of the workflow-body diff. - **A multi-line adopter prompt now survives generation** (max-sixty/tend#1103). Block scalars gain explicit indentation indicators — `prompt: |` becomes `prompt: |2`, likewise `sandbox_setup:` — so a prompt or setup script whose first line is itself indented no longer changes meaning. This repo's `sandbox_setup:` (the Playwright headless-shell install) is regenerated under the new form. - **Review gating tightened** (max-sixty/tend#1087, max-sixty/tend#1107, max-sixty/tend#1080). `APPROVE` is gated on the author stating merge readiness rather than on the draft flag alone; the posting preflight is bound to the outward action; and the code-review pass becomes its own step, gated at submit. - **`uv` is provisioned for agent sessions** (max-sixty/tend#1109), and pre-check setup guards are preserved through regeneration (max-sixty/tend#1106). - Experimental Gist-backed Claude memory (max-sixty/tend#1110) — off unless configured. Full upstream range: max-sixty/tend@0.1.22...0.1.24 ## Also in this PR `tend init` now writes `.github/actionlint.yaml` — a `concurrency.queue` ignore scoped by glob to `**/.github/workflows/tend-*.yaml`. This repo carried the same accommodation as a blanket `-ignore` arg on the actionlint pre-commit hook, which suppressed that schema error everywhere, including in workflows this repo owns. The generated file replaces it, so the false positive stays ignored on the generated workflows and a real one in `ci.yaml` or `publish-site.yaml` now fails. Verified by running `pre-commit run actionlint --all-files` in the regeneration worktree with the blanket arg removed and the generated config in place: passed. --------- Co-authored-by: leaf-agent <[email protected]>
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]>
Summary
if:expression with that guard instead of replacing it${{ ... }}syntax, reject ambiguous non-stringvalues, and fail clearly on mixed interpolation fragments
This extracts the useful setup-condition correction from #1088 without adding a second review gate.
Verification
uv run pytest generator/tests(589 passed)wt testafter merging currentmain(834 Python tests, 32 worker tests,TypeScript typecheck)
pre-commit run --all-files