Repository navigation
Add May 2026 TODO to deprecate legacy WORKTRUNK_DIRECTIVE_FILE - #2142
Merged
Merged
Conversation
The nushell wrapper file is static — once installed via `wt config shell install nu`, its contents never change until the user reruns the command. Unlike bash/zsh/fish/PowerShell, whose wrappers re-source at each shell startup, nushell users can upgrade `wt` across many releases and keep running an old wrapper with zero signal. Embed an integer `NU_WRAPPER_VERSION` in the binary and export it from the wrapper as `WORKTRUNK_NU_WRAPPER_VERSION`. On startup, compare: if the wrapper version is missing or older than the binary expects, emit a one-shot warning pointing at `wt config shell install nu`. The check is structural — bumping the constant on any material wrapper change triggers the warning for outdated installs, without coupling to any specific env-var transition. Silent when `WORKTRUNK_SHELL` is unset or anything other than `nu`. Co-Authored-By: Claude <[email protected]>
# Conflicts: # docs/content/config.md # skills/worktrunk/reference/config.md # src/cli/mod.rs # src/output/mod.rs # tests/snapshots/integration__integration_tests__help__help_config_long.snap
The runtime check (WORKTRUNK_NU_WRAPPER_VERSION, nu_wrapper_status, warn_outdated_nushell_wrapper_once) only catches drift for wrappers that already export WORKTRUNK_SHELL=nu — i.e. anyone who has installed a version-1+ wrapper. Pre-versioning wrappers (everyone before this branch lands) don't set WORKTRUNK_SHELL at all, so they're invisible to the check. That's exactly the cohort that most needs nudging after the split-directive-file migration. Strip it in favor of the TODO(2026-05) in compute_directive_mode, which catches pre-versioning nushell wrappers via the legacy env-var path. For ongoing drift detection after May, `wt config show` already does content comparison on wrapper-based shells (fish and nushell) and prints "Outdated shell extension" — user-initiated, but sufficient. Keeps the merge of #2118 / #2130. Co-Authored-By: Claude <[email protected]>
2 tasks
max-sixty
added a commit
to max-sixty/tend
that referenced
this pull request
Apr 13, 2026
#263) ## Summary Two `tend-review` runs on `max-sixty/worktrunk` this hour completed with conclusion `success` but posted zero reviews on trivial `max-sixty`-authored PRs. Session logs show identical hallucinated reasoning: the bot concluded "PR is self-authored by the owner (max-sixty), I'll not submit a review (GitHub rejects self-approval)." The bot's login is `worktrunk-bot` — a distinct account from `max-sixty` — and other runs in the same hour correctly approved `max-sixty`-authored PRs (#2140, #2141, #2143, #2146, #2147, #2148). The conflation of "repo owner" with "self" is the bug. ## Evidence | Run | PR | Author | Bot output | |---|---|---|---| | [24320901871](https://github.com/max-sixty/worktrunk/actions/runs/24320901871) | [#2149](max-sixty/worktrunk#2149) (docs-only, 8 lines) | `max-sixty` | no review, ran ~10 min then exited | | [24320033081](https://github.com/max-sixty/worktrunk/actions/runs/24320033081) | [#2142](max-sixty/worktrunk#2142) (7-line TODO comment) | `max-sixty` | no review, ran ~10 min then exited | Both sessions substantively reviewed the code, found no concerns, and then rationalized skipping with the incorrect "self-approval" reasoning. Excerpt from run 24320901871: > Since the PR is self-authored by the owner, I'll not submit a review (GitHub rejects self-approval) and instead skip to CI monitoring per the workflow. Both PRs merged without any automated review. No user-visible harm (max-sixty merged them), but the bot spent ~20 minutes of compute producing nothing. ## Gate assessment - **Evidence level**: High — 2 occurrences this hour with identical reasoning chain across two different PRs. No matching precedent in the `review-reviewers-tracking: 2026-04` tracking issue (prior "self-authored" entries there describe genuinely bot-authored PRs being handled correctly). - **Failure class**: Stochastic, but with a consistent trigger — trivial PRs where the bot finds nothing substantive to comment on seem to push the model toward fabricating an escape hatch. - **Proposed change type**: Targeted clarification (7 new lines, no restructuring). - **Gate 1**: High evidence, 2 occurrences ≥ 2–3 minimum → passes. - **Gate 2**: Targeted fix to an existing paragraph → normal bar, passes. ## Fix The existing guidance at `plugins/tend-ci-runner/skills/review/SKILL.md:177` already defines self-authored as `PR_AUTHOR == BOT_LOGIN`, but the model still pattern-matched "self" onto "repo owner." Add an explicit negative: human authors (including the owner and maintainers) are **not** self-authored; approve normally. ## Test plan - [ ] Verify skill still renders correctly (pre-commit passes). - [ ] Monitor `tend-review` runs on `max-sixty/worktrunk` over the next few days — trivial human-authored PRs should either get an APPROVE or a `+1` reaction, not a silent 10-minute no-op. --------- Co-authored-by: continuous-bot <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Maximilian Roos <[email protected]>
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.
The previous release (#2118) split the directive file into CD/EXEC files and kept the old single-file
WORKTRUNK_DIRECTIVE_FILEalive as a silent fallback — specifically because bash/zsh/fish/PowerShell self-heal on shell restart but nushell's wrapper is static and only updates when the user rerunswt config shell install nu.After one release, self-healing shells will have cycled. Anything still hitting the legacy branch is almost certainly an outdated nushell wrapper. This adds a TODO in
compute_directive_modeflagging May 2026 as the time to convert the silent fallback into a visible deprecation warning pointing users at the reinstall command, ahead of removing the legacy path entirely.The TODO is the only change; no behavior difference this release.