-
Notifications
You must be signed in to change notification settings - Fork 1
memory(version-currency): inheriting existing pins counts as fresh assertion (rebased from #656) #681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory(version-currency): inheriting existing pins counts as fresh assertion (rebased from #656) #681
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||
| name: Version-currency rule covers inheriting existing repo pins, not just new version numbers (Aaron 2026-04-27) | ||||||||||||||||||||||||
| description: Aaron 2026-04-27 — Otto-247 version-currency rule (CLAUDE.md wake-time discipline #4) applies whenever a version pin LANDS in a new file, not just when proposing a fresh version number. Inheriting the existing repo pin (e.g. `actions/checkout@de0fac2... # v6.0.2`) without WebSearch-verifying it's still latest counts as the failure mode. The rule reads "search before asserting"; pasting a pin into a new workflow IS asserting it's current. | ||||||||||||||||||||||||
| type: feedback | ||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Version-currency rule covers existing-pin inheritance, not just fresh assertions | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ## Rule (refined from Otto-247) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| When adding any version pin to a new file — including a SHA pin | ||||||||||||||||||||||||
| copied from another workflow in the same repo — WebSearch the | ||||||||||||||||||||||||
| upstream's authoritative latest-release endpoint before | ||||||||||||||||||||||||
| committing. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| The act of *landing* a pin in a new place IS asserting it is | ||||||||||||||||||||||||
| current. "I just used what was already in `gate.yml`" does not | ||||||||||||||||||||||||
| clear the bar; the inheriting commit re-asserts the version is | ||||||||||||||||||||||||
| correct at land-time. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ## Why | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| **Aaron's correction 2026-04-27** (autonomous-loop tick fixing | ||||||||||||||||||||||||
| PR #25 budget-cadence workflow): | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| > "checkout v4 is that the lastest make sure you search for | ||||||||||||||||||||||||
| > latest whenever adding new versions we have some rules | ||||||||||||||||||||||||
| > aorund that, make sure you search cause your traing data | ||||||||||||||||||||||||
| > will be out of date" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| The Web-search Otto ran *after* the correction surfaced two | ||||||||||||||||||||||||
| distinct things: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 1. v6.0.2 (the existing repo pin) IS the actual latest stable | ||||||||||||||||||||||||
| release per `gh api repos/actions/checkout/releases/latest` | ||||||||||||||||||||||||
| (published 2026-01-09). The pin was correct. | ||||||||||||||||||||||||
| 2. A Web-search top result was a stale community discussion | ||||||||||||||||||||||||
| claiming "v6.0.2 not marked as latest" — which, if Otto | ||||||||||||||||||||||||
| had treated as authoritative without verifying against the | ||||||||||||||||||||||||
| API, would have led to using v6.0.1 (older). | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Both failure modes (a) skipping the search entirely and | ||||||||||||||||||||||||
| (b) trusting stale narrative results without API verification | ||||||||||||||||||||||||
| land in the same place: an asserted-current pin that isn't. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ## How to apply | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Workflow when adding a third-party action pin: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 1. **WebSearch upstream's release page / latest tag** — | ||||||||||||||||||||||||
| `<owner>/<repo>` releases. | ||||||||||||||||||||||||
| 2. **Verify against the API:** | ||||||||||||||||||||||||
| `gh api repos/<owner>/<repo>/releases/latest --jq '{tag_name, published_at}'` | ||||||||||||||||||||||||
| The API answer wins over Web-search narrative. | ||||||||||||||||||||||||
| 3. **Get the SHA:** | ||||||||||||||||||||||||
| `gh api repos/<owner>/<repo>/git/ref/tags/<vN.N.N> --jq '.object.sha'` | ||||||||||||||||||||||||
|
Comment on lines
+55
to
+56
|
||||||||||||||||||||||||
| 3. **Get the SHA:** | |
| `gh api repos/<owner>/<repo>/git/ref/tags/<vN.N.N> --jq '.object.sha'` | |
| 3. **Get the commit SHA (not the tag-object SHA):** | |
| ``TAG_JSON=$(gh api repos/<owner>/<repo>/git/ref/tags/<vN.N.N>) && | |
| TAG_TYPE=$(printf '%s' "$TAG_JSON" | jq -r '.object.type') && | |
| TAG_SHA=$(printf '%s' "$TAG_JSON" | jq -r '.object.sha') && | |
| if [ "$TAG_TYPE" = "tag" ]; then | |
| gh api repos/<owner>/<repo>/git/tags/"$TAG_SHA" --jq '.object.sha' | |
| else | |
| printf '%s\n' "$TAG_SHA" | |
| fi`` |
Copilot
AI
Apr 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note claims the two-space gap before the trailing # vN.N.N comment “matches the existing pins in gate.yml, codeql.yml, etc.”, but the repo is inconsistent (e.g., gate.yml uses a single space while codeql.yml uses two). Please either avoid asserting a repo-wide spacing convention here, or align the claim to the actual current state (and/or point at a single canonical example).
| (two-space gap before the trailing comment matches the | |
| existing pins in `gate.yml`, `codeql.yml`, etc.) | |
| (include the trailing `# vN.N.N` comment after the SHA.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term is used inconsistently as “Web-search” here, but elsewhere (e.g., CLAUDE.md) the tool name is consistently
WebSearch. To avoid confusion between the tool name and generic “web search”, please standardize these occurrences (either useWebSearchin code spans when referring to the tool, or plain “web search” when not).