Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions plugins/tend-ci-runner/skills/ground-claims/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,25 @@ event, so any workflow it triggered ran and is still in the run list.

## Recurring hallucination shapes

**A claim about what a past run executed is read at that run's own commit.**
The checkout is the current default branch; a run from earlier is not. Before
explaining a failure in terms of a branch, guard, or helper, read the file at
the run's head, and pin the body's links to that SHA rather than to `HEAD`. A
fix that landed between the run and the session inverts the reading: the code
being cited as the cause may be the code added *because* of the failure.

```bash
SHA=$(gh api "repos/{owner}/{repo}/actions/runs/<id>" --jq .head_sha)
gh api "repos/{owner}/{repo}/contents/<path>?ref=$SHA" \
-H 'Accept: application/vnd.github.raw'
```

Fetch it rather than reaching for `git show <sha>:<path>`: the checkout holds
only what a ref reaches, so the head of a squash-merged or deleted branch is
absent from it, and `git show` then fails into the same wrong answer — the
`fatal:` goes to stderr while a `| grep -c` downstream prints `0` and exits
`0`, which reads as "the guard was absent at that run".

**Links must be fetched, not guessed.** Before pasting any URL, run `curl -sI
<url> | head -1` and confirm `200`. Docs-site slugs are treacherous —
`escaping.html`, `quoting.html`, and `quote-strings.html` are all plausible;
Expand Down
2 changes: 1 addition & 1 deletion plugins/tend-ci-runner/skills/post-to-github/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gh issue comment "$ISSUE" --body-file "$TMPDIR/comment-body.md"

**Line wrapping:** GitHub renders newlines literally in issue bodies, PR descriptions, and comments — a line break in the source becomes a `<br>` in the output, so a paragraph hard-wrapped at ~72 chars ships with mid-sentence breaks. Write each paragraph as a single long line and let the browser reflow. Code blocks, bullet lists, and tables keep their newlines as-is.

**Links.** Always use markdown links for files, issues, PRs, and docs. **Any link containing `#L` must use a commit SHA, never `blob/main/...#L42`** — line numbers shift silently, so the link stays valid but starts pointing at different code than the comment describes. Get the SHA with `git rev-parse HEAD` before composing the link.
**Links.** Always use markdown links for files, issues, PRs, and docs. **Any link containing `#L` must use a commit SHA, never `blob/main/...#L42`** — line numbers shift silently, so the link stays valid but starts pointing at different code than the comment describes. Get the SHA with `git rev-parse HEAD` before composing the link — except where the body explains a past run, whose links pin to that run's head instead, per **Recurring hallucination shapes** in `/tend-ci-runner:ground-claims`.

- **File-level link (no `#L` anchor)**: `blob/main/src/foo.rs` is fine
- **Line reference**: `blob/<sha>/src/foo.rs#L42` — commit SHA required, never `blob/main/...#L42`
Expand Down
Loading