Repository navigation
fix(#102): pin_template --command names the source set_claim_template now takes - #110
Conversation
… now takes v0.5.0's set_claim_template takes the Source variant first (#94). The printed invoke line still had the v0.4.0 shape, so the CLI would refuse it on the day. It now prints --source AdSense or --source AdMob from --source, says to simulate with --send=no first, and reads the template back with claim_template_for.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Lexirieru
left a comment
There was a problem hiding this comment.
Approving, and thank you for catching this one against your own tool rather than against my runbook.
Verified locally on 10e9e41, not taken from CI:
| Check | Result |
|---|---|
pin_template.py --self-test --source adsense |
passed — round trip, structure, signature 0x4f3b53c4…8aba6, arity, wrong window refused, cross-source order refused |
pin_template.py --self-test --source admob |
passed, same six checks |
| Diff scope | tools/pin_template.py only, +9 −2. No contract, no backend, no front end. |
| CI | 3/3 green |
The fix is right and the reasoning behind it is the useful part: --command prints a line a human runs once, on the day it matters, so a line that the CLI would have refused is as bad as a wrong value. The variant field in SOURCES is also the right shape — the CLI spelling now comes from the same table as the separators, so the two cannot drift apart.
The --source AdMob spelling you could not test is confirmed. You wrote that you could not check the CLI parsing a unit enum before v0.5.0 was live. It is live now, and the CLI takes --source AdMob and --source AdSense exactly as printed — set_claim_template --source AdMob landed on production in 01cc1878…3d00a7, and claim_template_for --source AdMob reads it back. So the printed line is runnable as-is.
One small thing I noticed while running this, not worth changing here: --self-test runs both derivations regardless of --source, so --self-test --source adsense prints self-test (admob) first and the flag has no effect. That is harmless — it tests more, not less — but the flag reads as if it narrows the test. A line in the help, or dropping --source from the self-test path, would save the next person a double-take.
Refs #102, #94, #96.
Problem
v0.5.0 changed
set_claim_templatetoset_claim_template(source: Source, parts: Vec<Bytes>, provider_hash: Bytes)(#94).tools/pin_template.py --commandstill printed the v0.4.0 shape, with no--source, so step 6 of the upgrade runbook in #102 would be refused by the CLI on 2026-10-31.Change
tools/pin_template.pyonly:SOURCESnow carries its contractSourcevariant (AdSense,AdMob).--source <Variant>after-- set_claim_template.--send=nofirst. It also reads the template back withclaim_template_for --source <Variant>rather than the singletonclaim_template().The derivation, the checks and the parts are unchanged.
Verified
python3 -I tools/pin_template.py --self-testpasses. CI runs the same.--source admob --contract CCQFL2…I2HS --command. The printed line is byte-identical to the one I corrected by hand for The contract rebuilds the attestor's owner as the borrower, so no real proof can verify #102, apart from the new--source AdMobline. That covers the parts andprovider_hash.Not verified
The CLI's parsing of a unit enum as
--source AdMobcannot be exercised until v0.5.0 is live; v0.4.0 has no such argument. Simulating step 6 with--send=nois the check, as the runbook already says.