@@ -993,15 +993,15 @@ def test_capability_record_when_unsupported_claims_nothing(self):
993993 on ["results_digest_platform" ]), (1 , "selected-window/v1" , 2 ,
994994 ["full/v1" ], None , None , None ))
995995
996- def test_the_supported_record_declares_the_full_revision_alone_never_the_parity_one (self ):
997- # A build with complete value ownership emits
998- # selected_window_contract_revisions == ["1.3"], never the old parity revision .
996+ def test_the_supported_record_declares_the_parity_revision_alone_never_the_full_one (self ):
997+ # A build with value parity on tested cases and typed codes (without a completeness
998+ # proof, EN-115) emits selected_window_contract_revisions == ["1.3-parity "], never ["1.3"] .
999999 # The literals are written out here, not read from the module.
10001000 supported = {
10011001 "engine" : "pineforge" ,
10021002 "capabilities" : {
10031003 "selected_window_wire_version" : 1 ,
1004- "selected_window_contract_revisions" : ["1.3" ],
1004+ "selected_window_contract_revisions" : ["1.3-parity " ],
10051005 "report_policy" : "selected-window/v1" ,
10061006 "fingerprint_version" : 2 ,
10071007 "report_shapes" : ["full/v1" ],
@@ -1020,20 +1020,20 @@ def test_the_supported_record_declares_the_full_revision_alone_never_the_parity_
10201020 self .assertEqual (swr .capabilities_record (False ), unsupported )
10211021 revisions = (
10221022 swr .capabilities_record (True )["capabilities" ]["selected_window_contract_revisions" ])
1023- self .assertEqual (revisions , ["1.3" ])
1023+ self .assertEqual (revisions , ["1.3-parity " ])
10241024 self .assertEqual (len (revisions ), 1 ) # a singleton ...
1025- self .assertNotIn ("1.3-parity " , revisions ) # ... that never advertises parity only
1025+ self .assertNotIn ("1.3" , revisions ) # ... that is never the full revision
10261026 self .assertEqual (
10271027 swr .capabilities_record (False )["capabilities" ]["selected_window_contract_revisions" ],
10281028 []) # unsupported lists nothing at all
1029- self .assertEqual (swr .CONTRACT_REVISIONS , ("1.3" ,)) # the one constant
1029+ self .assertEqual (swr .CONTRACT_REVISIONS , ("1.3-parity " ,)) # the one constant
10301030
10311031 def test_the_declared_revisions_are_a_fresh_list_of_the_one_constant (self ):
10321032 first = swr .capabilities_record (True )["capabilities" ]["selected_window_contract_revisions" ]
1033- first .append ("1.3-parity " ) # a caller's old revision changes neither the constant ...
1034- self .assertEqual (swr .CONTRACT_REVISIONS , ("1.3" ,))
1033+ first .append ("1.3" ) # a caller that edits its copy changes neither the constant ...
1034+ self .assertEqual (swr .CONTRACT_REVISIONS , ("1.3-parity " ,))
10351035 again = swr .capabilities_record (True )["capabilities" ]["selected_window_contract_revisions" ]
1036- self .assertEqual (again , ["1.3" ]) # ... nor the next record
1036+ self .assertEqual (again , ["1.3-parity " ]) # ... nor the next record
10371037 self .assertIsNot (first , again )
10381038
10391039 def test_without_a_completeness_proof_the_probe_declares_1_3_parity_only (self ):
@@ -1808,11 +1808,11 @@ def test_capabilities_probe_reports_a_supported_runtime_without_an_ohlcv(self):
18081808 status , out , _ = run_main (["--so" , "x.so" , "--capabilities-json" ])
18091809 self .assertEqual ((status , json .loads (out )), (0 , swr .capabilities_record (True )))
18101810 self .assertEqual (lib .calls , []) # nothing was constructed or run
1811- # The probe's real stdout carries the complete contract revision alone.
1811+ # The probe's real stdout carries the parity contract revision alone, not the full revision .
18121812 printed = json .loads (out )["capabilities" ]
1813- self .assertEqual (printed ["selected_window_contract_revisions" ], ["1.3" ])
1814- self .assertIn ('"selected_window_contract_revisions":["1.3"]' , out )
1815- self .assertNotIn ('"1.3-parity "' , out )
1813+ self .assertEqual (printed ["selected_window_contract_revisions" ], ["1.3-parity " ])
1814+ self .assertIn ('"selected_window_contract_revisions":["1.3-parity "]' , out )
1815+ self .assertNotIn ('"1.3"' , out )
18161816 self .assertEqual ((printed ["selected_window_wire_version" ], printed ["fingerprint_version" ]),
18171817 (1 , 2 ))
18181818
@@ -2084,8 +2084,8 @@ def writes_the_member(node):
20842084 self .assertNotIn ('"has_unbounded_state": False' , source )
20852085
20862086 def test_the_contract_revision_is_one_constant_with_one_literal_read_in_one_place (self ):
2087- # The complete declaration ("1.3") has one tuple, one string literal, one reader, and no
2088- # revision literal in run_json (so none in a request, report, phase or fingerprint).
2087+ # The parity declaration ("1.3-parity ") has one tuple, one string literal, one reader, and
2088+ # no revision literal in run_json (so none in a request, report, phase or fingerprint).
20892089 import ast
20902090 report_tree = ast .parse ((ROOT / "docker" / "selected_window_report.py" ).read_text ())
20912091
@@ -2094,14 +2094,14 @@ def string_constants(tree):
20942094 if isinstance (node , ast .Constant ) and isinstance (node .value , str )]
20952095
20962096 strings = string_constants (report_tree )
2097- self .assertEqual (strings .count ("1.3" ), 1 ) # written once ...
2098- self .assertNotIn ("1.3-parity " , strings ) # ... and never the old parity revision
2097+ self .assertEqual (strings .count ("1.3-parity " ), 1 ) # written once ...
2098+ self .assertNotIn ("1.3" , strings ) # ... and never the full revision
20992099 assignments = [node for node in report_tree .body if isinstance (node , ast .Assign )
21002100 and any (isinstance (target , ast .Name ) and target .id == "CONTRACT_REVISIONS"
21012101 for target in node .targets )]
21022102 self .assertEqual (len (assignments ), 1 )
21032103 self .assertIsInstance (assignments [0 ].value , ast .Tuple )
2104- self .assertEqual (string_constants (assignments [0 ].value ), ["1.3" ])
2104+ self .assertEqual (string_constants (assignments [0 ].value ), ["1.3-parity " ])
21052105 readers = [function .name for function in ast .walk (report_tree )
21062106 if isinstance (function , ast .FunctionDef )
21072107 and any (isinstance (name , ast .Name ) and name .id == "CONTRACT_REVISIONS"
@@ -2112,16 +2112,16 @@ def string_constants(tree):
21122112 self .assertEqual (run_json_strings & {"1.3" , "1.3-parity" }, set ())
21132113
21142114 def test_the_contract_revision_guard_rejects_the_old_or_a_stray_revision (self ):
2115- # Exercise the real guard on source mutations. Keeping the full literal once while
2115+ # Exercise the real guard on source mutations. Keeping the parity literal once while
21162116 # adding a stray revision isolates the exact tuple pin from the literal-count check.
21172117 report_path = ROOT / "docker" / "selected_window_report.py"
21182118 run_json_path = ROOT / "docker" / "run_json.py"
21192119 report_source = report_path .read_text ()
21202120 run_json_source = run_json_path .read_text ()
2121- declaration = 'CONTRACT_REVISIONS = ("1.3",)'
2121+ declaration = 'CONTRACT_REVISIONS = ("1.3-parity ",)'
21222122 self .assertEqual (report_source .count (declaration ), 1 )
2123- cases = (("1.3-parity " ,), ("1.3-stray" ,), ("1.3" , "1.3-parity " ),
2124- ("1.3" , "1.3-stray" ), ("1.3" , "1.3" ))
2123+ cases = (("1.3" ,), ("1.3-stray" ,), ("1.3-parity " , "1.3" ),
2124+ ("1.3-parity " , "1.3-stray" ), ("1.3-parity " , "1.3-parity " ))
21252125 for revisions in cases :
21262126 mutant_source = report_source .replace (
21272127 declaration , f"CONTRACT_REVISIONS = { revisions !r} " , 1 )
0 commit comments