Skip to content

install-tend: add --with-install-test for one-shot pre-merge verification - #540

Merged
max-sixty merged 4 commits into
mainfrom
setup
May 16, 2026
Merged

max-sixty merged 4 commits into
mainfrom
setup

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

  • tend init --with-install-test generates a one-shot tend-install-test.yaml that fires on the install PR (via on: pull_request: with paths filter on .config/tend.yaml and .github/workflows/tend-*.yaml) and verifies secrets are set + committed workflows match the generator's output.
  • init now removes any tend-*.yaml not in the current run's generated set, so the install-test file disappears on the first nightly regen (which runs without the flag). Also cleans up after enabled: false workflows and renamed generators.
  • Install skill passes the flag at step 2 and adds a "wait for tend-install-test to pass before merging" check to the checklist.

The workflow pins the regen to the version in the committed header (so a tend release mid-PR doesn't fail the drift check), installs uv (not on ubuntu-24.04 by default), and runs git remote set-head origin --auto so master-default repos match.

The tightened $REPO canonicality note acknowledges what the skill actually does: every API call uses --repo "$REPO" explicitly, so a fork-clone install only needs the variable overridden — no remote surgery.

Test plan

  • uv run pytest — 240 passing (8 new integration tests + 2 regtest snapshots for Claude/Codex variants)
  • pre-commit run --all-files — clean
  • actionlint against the generated install-test YAML — clean
  • CI green on this branch
  • First adopter install after release shows green install-test workflow before merging

🤖 Generated with Claude Code

max-sixty and others added 3 commits May 16, 2026 13:37
…tion

`tend init --with-install-test` generates a one-shot tend-install-test.yaml
workflow that fires on the install PR (via on:pull_request, head-SHA
workflow file) to verify required secrets are set and that the committed
workflows match the generator's output. The install skill passes the
flag; the nightly regen runs without it and the new init cleanup step
removes any tend-*.yaml the current run didn't produce, so the file
disappears from the default branch on the first post-install regen.

The cleanup also handles previously-leaky cases (disabled workflows,
renamed workflows across generator versions). --dry-run previews
removals.

The install-test workflow pins the regen to the version in the committed
header so a tend release between local `init` and CI doesn't fail the
drift check spuriously, sets up uv (not on ubuntu-24.04 by default),
and runs `git remote set-head origin --auto` so master-default repos
match.

SKILL.md tightens the $REPO canonicality note (the original was too
intrusive about git remotes; --repo "$REPO" is the only boundary that
matters) and adds a verification step + checklist entry.

Co-Authored-By: Claude <[email protected]>
Merge brought in the BOT_TOKEN → TEND_BOT_TOKEN rename (#538). Refreshes
the install-test regtest snapshots and the secret-name assertions in
test_integration.py to match. The workflow generator itself was already
correct since it uses `cfg.bot_token_secret` rather than a literal.

Co-Authored-By: Claude <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one cleanup lifecycle issue.

Comment thread generator/src/tend/cli.py Resolved
The early-return path for an all-disabled config skipped the new stale-
file cleanup, so disabling every workflow left orphan tend-*.yaml files
behind. The cleanup contract should still apply — if anything, disabling
tend is exactly when an adopter expects the files to disappear.

Caught by tend-agent's review on #540. Adds a regression test for the
all-disabled case.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 104efd1 into main May 16, 2026
6 checks passed
@max-sixty
max-sixty deleted the setup branch May 16, 2026 20:52
@max-sixty max-sixty mentioned this pull request May 16, 2026
4 tasks
max-sixty added a commit that referenced this pull request May 16, 2026
## Summary

Release 0.0.23 — unblocks the review-reviewers Codex migration.

Since 0.0.22:
- #539 — codex-action exports `CLAUDE_PLUGIN_ROOT` so skills using
`${CLAUDE_PLUGIN_ROOT}/scripts/...` work unchanged under Codex (the
blocker on PR #537)
- #538 — `TEND_BOT_TOKEN` as the default bot-token secret name
- #540 — `install-tend --with-install-test` for pre-merge verification
- #536 — docs(claude-auth) framing for 2026-06-15
- #531 — nightly-survey-files prints bucket/count to stderr
- #520 — tend's own CI flipped to the Codex harness (live; consumer
regen moves it forward)

## Test plan

- [ ] CI green (test, test-worker, lint)
- [ ] After merge: tag `0.0.23`, PyPI publish, `uvx [email protected] --help`
works
- [ ] Regenerate main's workflows to `@0.0.23`
- [ ] Regenerate #537's codex workflows to `@0.0.23` and unblock the
review-reviewers migration

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request May 16, 2026
…tion (#540)

## Summary

- `tend init --with-install-test` generates a one-shot
`tend-install-test.yaml` that fires on the install PR (via `on:
pull_request:` with paths filter on `.config/tend.yaml` and
`.github/workflows/tend-*.yaml`) and verifies secrets are set +
committed workflows match the generator's output.
- `init` now removes any `tend-*.yaml` not in the current run's
generated set, so the install-test file disappears on the first nightly
regen (which runs without the flag). Also cleans up after `enabled:
false` workflows and renamed generators.
- Install skill passes the flag at step 2 and adds a "wait for
`tend-install-test` to pass before merging" check to the checklist.

The workflow pins the regen to the version in the committed header (so a
tend release mid-PR doesn't fail the drift check), installs `uv` (not on
`ubuntu-24.04` by default), and runs `git remote set-head origin --auto`
so `master`-default repos match.

The tightened `$REPO` canonicality note acknowledges what the skill
actually does: every API call uses `--repo "$REPO"` explicitly, so a
fork-clone install only needs the variable overridden — no remote
surgery.

## Test plan

- [x] `uv run pytest` — 240 passing (8 new integration tests + 2 regtest
snapshots for Claude/Codex variants)
- [x] `pre-commit run --all-files` — clean
- [x] `actionlint` against the generated install-test YAML — clean
- [ ] CI green on this branch
- [ ] First adopter install after release shows green install-test
workflow before merging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request May 16, 2026
## Summary

Release 0.0.23 — unblocks the review-reviewers Codex migration.

Since 0.0.22:
- #539 — codex-action exports `CLAUDE_PLUGIN_ROOT` so skills using
`${CLAUDE_PLUGIN_ROOT}/scripts/...` work unchanged under Codex (the
blocker on PR #537)
- #538 — `TEND_BOT_TOKEN` as the default bot-token secret name
- #540 — `install-tend --with-install-test` for pre-merge verification
- #536 — docs(claude-auth) framing for 2026-06-15
- #531 — nightly-survey-files prints bucket/count to stderr
- #520 — tend's own CI flipped to the Codex harness (live; consumer
regen moves it forward)

## Test plan

- [ ] CI green (test, test-worker, lint)
- [ ] After merge: tag `0.0.23`, PyPI publish, `uvx [email protected] --help`
works
- [ ] Regenerate main's workflows to `@0.0.23`
- [ ] Regenerate #537's codex workflows to `@0.0.23` and unblock the
review-reviewers migration

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants