Repository navigation
fix(config): reject post-create hook instead of silently migrating - #2361
Merged
Merged
Conversation
`post-create` was renamed to `pre-start` in v0.32.0 with a silent structural rewrite in the deprecation pipeline. That rewrite is now removed: configs containing `post-create` fail with a fatal error that names the replacement key. Paving the way to later reclaim `post-create` as a background-semantics counterpart to `post-start` without the silent flip risk (see #1571) — user configs that still carry `post-create` would otherwise switch from blocking to background semantics across releases without any warning. - `check_and_migrate` returns Err when `post-create` is detected. - Project config: propagates as fatal `ConfigError`. - User config: propagates as `LoadError::Validation` (non-fatal, best-effort load continues without this file). - `wt config show`: renders the error inline alongside the file contents. - Integration tests confirm both the project-fatal and user-skip paths. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Adds an integration test that exercises the two new Err branches in render_user_config and render_project_config, closing the codecov/patch gap on PR #2361.
max-sixty
reviewed
Apr 21, 2026
| } | ||
|
|
||
| /// The `post-create` hook key was renamed to `pre-start` in v0.32.0. The silent | ||
| /// migration was removed in the following release: project configs that still |
Collaborator
Author
There was a problem hiding this comment.
You're right — "in the following release" suggested the silent migration went away in v0.33.0, but it actually lived from v0.32.0 through v0.42.0 (17 releases) and is only being removed now. Rewrote the docstring to keep the rename context and drop the release-timing claim: 882c2872.
max-sixty
marked this pull request as ready for review
April 21, 2026 20:47
The docstring implied the silent migration was removed in the release following v0.32.0, but it lived through 17 releases (v0.32.0–v0.42.0) before this PR. Keep the rename context, drop the release-timing claim. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This was referenced Apr 22, 2026
2 of 3 tasks
max-sixty
added a commit
to max-sixty/tend
that referenced
this pull request
Apr 22, 2026
## Summary Upstreams the fix from worktrunk PR [max-sixty/worktrunk#2386](max-sixty/worktrunk#2386) into the bundled notifications skill. Step 4a of the dedup check currently finds *completed* bot activity (comments, reviews, timeline cross-references). It does not see a dedicated workflow that is still running. `tend-mention` sessions that involve real implementation routinely run past the 10-minute freshness gate — when the notifications bot proceeds, it re-implements in-progress work. Evidence (from worktrunk, finding in #2386): - Run [24742688091](https://github.com/max-sixty/worktrunk/actions/runs/24742688091) — ~79 min, ~$25, 279 turns. Re-implemented [PR #2361](max-sixty/worktrunk#2361) while tend-mention was still pushing; last-step dedup caught the collision and cleaned up, but the session cost had already been incurred. - Run [24519963858](https://github.com/max-sixty/worktrunk/actions/runs/24519963858) — ~16 min, ~$9, 168 turns. Same pattern on PR #2263 / issue #2261. ## Change Adds an **In-flight check** sub-step to step 4a of `plugins/tend-ci-runner/skills/notifications/SKILL.md`, sitting between the freshness gate and the dedup check. It queries `actions/runs?status=in_progress`, filters to `tend-*` runs, excludes `$GITHUB_RUN_ID`, and matches on `display_title` (the workflow_run payload does not expose the triggering issue number for `issue_comment` / `pull_request_review` events without an extra API call per run). On hit, skip without marking read — same disposition as the freshness gate. The two bash-tool caveats from the overlay are preserved inline: `gh api --jq` does not accept `--arg`/`--argjson`, and the Bash tool's bang rewriting can still bite outside heredocs, so the jq uses `(X) | not` rather than the not-equal operator. ## Why this lives in tend, not as a per-repo overlay The precedence rule codified in CLAUDE.md ("Skill precedence: repo > bundled") and in `running-in-ci/SKILL.md` ([#306](#306)) says overlays are for repo-specific policy/convention/taste. This fix is generic: any tend consumer whose `tend-mention` runs can exceed 10 minutes will hit the same race. That makes it a bundled-skill defect, not an overlay. ## Follow-up on worktrunk Once this lands, [worktrunk#2386](max-sixty/worktrunk#2386) is redundant — the bundled skill now covers what its overlay added. A human should close #2386 and revert the overlay section it added to `.claude/skills/running-tend/SKILL.md`. I have not touched worktrunk. ## Test plan - [x] `pre-commit run --all-files` passes - [x] jq query verified against worktrunk's `actions/runs?status=in_progress` (returns 0 when no concurrent tend run matches the subject title, which is the current state) - [ ] Next time a same-repo mention triggers a long `tend-mention` run, verify a concurrent notifications run sees `IN_PROGRESS > 0` and exits cleanly > _This was written by Claude Code on behalf of @max-sixty_ --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Apr 23, 2026
Every other 0.44.0 bullet ends with its implementing PR; leaving #2361 off made this one the odd one out and dropped the only pointer to the code change. Keep the Breaking parenthetical removed. Co-Authored-By: Claude <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Apr 27, 2026
…` alias (#2436) Both surfaces previously mapped silently to their canonical replacements, so users had no signal to migrate before eventual removal. Emit per-invocation warnings to stderr matching the existing pattern used by `wt select`, `--no-verify`, and `wt hook approvals`. The config-section `[hooks.post-create]` warning path is unchanged — that already errors at config load (#2361). This only adds a warning for the bare CLI alias `wt hook post-create`, which still maps to `pre-start` after warning. One UX consideration: `--claude-code` is read on every Claude Code statusline redraw, so users with the deprecated form in their statusline integration will see the warning each redraw until they migrate. That's the intent (surface the deprecation), but worth noting. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
post-create→pre-startsilent migration into a fatal load error. Paves the way to later reclaimpost-createas a background-semantics counterpart topost-startwithout the silent flip risk.ConfigError. User config: surfaces asLoadError::Validationand best-effort load continues without the file.wt config showrenders the error inline instead of hiding it.Marked as draft for consideration — this is step 1 of the two-PR sequence discussed in #1571 (comment). A follow-up PR (one release later) would perform the actual
pre-start→pre-create/post-start→post-createrename. Supersedes the closed #2359.Test plan
cargo test --lib --bins(601 passing)cargo test --test integration(1540 passing; 10case_4failures are localnu-not-installed environmental, unrelated to this PR)cargo clippy --all-targets --all-featurescleantest_post_create_in_project_config_is_fatalandtest_post_create_in_user_config_warns_and_skips