Repository navigation
compass(spec): a re-merged saved transfer names the merge that dropped its pin #338
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
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 |
|---|---|---|
|
|
@@ -105,7 +105,10 @@ | |
| by name. A transfer that declares no stack at all is refused too: the evidence | ||
| that these constants move with the compute stack is the whole reason a transfer | ||
| is allowed to be cheap, and a transfer that does not say what it was measured | ||
| against cannot be checked by anyone, ever. | ||
| against cannot be checked by anyone, ever. A document saved from a merge of | ||
| transfers from one spec reads back as such a transfer, since a merge keeps a | ||
| transfer's pin out of what it writes, so its refusal names that merge rather | ||
| than its author. | ||
|
|
||
| A stack mismatch on the running machine is the one finding that is not fatal by | ||
| default. The numbers are still measurements, taken on a stack that has since | ||
|
|
@@ -358,6 +361,18 @@ def _transfers(resolved: Mapping[str, Any], merged: Merge): | |
| for component in PINNED | ||
| if f"{PINNED_BLOCK}.{component}" in fragment.values | ||
| } | ||
| if not declared and "provenance.fragments" in fragment.values: | ||
| yield SpecRefusal( | ||
| Rule.PINNED_STACK, | ||
| f"{fragment.stanza()} carried constants over from " | ||
| f"{fragment.transferred_from!r}, and its provenance names the " | ||
| "fragments an earlier merge built it from; a merge keeps a " | ||
| "transfer's source stack pin out of the document it writes, so " | ||
| "this one cannot say which stack they were measured against", | ||
| "merge the fragments it was built from in its place, since a " | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking suggestion (principle 6, "A declined answer with a named reason is a result"). The remedy says to merge "the fragments it was built from" but does not name them. This matters most for a document saved twice. Probe P9 (merge a pinned transfer, save it as I checked the remedy's other sentences against the code, and they are true:
|
||
| "transfer states its source's stack pin there and nowhere else", | ||
| ) | ||
| continue | ||
| if not declared: | ||
| yield SpecRefusal( | ||
| Rule.PINNED_STACK, | ||
|
|
||
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.
Non-blocking (principle 8, "Every claim carries its measurement").
"provenance.fragments" in fragment.valuesis also true for a fragment that statesprovenance.fragments: []. The schema accepts that value, and such a fragment gets the new wording, "its provenance names the fragments an earlier merge built it from", even though its provenance names none.Measured on node 18 (
xiaobizh_n18_cpu, merged stamp treeaf99b9eb6), probe P7: a first-handtransferred-from:mi300x-8gpufragment with no pin andfragments=[], merged with tier0, tier1 and links, is refusedPINNED_STACKwith the new text. At the tip it gets the first-hand text.mergenever writes an empty list, because_provenanceadds every fragment's ownsource. So an empty list is always hand-written, and the author omitted the pin.if not declared and fragment.values.get("provenance.fragments"):is the same length and sends that case back to the first-hand wording. The verdict does not change either way.The non-empty hand-written case (probe P5) also gets the new text. I accept that as honest: the document claims its own merge history, no field can tell it apart from a real merge output, and the PR body says so.