一键导入
therock-commit-in-build
Check whether a given rocm-systems commit is included in a specific TheRock nightly build
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check whether a given rocm-systems commit is included in a specific TheRock nightly build
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Given a TheRock nightly build (URL or run-id), return the rocm-systems pin_sha used in that build
Find the first TheRock nightly build that includes a given rocm-systems commit
Reviews Pull Requests or local diffs with an 8-agent fan-out covering static analysis, dead code, code smells + quality (naming, complexity, single-responsibility, magic numbers), language rules (C++/Python/CMake), architecture, simplification, performance (hot-path classification, allocations, locks, I/O), and undefined behaviour (signed overflow, lifetime, strict aliasing, data races, sanitizer coverage; C/C++/unsafe-Rust only). Use when the user asks to "review this PR", "review the diff", "audit this branch", "/pr-review", or when staging changes before push.
Walk through a PR review interactively, one finding at a time. Generate review via pr-review, then for each issue present analysis + proposed inline comment, let user accept/edit/skip, accumulate into a PENDING GitHub review, submit at end.
Use when user wants to list, analyze, review, or summarize GitHub PR comments on a pull request number or URL
Use when architectural decisions involve competing quality attributes (performance vs modifiability, availability vs consistency, security vs usability), when the user says "tradeoff analysis", "ATAM", "quality attributes", "what are we giving up", or when a design choice affects multiple non-functional requirements in tension.
| name | therock-commit-in-build |
| description | Check whether a given rocm-systems commit is included in a specific TheRock nightly build |
Answers the question "Is my rocm-systems commit XYZ included in TheRock build X?" by resolving the build to its rocm-systems pin_sha and asking GitHub whether the user's commit is an ancestor of that pin.
Use this skill when:
<sha> in TheRock build <X>?"pin_sha)Unless the user says otherwise, this skill targets the rocm-systems repository (ROCm/rocm-systems).
Run URLs for current nightlies are on ROCm/rockrel; legacy pre-June-2026 runs are on ROCm/TheRock. See therock-build-to-commit for manifest and packages URL patterns.
| Input | Required | Notes |
|---|---|---|
| Commit SHA | yes | Full 40-char SHA recommended; minimum 7 chars; must be a commit on ROCm/rocm-systems (or reachable from a tag/branch there) |
| Build URL or run-id | yes | Current: packages-multi-arch/deb/... URL, index path, or bare run-id. Legacy /deb/... URLs still parse. |
platform | no | Default linux (forwarded to manifest fetch) |
gh CLI installed and authenticated against github.com (see git-gh-client skill for setup).github.com for the compare API.ROCm/rocm-systems (not only in a private fork).Verify quickly:
gh auth status
gh api repos/ROCm/rocm-systems/commits/<COMMIT_SHA> --jq '.sha' >/dev/null && echo "commit visible"
Invoke therock-build-to-commit with the user's build URL/run-id (and any platform overrides). Capture the reported pin_sha.
Do not re-implement the manifest fetch here - delegate to keep behavior consistent.
# Pseudocode: capture pin_sha emitted by therock-build-to-commit
PIN_SHA=<from therock-build-to-commit>
If therock-build-to-commit fails to produce a pin_sha, surface its error verbatim and stop. Do not guess.
Ask GitHub whether COMMIT_SHA is an ancestor of PIN_SHA by comparing them:
COMMIT_SHA="$1"
STATUS=$(gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" --jq '.status')
Interpret .status:
| Status | Meaning | Verdict |
|---|---|---|
identical | COMMIT_SHA == PIN_SHA | Included (it IS the build's pin) |
ahead | PIN_SHA is ahead of COMMIT_SHA -> COMMIT_SHA is an ancestor of PIN_SHA | Included |
behind | PIN_SHA is behind COMMIT_SHA -> commit was made after the build's pin | Not included |
diverged | The two commits share history but neither is an ancestor of the other | Not included |
The gh api ... compare call also returns counts that are useful to surface:
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" \
--jq '{status, ahead_by, behind_by, total_commits}'
Report back in this exact shape:
Commit: <COMMIT_SHA>
Build: <RUN_ID> (pin_sha=<PIN_SHA>)
Status: <STATUS> (ahead_by=<N>, behind_by=<M>)
Verdict: <Included | Not included>
Reason: <one-line explanation derived from Status row above>
Compare URL: https://github.com/ROCm/rocm-systems/compare/<COMMIT_SHA>...<PIN_SHA>
Build snapshot: https://github.com/ROCm/rocm-systems/tree/<PIN_SHA>
COMMIT_SHA=abc1234abc1234abc1234abc1234abc1234abcd
RUN_ID=22561649510
PIN_SHA=$(./therock-build-to-commit "$RUN_ID") # via the helper skill
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" --jq '.status'
# -> "ahead"
# Verdict: Included
COMMIT_SHA=c7da590396ceef1afaaa1b971f3b3d7d6e3562a9
PIN_SHA=c7da590396ceef1afaaa1b971f3b3d7d6e3562a9
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" --jq '.status'
# -> "identical"
# Verdict: Included (this commit IS the build's pin)
COMMIT_SHA=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
RUN_ID=22561649510
PIN_SHA=$(./therock-build-to-commit "$RUN_ID")
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" --jq '.status'
# -> "behind"
# Verdict: Not included (the commit is newer than pin_sha; wait for the next nightly that pins past it)
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" --jq '.status'
# -> "diverged"
# Verdict: Not included (commit is on a side branch never merged before pin_sha)
This skill produces:
pin_sha for the build, the GitHub compare status, and ahead_by/behind_by countspin_shaNo files are written.
| Mistake | Fix |
|---|---|
| Equating "commit on a branch" with "commit in build" | Only commits reachable from pin_sha are in the build. A merged-but-pinned-later commit is not in earlier builds |
| Using a fork's SHA that upstream cannot resolve | The compare API runs against ROCm/rocm-systems; the SHA must be visible there. If the user has only a fork, ask them to push to upstream or share an upstream-resolvable SHA |
| Abbreviating the SHA below 7 chars | GitHub may refuse or resolve ambiguously; require at least 7 chars and prefer the full 40 |
| Skipping the helper and hand-coding S3 lookups | Always delegate to therock-build-to-commit so URL parsing and manifest handling stay in one place |
Treating exit code != 0 from gh api as "not included" | A non-zero exit can also mean the SHA is unknown to GitHub. Read stderr; do not silently report "Not included" on lookup failure |
gh: HTTP 404: Not Found from the compare endpointCause: at least one of COMMIT_SHA or PIN_SHA is not visible on ROCm/rocm-systems.
Steps:
gh api repos/ROCm/rocm-systems/commits/<SHA> --jq '.sha'
COMMIT_SHA is missing, ask the user where it lives (fork? unmerged branch?).PIN_SHA is missing, the manifest may be stale or referencing an unreachable commit - report this to the user; do not guess inclusion.STATUS is null or unexpectedGitHub occasionally returns extra states for very large diffs. Fall back to inspecting ahead_by and behind_by directly:
gh api "repos/ROCm/rocm-systems/compare/${COMMIT_SHA}...${PIN_SHA}" \
--jq '{status, ahead_by, behind_by}'
If behind_by == 0, the commit is an ancestor (included). If behind_by > 0 and ahead_by == 0, it's strictly newer than the pin (not included).
gh api returns auth errorsRun gh auth login (see the git-gh-client skill for the full flow). The compare endpoint is public for public repos but gh still requires auth to make requests.
| Relationship | Skill | Why |
|---|---|---|
| Calls | therock-build-to-commit | To resolve the build to a pin_sha |
| Calls | git-gh-client | For gh availability checks and auth |
| Called by (typical) | Ad-hoc user questions like "did fix XYZ ship in last night's build?" |
rocm-systems. If a local clone is available, git merge-base --is-ancestor <commit> <pin_sha> is an offline equivalent (exit code 0 -> included).