Skip to content

config_pin_check --online cannot answer for a pin with no ref: since #3186 the Loom pin reads 'behind main' forever #3187

Closed

Description

@bong-water-water-bong

config_pin_check --online cannot answer for a pin that names no ref, and since #3186 the Loom pin is exactly that: it reports behind main on every run, at rc 0.

#3186 (d540caffa) removed ref=/branch= from config/loom.config deliberately — v0.2.0 is 0cd370f2baaa in ROCm/hrx-system but 12f2db54fe30 in our fork, so the tag was worse than nothing. That reasoning is sound. The side effect is that tools/ci/config_pin_check.py --online has no ref to ask, so it falls back to the repo's default branch, which is the one question this pin must not be asked (main and the release diverge by design).

Measured on main = d540caffa:

$ python3 tools/ci/config_pin_check.py --check --online
config_pin: loom.config: sha is 0cd370f2baaa, ROCm/hrx-system main is 52d3a5788c5b
config_pin_check: 5 sha pin(s) are 40 lowercase hex characters; 4 asked online, 1 at the tip, 3 behind it

Two things are wrong with that line and only the second is obvious:

  • the pin is not behind — in the repo the file names, two advertised refs carry the pinned sha
    (git ls-remote --heads --tags ROCm/hrx-system | grep 0cd370f2baaa → refs/heads/release/v0.2, refs/tags/v0.2.0);
  • it exits 0, so nothing fails and the row keeps printing a permanently wrong measurement. A pin that can only ever read
    "behind" is the defect #3160 recorded, and #3186 has re-created it by removing the ref.

#3186's new guard in loom_pin_check.py does not cover it: that guard only fires if a ref= is added back, and there is none.

Fix (PR opens against this issue, one file): when a pin names no ref, ask every branch and tag in a single
git ls-remote --heads --tags and report which refs carry the sha, counting "no advertised ref carries it" apart from "behind".
For a ref-less loom.config that reads:

config_pin: loom.config: sha is 0cd370f2baaa, at the tip of ROCm/hrx-system refs/heads/release/v0.2 and 1 other ref(s)
config_pin_check: 5 sha pin(s) ...; 4 asked online, 2 at the tip, 0 behind it, 2 on no advertised branch or tag

The two npu-kernels pins are the honest "no ref carries it" case — they lag, and today they are also counted as "behind", with nothing
saying which ref they lag.

Activity

  1. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Reproduced on main d540caffa, byte for byte (rc 0):

    config_pin: loom.config: sha is 0cd370f2baaa, ROCm/hrx-system main is 52d3a5788c5b
    config_pin_check: 5 sha pin(s) are 40 lowercase hex characters; 4 asked online, 1 at the tip, 3 behind it
    

    The question comes from tools/ci/config_pin_check.py:77-78 (gh api repos/{repo} --jq .default_branch) followed by :85-86 (ls-remote refs/heads/{branch}), and config/loom.config:51-52 now carries repo= and sha= only, so the default-branch fallback at :73-76 fires on every run.

    Measured the other half independently:

    • git ls-remote --heads --tags https://github.com/ROCm/hrx-system.git -> 0cd370f2baaa... is refs/heads/release/v0.2 and refs/tags/v0.2.0 (2 of 41 refs); main is 52d3a5788c5b.... "behind" is a comparison against a branch the pin deliberately is not on, not a lag.
    • 1bit-MONSTER/npu-kernels: neither 3949f18e826e... (config/npu-kernels.config:25) nor 8fe45b01da67... (config/npu-runtime.config:29) is any of that repo's 147 advertised refs, and npu-dx is 450b3bf0182c.... So "on no advertised branch or tag" is the true answer for both, and "behind" is not.

    One correction to the framing. The rc 0 is deliberate and should stay: config_pin_check.py:96-97 says so in the code — "Not a failure: a pin may deliberately lag the tip (that is what a pin is for). Reported so a bump PR can show the gap it closes". The defect is the wrong question plus a summary line that spells "no lag was measured" as behind it; making a lag or an unattached sha nonzero would take the gap report away from the bump PRs. What the fix does need is the third count this issue asks for, printed apart from behind.

    Live PR: #3190 (pkg-pinref, head 9f5d727) implements exactly that, and I ran it instead of reading it: --self-test ok, --online --self-test ok, and against the real config/:

    config_pin: loom.config: sha is 0cd370f2baaa, at the tip of ROCm/hrx-system refs/heads/release/v0.2 and 1 other ref(s)
    config_pin: npu-kernels.config: sha is 3949f18e826e, on no advertised branch or tag of 1bit-MONSTER/npu-kernels (147 ref(s) asked; npu-dx is 450b3bf0182c)
    config_pin: npu-runtime.config: sha is 8fe45b01da67, on no advertised branch or tag of 1bit-MONSTER/npu-kernels (147 ref(s) asked; npu-dx is 450b3bf0182c)
    config_pin_check: 5 sha pin(s) are 40 lowercase hex characters; 4 asked online, 2 at the tip, 0 behind it, 2 on no advertised branch or tag
    

    Those numbers match the two ls-remote runs above, and the peeled ^{} and branch-before-tag shapes have their own self-test rows. Labelled bug; #3190 is the whole fix, so this lane has nothing further queued on it.

  2. added
    bug
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions