Conversation
|
The bug is real, but it is a rename, not a dual name: I'd drop the More importantly, the probe is the wrong layer. "aiter": ("AITER_COMMIT", "AITER_VERSION", "AITER_REF"),That records a git tag (finer than a wheel version — exactly what Two smaller things. The venv branch is unreachable for |
12331d4 to
da43d43
Compare
|
All five points confirmed, and the PR is reworked to your design. Pushed as 1. It is a rename, not a dual name — confirmed at the source.
So the old table had the name wrong and a candidate list was the wrong shape for the fix. It is now one word: 2. The So I wrote a test asserting that version can never be recorded, and ran it against
3. is_allowed_dotenv_key('AITER_REF') = True # via the AITER_ prefix allowlistSo the value really does reach An aside from checking that allowlist: 4. The venv branch is unreachable for 5. The test passed because of the broad My stub raised The business-code diff is down to two lines plus comments. Four tests, each confirmed to fail on Also: #1495 is re-landed as #1542 per your recommendation, rebased onto current main. |
Two independent faults made stack_fingerprint["aiter"] untrustworthy. The env tuple read AITER_COMMIT and AITER_VERSION, neither of which anything in this repo writes, so the env path never produced a value. install_baremetal.sh already resolves the exact tag it installs, exports it, and persists it to .env as AITER_REF, which the dotenv loader admits under its AITER_ prefix -- the value was one key away the whole time. AITER_REF joins the tuple behind AITER_COMMIT. It also covers the default isolated vLLM path, where aiter lives in the framework venv and no in-process probe can reach it under any name. The probe then looked up a distribution named "aiter", but AITER renamed itself to "amd-aiter" at v0.1.8 (v0.1.7 still says "aiter"), so the lookup missed every host running v0.1.8 or newer. Worse, on PyPI "aiter" is an unrelated 2019 async-iterator library, so where that package was installed the probe recorded its version, 0.13.20191203, as the AITER version. The name is corrected rather than kept as a fallback, precisely so that value can no longer be produced: recording nothing is better than recording something that looks like an answer. Hosts older than v0.1.8 are covered by AITER_REF, which is exact. Only the written value changes; no read path compares rocm or aiter against the pod today. That gap is tracked in #1507, and this is a prerequisite for it -- a comparison fed 0.13.20191203 would report a confident mismatch against every real AITER build. The tests answer every component explicitly rather than letting a stub raise KeyError into a broad except, so they pass unchanged if that catch is later narrowed to PackageNotFoundError. Co-authored-by: Cursor <cursoragent@cursor.com>
da43d43 to
084fd33
Compare
Problem
stack_fingerprint["aiter"]was untrustworthy for two independent reasons. Thanks to @ZhengGong-amd, whose review replaced this PR's original approach — the earlier revision treated the distribution name as a dual name and kept a candidate list, which was the wrong shape for the fix.Nothing wrote the env keys it read. The tuple was
("AITER_COMMIT", "AITER_VERSION"), and no code in this repo sets either, so the env path never produced a value. Meanwhileinstall_baremetal.shalready resolves the exact tag it installs, exports it (line 636), and persists it to.envasAITER_REF(line 2039) — which the dotenv loader admits via itsAITER_prefix allowlist:The value was sitting one key away.
AITER_REFjoins the tuple behindAITER_COMMIT. A git tag is finer than a wheel version, which is whataiter_preflight's soft warning asks for, and it is the only route that works on the default isolated vLLM path, where aiter lives in the framework venv and no in-process probe can reach it under any name.The probe used a name AITER stopped using.
PACKAGE_NAMEinROCm/aiterisaiterat v0.1.6 and v0.1.7, andamd-aiterfrom v0.1.8 onward. So the lookup missed every host on v0.1.8 or newer. Worse, on PyPIaiteris an unrelated 2019 async-iterator library:Wherever that package is installed, the probe recorded
0.13.20191203as the AITER version — verified againstmain, not hypothetical. The name is corrected rather than kept as a fallback, precisely so that value can no longer be produced: recording nothing beats recording something that looks like an answer. Hosts older than v0.1.8 are covered byAITER_REF, which is exact.Change
Two lines of behaviour:
The rest is comments recording why the old name is not kept. The venv branch is back to
main's form: it is unreachable foraiter, since_framework_site_packagesrequiresRESOLVED_FRAMEWORK == componentandpreflight.py:929only ever sets that to the serving framework.Only what gets written changes. No read path compares
rocmoraiteragainst the pod, so warm-start selection and replay are unaffected.Why this is separate from the comparison gap
The read-side gap is tracked in #1507. This is a prerequisite: a comparison fed
0.13.20191203would report a confident mismatch against every real AITER build, and one fedunknownon a whole class of hosts would be silently inert. That failure mode is not hypothetical — it was defect #3 in the review of #1495.An aside found while checking the allowlist:
is_allowed_dotenv_key('ROCM_VERSION')isFalse, so the ROCm half of the fingerprint has no.envroute at all. Out of scope here; noted on #1507.Validation
Four tests, each confirmed to fail on
main:mainAITER_REFreaches the fingerprintunknownunknownaiteris never recorded as AMD's0.13.20191203AITER_COMMIToutranks the installer refThe stubs answer every component explicitly rather than raising
KeyErrorinto a broadexcept, so all four pass unchanged if that catch is later narrowed toPackageNotFoundError— verified both ways.test_common_provenance.pyandtest_aiter_preflight.pytogether 61 passed.ruff checkandruff format --checkclean.