← all exploratory attempts · paired baseline · show in source

breadth-02: Switch grant policies

Agent report: partial Reviewed: validation-stage mismatch

Session: completed

docs/spec-fabric-switch.md, lines 117–132

### grant_policy (temporal only) The optional value is exactly one typed Fabric attribute: ```text #fabric.switch_fixed_priority<requester_order = array<i64: ...>> #fabric.switch_round_robin<requester_cycle = array<i64: ...>, reset_requester = ...> ``` Requester ordinals are the switch input-port ordinals. The sequence is a permutation of the complete input domain and contains no duplicate. The reset requester of a round-robin policy occurs in its cycle. A temporal switch whose physical connectivity admits two inputs to one output requires one exact policy in Fabric 1.0. A switch without such fan-in must omit it. Spatial switches must omit it.

Independent review

The 38 reported disagreements are not established compiler bugs. Documentation assigns those checks to root-complete finalization; this PBT exercised isolated operation verification. Duplicate-requester, reset-cycle, and spatial-policy checks provide valid partial verifier evidence.

Execution provenance

The original pilot recorded the compiler hash and checkout revision separately; its binary build revision was not verified. Coverage follow-ups use separately identified rebuilt binaries. Original simulator binary hashes were not retained.

Original standalone-test agent report

This is exploratory evidence, not an accepted production-format PBT.

All six passage obligations were sampled against the real pinned subject and 38/100 cases disagree with the documentation; some passage-adjacent shapes (anonymous switch form, warning/limit-scale switches) were not exercised, so this is not a whole-passage success claim.

Reported numeric verdicts

seeds
count
100
scheme
random.Random(seed), family = seed mod 11, seeds 0..110 with unsatisfiable connectivity draws skipped

Tested obligations

Untested obligations

Format

standalone Python generator + Python verdict checker (not ProGRMR/.spct); rationale in pbt/README.md - the property is an accept/reject verifier property that .spct input/output pair comparison cannot express

Reproduction

bash pbt/run_all.sh 100

Measured subject code coverage

measured · Measured handwritten Loom subject code only; external LLVM/MLIR and generated code excluded. Includes main executions, including rejected inputs; deliberate controls excluded. No matching native-suite baseline for this executable has been imported, so no coverage gain is claimed. Semantic fidelity remains a separate audit.

Execution: {'subject_exit_codes': {'0': 72, '1': 28}, 'subject_invocations': 100}
Baseline: No matching baseline measured
Minimized cases: not measured

Source files reached (7)
Source filePBT linesPBT branchesNew over baseline
lib/Fabric/IR/Crosspoint/Crosspoint.cpp5 / 223 / 10— lines, — branches
lib/Fabric/IR/FabricDialect.cpp18 / 191 / 2— lines, — branches
lib/Fabric/IR/FabricElaboration.cpp8 / 6440 / 310— lines, — branches
lib/Fabric/IR/FabricOpUtils.cpp4 / 962 / 36— lines, — branches
lib/Fabric/IR/FabricSwitchOp.cpp173 / 81291 / 472— lines, — branches
lib/Fabric/IR/SwitchResourceContract/SwitchResourceContract.cpp6 / 2012 / 102— lines, — branches
tools/loom/loom.cpp10 / 100 / 0— lines, — branches
Full structured agent result
constraints respected
no model or agent calls
true
no subject or tool edits
true
remote scratch
/tmp/spectriad-autonomous-breadth-02
taskset pinned
true
wrote only in slot
true
controlled violation
cases
  • case_ctrl_good_positive (rc 0, verdict pass)
  • case_ctrl_duplicate_but_expected_accept (rc 1, verdict fail)
conclusion
the checker reports fail when subject verdict and doc-derived expectation disagree
evidence
pbt/controlled/raw_results.txt, pbt/controlled/verdicts.json
kind
synthetic checker control (not a subject defect)
format
standalone Python generator + Python verdict checker (not ProGRMR/.spct); rationale in pbt/README.md - the property is an accept/reject verifier property that .spct input/output pair comparison cannot express
obligations
tested upheld
  • cases
    11
    family
    neg_duplicate_requester
    id
    O2
    subject
    rejected: 'switch grant policy repeats requester N'
    text
    sequence contains no duplicate
  • cases
    11
    family
    neg_rr_reset_not_in_cycle
    id
    O3
    subject
    rejected: 'round-robin reset requester is absent from its requester cycle'
    text
    round-robin reset requester occurs in its cycle
  • cases
    6
    family
    neg_spatial_with_policy
    id
    O6
    subject
    rejected: 'spatial fabric.switch must not carry temporal-only attribute grant_policy'
    text
    spatial switches must omit grant_policy
  • cases
    34
    families
    • pos_fanin_fp
    • pos_fanin_rr
    • pos_nofanin_omitted
    • pos_spatial_omitted
    id
    positives
    subject
    accepted (rc 0)
    text
    valid fixed-priority / round-robin fan-in switches, fan-in-free temporal without policy, spatial without policy
tested violated by subject
  • cases
    11
    family
    neg_missing_requester
    id
    O1a
    subject
    accepted (rc 0, no diagnostic)
    text
    sequence is a permutation of the complete input domain
  • cases
    11
    family
    neg_out_of_domain_requester
    id
    O1b
    subject
    accepted (rc 0, no diagnostic)
    text
    requester ordinals are the switch input-port ordinals
  • cases
    10
    family
    neg_fanin_without_policy
    id
    O4
    subject
    accepted (rc 0, no diagnostic)
    text
    temporal switch whose connectivity admits two inputs to one output requires one exact policy
  • cases
    6
    family
    neg_nofanin_with_policy
    id
    O5
    subject
    accepted (rc 0, no diagnostic)
    text
    a switch without such fan-in must omit it
untested
  • anonymous (SSA-operand) switch form with grant_policy
  • grant_policy interaction with route_table / configured projection (outside passage)
  • switches at the K*L warning threshold or 256-crosspoint limit
  • policy attribute spelled with the documented array<i64: ...> payload (pinned parser rejects that spelling; see doc/parser discrepancy)
passage
docs/spec-fabric-switch.md:117-132 (### grant_policy (temporal only))
paths
checker
pbt/analyze.py
controlled violation
pbt/controlled/
generator
pbt/generate.py
inputs
pbt/cases/
intent note
pbt/INTENT.md
raw subject output
pbt/raw_results.txt
readme
pbt/README.md
reproduction
bash pbt/run_all.sh 100
subject driver
pbt/remote_run.sh
verdicts
pbt/verdicts.json
pinned revision
48615bc5925ef4b9db8b4550b5d4322933cf4b7b
potential subject bugs
  • confidence
    high for the observation, unverified as to whether the switch path is expected to route through ResourceContract::validate
    families
    • neg_missing_requester
    • neg_out_of_domain_requester
    • neg_fanin_without_policy
    • neg_nofanin_with_policy
    summary
    fabric.switch verifier does not enforce grant_policy domain completeness, ordinal domain, or the fan-in <-> policy agreement rule
    supporting code
    lib/Fabric/IR/ResourceContract/ResourceContract.cpp defines RequesterOmittedFromGrantPolicy, UnknownRequesterKey, ContentionWithoutGrantPolicy, GrantPolicyWithoutContention; lib/Fabric/IR/FabricSwitchOp.cpp only surfaces the duplicate and round-robin-reset diagnostics observed in this run
  • evidence
    shipped native control context/native-controls/breadth-02/known-good-switch (exit 1, DenseI64ArrayAttr parse failure)
    impact
    not part of the tested property
    summary
    doc/parser spelling discrepancy: doc shows requester_order = array<i64: ...>, pinned parser accepts only [ ... ]
sampling limits not source requirements
K inputs
2..5 (fan-in families) / 1..5
L outputs
1..4
form
named function_type form only
port width W
  • 1
  • 8
  • 16
  • 32
route table size
1..4
tag width T
1..3
seeds
count
100
scheme
random.Random(seed), family = seed mod 11, seeds 0..110 with unsatisfiable connectivity draws skipped
slot
breadth-02
status
partial
status reason
All six passage obligations were sampled against the real pinned subject and 38/100 cases disagree with the documentation; some passage-adjacent shapes (anonymous switch form, warning/limit-scale switches) were not exercised, so this is not a whole-passage success claim.
subject
binary
/home/blimpan/blimpan/spectriad-loom-head/loom/build/tools/loom/loom
command
ssh bibim "taskset -c 79 .../loom --mlir-print-op-generic" < case.mlir
invocation per case
true
verdict counts
error
0
fail
38
invalid test
0
pass
62
verdict counts by family
neg duplicate requester
pass
11
neg fanin without policy
fail
10
neg missing requester
fail
11
neg nofanin with policy
fail
6
neg out of domain requester
fail
11
neg rr reset not in cycle
pass
11
neg spatial with policy
pass
6
pos fanin fp
pass
11
pos fanin rr
pass
11
pos nofanin omitted
pass
5
pos spatial omitted
pass
7

Published evidence

evidence/breadth-02 (1)
  • RESULT.json
    evidence/breadth-02/RESULT.json (6201 bytes)
evidence/breadth-02/coverage (7)
evidence/breadth-02/pbt (9)
  • INTENT.md
    evidence/breadth-02/pbt/INTENT.md (2439 bytes)
  • README.md
    evidence/breadth-02/pbt/README.md (4781 bytes)
  • analyze.py
    evidence/breadth-02/pbt/analyze.py (2761 bytes)
  • generate.py
    evidence/breadth-02/pbt/generate.py (6500 bytes)
  • raw_results.txt
    evidence/breadth-02/pbt/raw_results.txt (60608 bytes)
  • remote_run.sh
    evidence/breadth-02/pbt/remote_run.sh (591 bytes)
  • run_all.sh
    evidence/breadth-02/pbt/run_all.sh (1019 bytes)
  • ssh_err.txt
    evidence/breadth-02/pbt/ssh_err.txt (0 bytes)
  • verdicts.json
    evidence/breadth-02/pbt/verdicts.json (130057 bytes)
evidence/breadth-02/pbt/cases (101)
evidence/breadth-02/pbt/controlled (3)
  • analyze.py
    evidence/breadth-02/pbt/controlled/analyze.py (2761 bytes)
  • raw_results.txt
    evidence/breadth-02/pbt/controlled/raw_results.txt (1697 bytes)
  • verdicts.json
    evidence/breadth-02/pbt/controlled/verdicts.json (3473 bytes)
evidence/breadth-02/pbt/controlled/cases (3)
evidence/breadth-02/review (1)