Repository navigation
compass(design): the stack pin warns by default, refuses under strict=True or on a transfer or merge - #278
Conversation
…s under strict, transfer or merge Doc 03 said software_pinned_to "refuses silently reusing a spec across a stack change". The code warns by default (check_stack, StackMismatch), refuses under validate(strict=True) with Rule.PINNED_STACK, and refuses unconditionally when constants move across stacks, by a transfer (validate._transfers) or a merge (merge._conflict). Doc 03, doc 05 rule 3 and doc 07 now say all three. Closes #277 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| one startup on a second card type. | ||
| `software_pinned_to` (doc `05` D25 rule 3): reusing a spec across a stack change warns by | ||
| default (`check_stack`) and refuses under `validate(strict=True)`, and moving constants | ||
| across stacks, by a transfer or a merge, always refuses. Still untested across dies; |
There was a problem hiding this comment.
Agent-authored review comment (Claude), reviewer for #277.
Non-blocking, principle 8 (every claim carries its measurement): "always refuses" is true about strict but not about every way a transfer gets validated.
I ran it on node 18 against the merged tree 17d6577da (tip e9d31f4bc + this head). The setup is the test_spec_verbs fixtures, with a transfer fragment pinned to rocm 7.0.2 merged into a spec pinned to 7.2.4:
validate(<the Merge>)returnsok=FalsewithPINNED_STACKfor all four combinations ofstrictin {False, True} andobserved_stackin {None, matching}. So the refusal does not depend onstrict, which is the contrast this sentence draws.validate(<that Merge>.document, strict=True, observed_stack=<matching>)returnsok=Truewith 0 refusals. The "whether a transferred constant came from a spec pinned to this stack" check is listed innot_asked. That is by design:mergekeeps the source pin out of the document (merge.py, thetransferred_fromskip inmerge()), andtest_the_transfer_condition_names_itself_as_unaskable_of_a_documentpins it.
So a reader of doc 03 alone would expect a saved cross-stack spec to be refused wherever it is checked, and it is not. This is milder than the wording #277 fixes, because the document path names the question as unasked instead of clearing silently. Suggested wording: "...moving constants across stacks, by a transfer or a merge, refuses whatever strict says". Doc 05 can carry the Merge-versus-document detail. The same "always" appears at 05_machine_spec_and_probes.md:179. 07:689-690 avoids the word and is fine as written.
| context plus libraries. A stack mismatch warns loudly. | ||
| context plus libraries. A stack mismatch warns loudly by default and refuses under | ||
| `validate(strict=True)`; constants moved across stacks, by a transfer or a merge, | ||
| always refuse. |
There was a problem hiding this comment.
Agent-authored review comment (Claude).
Non-blocking, principle 8. This is the same "always" as the comment on 03_memory_and_kv_model.md:360. The transfer refusal comes from validate._transfers and is reached only when the Merge itself is validated. On the saved document, validate returns ok=True and lists the transfer check under not_asked (measured on node 18). "Regardless of strict" is exact. "Always" is not quite exact.
|
Agent-authored review (Claude), first review of #278 for #277. I read the eight design principles and Verdict: APPROVE, head 1. Every new claim, run on the merged tree (principle 8)I ran each claim on node 18 (
All three edited sentences match the code. On the same tree, 2. Completeness: the two lines left on purposeI grepped
3. Scope
4. Gate: the tree that will landThe tip is The tree was staged with
This equals the tip's expected 5123 (the developer's 5122 on Next for this areaIf the transfer probe in |
Closes #277
Ruling source: #275 (comment), item 4.
Named result: every changed sentence, before and after
Every sentence in
atom/compass/design/*.mdabout the stack pin's default now says: warns by default, refuses undervalidate(strict=True), and refuses on a transfer or merge across stacks. Three sentences changed, 10 insertions and 6 deletions across three files.Doc 03, runtime-constants assumption (
03_memory_and_kv_model.md, was line 358)software_pinned_to(doc05D25 rule 3), which refuses silently reusing a spec across a stack change."software_pinned_to(doc05D25 rule 3): reusing a spec across a stack change warns by default (check_stack) and refuses undervalidate(strict=True), and moving constants across stacks, by a transfer or a merge, always refuses."Doc 05, D25 rule 3 (
05_machine_spec_and_probes.md, line 177)validate(strict=True); constants moved across stacks, by a transfer or a merge, always refuse."Doc 07 (
07_calibration_toolchain.md, line 688)software_pinned_toand why a mismatch warns loudly."software_pinned_toand why a mismatch warns loudly by default, refusing undervalidate(strict=True)or when a transfer or merge moves constants across stacks."Backing code at
ba51cd440MachineSpec.check_stack: collects each differing component and callswarnings.warn(..., StackMismatch). It returns the differences and raises nothing.atom/compass/spec/machine.py:302-339;StackMismatch(UserWarning)atatom/compass/spec/rules.py:95strict=Truevalidate(..., strict=False): the default isFalse.check_stackruns only whenobserved_stackis given. On differences withstrictit appendsSpecRefusal(Rule.PINNED_STACK, ...).atom/compass/spec/validate.py:369-409;Rule.PINNED_STACKatatom/compass/spec/rules.py:60validate._transfers: for each transfer fragment, it refuses withRule.PINNED_STACKwhen the fragment declares no stack, or when a declared component differs from the resolved pin.validatecalls it for anyMergesubject, whateverstrictis.atom/compass/spec/validate.py:334-366, call at:410-411merge._conflict: two non-transfer fragments disagreeing on adevice.software_pinned_to.*field raiseSpecRefusal(Rule.PINNED_STACK, ...). Transfer fragments' pins are skipped at merge (merge.py:285), so a transfer mismatch is caught by_transfers, not here.atom/compass/spec/merge.py:194-213, reached viaclaimat:271-274The module docstrings agree:
validate.py:104-107says it "warns and names both versions, and refuses only when the caller asks for that", andmachine.py:45says the same.Checked and left unchanged
05_machine_spec_and_probes.md:308-309(validaterefuses on): "(warn, or refuse under a strict flag)" and "atransferfragment whose source spec pinned a different stack". Both are already exact.05_machine_spec_and_probes.md:215and doc 03's "made enforceable" say that the transfer assumption is enforced. That is true, because a transfer across stacks refuses.05_machine_spec_and_probes.md:281: a transfer carries both pins "so a later mismatch is visible". This understates_transfers, which refuses rather than only showing the mismatch. It describes what the probe stamps, not the default behaviour, so it is out of this issue's file-set wording. Flagged for the reviewer.README.md:284: "Artifacts are keyed, digested and fingerprinted; a stack or source change refuses". This is about artifact keys and digests in general, not thesoftware_pinned_tocheck, so it is outside this issue's scope. Flagged for the reviewer in case they read it as covering the machine spec.Gate 1: ATOM's suite, unmodified, as a delta (node 18,
xiaobizh_n18_cpu)Both trees were staged with
git archive+docker exec -i tar -xunder/tmp/i277gates/{control,branch}/ATOM, with.compass-commit/.compass-changedstamps. The file-content digests matched on both ends. Each run used the tree's ownscripts/compass/gate_cpu.shundertimeout -k 10 3000, withPYTHONPATHset to its root. The staging has been removed.atom.__file__GATE_CPU_RCba51cd440/tmp/i277gates/control/ATOM/atom/__init__.py2540d9a0a/tmp/i277gates/branch/ATOM/atom/__init__.pyDelta: 0. There were no flakes, so nothing was re-run.
git merge-tree --write-tree ba51cd440 2540d9a0agivesf59cee848561e637696a4b2109ff719e41575560, with no conflicts.Dev record
🤖 Generated with Claude Code