Repository navigation
compass(spec): hold the transfer stanzas through their method, and the reimport helper's whole docstring #365
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 |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |
|
|
||
| import copy | ||
| import importlib.util | ||
| import sys | ||
|
|
||
| import pytest | ||
|
|
||
|
|
@@ -565,7 +566,10 @@ def test_a_transfer_keeps_the_source_stack_out_of_this_machines_pin(): | |
| checked = validate(combination) | ||
| assert not checked.ok | ||
| assert checked.refusals[0].rule is Rule.PINNED_STACK | ||
| assert checked.refusals[0].what.startswith("'tier2' (machine ") | ||
| assert checked.refusals[0].what.startswith( | ||
| "'tier2' (machine 'mi355x-8gpu-2node', transferred-from:mi300x-8gpu, " | ||
| "by a person on 2026-09-18) carried " | ||
| ) | ||
| assert checked.refusals[0].what.endswith( | ||
| "carried constants over from 'mi300x-8gpu', measured against rocm " | ||
| "'7.0.2', into a spec pinned to rocm '7.2.4'" | ||
|
|
@@ -598,7 +602,10 @@ def test_a_saved_transfer_merged_again_names_the_merge_that_dropped_its_pin(): | |
| rest = fragments()[:2] + [fragment("links", LINKS)] | ||
| (refused,) = validate(merge([saved] + rest)).refusals | ||
| assert refused.rule is Rule.PINNED_STACK | ||
| assert refused.what.startswith("'t.yaml' (machine ") | ||
| assert refused.what.startswith( | ||
| "'t.yaml' (machine 'mi355x-8gpu-2node', transferred-from:mi300x-8gpu, " | ||
| "by a person on 2026-09-18) carried constants over from " | ||
| ) | ||
| assert "over from 'mi300x-8gpu', and its provenance names the" in refused.what | ||
| assert "fragments an earlier merge built it from" in refused.what | ||
|
Comment on lines
+605
to
610
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. N2 (non-blocking): the same gap here, between the needle's Principle 8, "Every claim carries its measurement", as in N1. This needle now ends Measured on node 18 (mutant
This test does not claim to cover the whole refusal, so no sentence is false here, and the named mutant CA2L is red. It is recorded so the next reader does not count this test as holding the middle. The cheapest close is one contiguous needle through to the end of the first clause. Both assert refused.what.startswith(
"'t.yaml' (machine 'mi355x-8gpu-2node', transferred-from:mi300x-8gpu, "
"by a person on 2026-09-18) carried constants over from 'mi300x-8gpu', "
"and its provenance names the fragments an earlier merge built it from"
)The text is the refusal's own, as printed at the head. Measured with N1's change on a copy of the head:
Or leave it as it is and file the gap. |
||
| bare = fragment("tier2", TIER2, method="transferred-from:mi300x-8gpu") | ||
|
|
@@ -2008,6 +2015,7 @@ def reimported_validate(name): | |
| ) | ||
| module = importlib.util.module_from_spec(loaded) | ||
| loaded.loader.exec_module(module) | ||
| assert loaded.name not in sys.modules | ||
|
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. R1-3 is held, and it holds for the right reason. One optional Principle 8, "Every claim carries its measurement." "Does not register it" is the docstring's claim, and this line is its measurement. What Measured on node 18:
What it does not see. A registration under any other key, for example the bare
|
||
| assert importlib.import_module("atom.compass.spec.validate") is not module | ||
| return module | ||
|
|
||
|
|
||
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.
N1 (non-blocking): the
startswithand theendswithdo not cover the whole refusal; the middle is free.Principle 8: "Every claim carries its measurement. A number without a source is a defect." The PR body and the commit message both say that, with this
endswith, the two checks "overlap and cover the whole refusal". They share the wordcarried, but nothing makes them share the same occurrence. Any text between the needle'scarriedand the tail'scarried constants over frompasses both.Measured on node 18 (reviewer's harness plus one mutant,
GAPm):validate.py:398becomesf"{fragment.stanza()} carried {merged.fragments[-1].stanza()} carried constants over from ". The line count is kept at 452. The refusal then reads'tier2' (machine …, transferred-from:mi300x-8gpu, by a person on 2026-09-18) carried 'links' (machine …, probed, by a person on 2026-09-18) carried constants over from 'mi300x-8gpu', measured against ….a9c7aed9d: 1309 passed, 6 skipped.c26a3a507: 1307 passed, 6 skipped: green. Both checks pass.So this test does not hold the whole text; it holds the two ends.
Fix (also the ponytail
shrink:, 8 lines → 5). The refusal is fully determined by this test's own fixtures, so a single equality holds all of it, the way thefirst_handcontrol at L613 already does:Measured on node 18. I applied this and N2's needle to a copy of the head:
checkandformat --checkboth give rc 0;GAPmgoes red, as doCA2mLandCA2L.Non-blocking. The brief's named mutant CA2mL is red at the head, and the gap is a new mutant outside #361.
The false sentence is in the PR body and in
c26a3a507's message. Under the no-amend rule, the message stays. So if this is fixed here, the fix commit's message should say the earlier sentence was wrong, and the PR body should be corrected. If it is not fixed here, file the gap as an issue.