skills(running-in-ci): catch un-pinned blob/main #L links in the pre-post grep - #658
Merged
Merged
Conversation
…post grep Fold the line-link SHA invariant into the existing pre-post `github.com/` scan so it's enforced at the same checkpoint as the wrong-owner check. PR #240 raised the rule from soft preference ("Prefer permalinks") to hard imperative ("Any link containing `#L` must use a commit SHA"). That cut the recurrence rate sharply, but ~1/month still slips through in conversational `tend-mention` sessions where the model composes URLs inline. The owner-typo check already has a pre-post grep; the line-link check had only prose. One grep at the same checkpoint covers both.
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
Extend the existing pre-post
github.com/scan inrunning-in-cito also catch un-pinnedblob/main/...#L<n>line links, not just wrong-owner typos. PR #240 already strengthened the prose rule from soft preference to hard imperative in April; the rate of recurrence dropped sharply afterwards, but the failure has continued at ~1/month in conversationaltend-mentionsessions where the model composes URLs inline as it writes prose. The current rule lives in the "Comment Formatting" section but has no enforcement step. The owner-verification check next door already prescribes a pre-postgrepforgithub.com/— folding the#L-SHA check into that same pass converts the rule from advice into a mechanical pre-flight that the bot is already supposed to run.Evidence
Recurrences on
max-sixty/worktrunksince PR #240 merged 2026-04-11:blob/main/src/cli/mod.rs#L577blob/main/src/commands/worktree/switch.rs#L1045blob/main/src/config/user/sections.rs#L240,blob/main/src/cli/mod.rs#L407blob/main/src/main.rs#L1300(also shipped with literal${GITHUB_REPOSITORY})blob/main/src/config/expansion.rs#L368Cumulative: 5 occurrences across 4 sessions and 5 issues in the 8 weeks since PR #240. All five sessions were
tend-mention(discussion-style replies), nottend-triage— the failure mode is concentrated where the model writes prose inline and composes URLs as it goes, rather than where it explicitly stages reference material.The current-run hit on issue #2838 — a thoughtful 5-paragraph design-discussion reply to
max-sixty— links to line 577 ofsrc/cli/mod.rswhere the "lifecycle steps 4-5" docstring currently lives. The line is correct as of7d16e63fbut will silently rot the next time the file is edited. No human pushback (maintainer hasn't responded yet); the failure is invisible until the rot happens, which is exactly why this needs a pre-post check rather than only a written rule.Full evidence log:
review-reviewersgist for max-sixty/worktrunk 2026-06.Gate assessment
#L-SHA check into the existing pre-postgithub.com/grep. No new section, no new heading, no structural reshape.PR #240 raised the rule from soft to hard. This PR raises it from hard to enforced, in the same paragraph where the parallel owner-typo check is already enforced.
The change
One paragraph edit in
plugins/tend-ci-runner/skills/running-in-ci/SKILL.md. The "GitHub URLs — read$GITHUB_REPOSITORY..." paragraph already prescribed a pre-post scan for owner verification; the edit extends that scan to also cover the#L-SHA invariant and points at$(git rev-parse HEAD)as the substitution target. Net diff: one sentence, two clauses joined into one pre-post pass.Test plan
tend-mentionruns that reference specific lines either pre-stagegit rev-parse HEADor run the body grep before posting; the un-pinnedblob/main/...#L<n>link shape stops appearing in bot comments.review-reviewersevidence count ofblob/main/...#L<n>recurrences declines toward zero over the next 4-8 weeks; if a hit appears anyway, this becomes evidence to escalate beyond a pre-post grep (e.g., a hook-enforced check in the action).