Skip to content

Commit 9c92e55

Browse files
committed
FEATURE-ci-v3-runtime-green: share linkage coverage in archive receipt import
1 parent bc657d4 commit 9c92e55

3 files changed

Lines changed: 40 additions & 10 deletions

File tree

‎scripts/lib/release_platform.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def package_origin(root, origin, read_json, read_text, expected, platform, read_
153153
receipt = suites[name]
154154
observed = matrix.suite_result(read_text(receipt['log']), 0)
155155
require(all(receipt.get(k) == v for k, v in observed.items()), 'stale platform suite summary')
156-
require(set(definition.get('required_cases', [])) <= set(observed['case_names']), 'pruned platform suite')
156+
matrix.check_suite_cases(definition, platform, linkage, observed['case_names'])
157157
return result
158158

159159

‎specs/tasks/FEATURE-ci-v3-runtime-green.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,5 @@ Fresh current-source focused Windows backend DLL (16 owning translation units) p
112112
## Approved Windows capture closure
113113

114114
User approved exact430fa17e publication and ONE1/60 Windows original external-loop capture. Run40635371672 completed once:4tests/52checks/zero skips, exit0 in0.4701966s, retirement confirmed, stderr empty. Budget is CLOSED; no retry or remaining-time authority. This establishes nonreproduction in that context, not a fix or independence of the earlier WSAPoll10038 failure. The diagnostic branch remains NEVER MERGE. Only a proven repair may change production behavior.
115+
116+
Stage5 receipt-import closure: source review found the selected-archive importer independently required all cases in each linkage. A new real receipt-bundle regression was RED with `valid DLL/static split rejected: pruned platform suite`. Reusing the same coverage validator fixes this producer/consumer mismatch while still rejecting missing static fault cases. All14 platform-bundle tests and changed Python syntax/diff checks pass. This is part of the same proven setup repair; native binaries are unchanged, so their focused evidence is carried without repetition. Current-source CI remains pending.

‎test/integ/release_platform_bundle_test.py‎

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_valid_archive_import_rejects_duplicate_members_and_namespace_collisions
132132
stream.add(root/'Darwin/catalog.json',arcname='Darwin/catalog.json')
133133
with self.assertRaises(ValueError): module.unpack(duplicate,root/'duplicate')
134134

135-
def platform_origin_fixture(self):
135+
def platform_origin_fixture(self, platform='Darwin'):
136136
module = self.module()
137137
import package_matrix as matrix
138138
import release_artifact as identity
@@ -147,7 +147,7 @@ def write(path, value):
147147
path.write_text(json.dumps(value))
148148
header = root / 'provider.h'; header.write_bytes(b'selected OpenSSL\r\n')
149149
selected = dict(archive_sha256='a'*64, snapshot_sha256='b'*64, extracted_sha256=hashlib.sha256(json.dumps({},sort_keys=True).encode()).hexdigest(), tls='both', sanitizer='none')
150-
write(package/'summary.json', dict(status='passed', host='Darwin', lanes={'no':{},'yes':{}},
150+
write(package/'summary.json', dict(status='passed', host=platform, lanes={'no':{},'yes':{}},
151151
revision='d'*40, provider_header_sha256=identity.sha256(header),
152152
release_artifact={'archive':{'sha256':'a'*64}, 'source':{'snapshot_sha256':'b'*64,'head':'d'*40}}))
153153
for mode in ('no','yes'):
@@ -160,7 +160,7 @@ def write(path, value):
160160
public[linkage]=dict(dependencies=graph, compile={'dependencies':[]},
161161
cells=[{'configurations':inventory['cases']},{'configurations':inventory['cases']}])
162162
suites={}
163-
for name, definition in matrix.suites(inventory, 'Darwin', mode).items():
163+
for name, definition in matrix.suites(inventory, platform, mode).items():
164164
cases=definition.get('required_cases',[]) or ['fixture_case']
165165
log=lane/('integration-'+linkage)/(name+'.log')
166166
log.parent.mkdir(parents=True, exist_ok=True)
@@ -171,28 +171,56 @@ def write(path, value):
171171
write(lane/'audit.json',dict(violations=[],tls_mode=mode,public=public))
172172
origin=dict(package=str(package), source_root=str(root/'source'), source_commit='d'*40, provider_header=str(header), native={})
173173
# This test checks installed matrix origin independently; native origin is mandatory in complete bundles.
174-
counts=module.package_origin(ROOT, origin, lambda p: json.loads(Path(p).read_text()), lambda p: Path(p).read_text(), selected, 'Darwin')
174+
counts=module.package_origin(ROOT, origin, lambda p: json.loads(Path(p).read_text()), lambda p: Path(p).read_text(), selected, platform)
175175
self.assertGreater(counts['tests'],0)
176176
wrong_origin=dict(origin,source_commit='e'*40)
177177
with self.assertRaises(ValueError):
178-
module.package_origin(ROOT,wrong_origin,lambda p:json.loads(Path(p).read_text()),lambda p:Path(p).read_text(),selected,'Darwin')
178+
module.package_origin(ROOT,wrong_origin,lambda p:json.loads(Path(p).read_text()),lambda p:Path(p).read_text(),selected,platform)
179179
for mode in ('no','yes'):
180180
build=root/('native-'+mode); (build/'test').mkdir(parents=True)
181181
names=['protocol_fuzz_replay','hpack_corpus','http2_fuzz_replay','quic_fuzz_replay',
182-
'quic_recovery_fuzz_replay','http3_fuzz_replay','qpack_fuzz_replay','io_kqueue_backend']
182+
'quic_recovery_fuzz_replay','http3_fuzz_replay','qpack_fuzz_replay','io_' + inventory['platforms'][platform] + '_backend']
183183
if mode=='yes': names.append('quic_tls_callbacks_fuzz_replay')
184184
for name in names: (build/'test'/(name+'.trs')).write_text(':test-result: PASS\n')
185185
(build/'test/test-suite.log').write_text('# TOTAL: %d\n# PASS: %d\n# SKIP: 0\n# XFAIL: 0\n# FAIL: 0\n# XPASS: 0\n# ERROR: 0\n'%(len(names),len(names)))
186186
origin['native'][mode]=dict(build=str(build), tests=names)
187187
counts=checks.counts(counts['tests']+len(names),counts['checks']+len(names))
188188
artifacts=[dict(path=str(header),sha256=identity.sha256(header),bytes=header.stat().st_size)]
189-
row=dict(id='Darwin',identity=selected,archive_sha256='a'*64,origin=origin,status='passed',artifacts=artifacts,
190-
receipt=dict(status='passed',gate='Darwin',identity=selected,counts=counts,artifacts=artifacts))
189+
row=dict(id=platform,identity=selected,archive_sha256='a'*64,origin=origin,status='passed',artifacts=artifacts,
190+
receipt=dict(status='passed',gate=platform,identity=selected,counts=counts,artifacts=artifacts))
191191
retained=root/'retained'
192-
catalog=module.retain(retained,'Darwin',row,[p for p in root.rglob('*') if p.is_file()])
192+
catalog=module.retain(retained,platform,row,[p for p in root.rglob('*') if p.is_file()])
193193
module.validate_origin(ROOT,row,catalog)
194194
return module, root, package, header, selected, origin, row, catalog
195195

196+
def test_windows_origin_retains_static_fault_proof_and_accepts_dll_profile(self):
197+
import package_matrix as matrix
198+
module, _, package, _, selected, origin, _, _ = self.platform_origin_fixture('Windows')
199+
definition = matrix.load()['suites']['external_readiness_adapter']
200+
201+
def rewrite(linkage, cases):
202+
directory = package / 'tls-no' / ('integration-' + linkage)
203+
suites_path = directory / 'suites.json'
204+
suites = json.loads(suites_path.read_text())
205+
receipt = suites['external_readiness_adapter']
206+
log = Path(receipt['log'])
207+
log.write_text(''.join('Running test (%d): %s\n' % (i, case) for i, case in enumerate(cases)) +
208+
'%d tests executed\n%d checks\n-> 0 failures\n-> 0 skipped\n' % (len(cases), len(cases)))
209+
receipt.update(matrix.suite_result(log.read_text(), 0))
210+
suites_path.write_text(json.dumps(suites))
211+
212+
ordinary = [name for name in definition['required_cases'] if name not in definition['windows_static_cases']]
213+
rewrite('shared', ordinary)
214+
try:
215+
module.package_origin(ROOT, origin, lambda p: json.loads(Path(p).read_text()),
216+
lambda p: Path(p).read_text(), selected, 'Windows')
217+
except ValueError as error:
218+
self.fail('valid DLL/static split rejected: ' + str(error))
219+
rewrite('static', ordinary)
220+
with self.assertRaisesRegex(ValueError, 'required suite cases absent'):
221+
module.package_origin(ROOT, origin, lambda p: json.loads(Path(p).read_text()),
222+
lambda p: Path(p).read_text(), selected, 'Windows')
223+
196224
def test_platform_origin_rejects_pruned_mandatory_native_suite(self):
197225
import release_checks as checks
198226
module, root, _, _, _, _, row, catalog = self.platform_origin_fixture()

0 commit comments

Comments
 (0)