Skip to content

Commit bc05d79

Browse files
committed
fix(ci): preserve export qualification and event failure receipts
1 parent 80b5ea7 commit bc05d79

3 files changed

Lines changed: 38 additions & 4 deletions

File tree

‎Documentation/Architecture/Release1.3/Progress.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,13 @@
409409
"qualification_policy": "Fresh combined-source receipts required; parent receipts immutable; unchanged HTML physical/browser evidence retains its scoped source identity.",
410410
"contract": "StructuredPreviews/Reconciliation.md",
411411
"merge_tag_publication_performed": false
412+
},
413+
"final_merge_review": {
414+
"finding": "Existing main export lane and event I/O diagnostics were absent from the reconciled harness",
415+
"resolution": "Restore main export commands/CLI choice and diagnostic receipt fields; retain combined [1,39] focused discovery guard",
416+
"library_cli_asset_fixture_changes": false,
417+
"qualification_policy": "Fresh hosted required checks and actual local export lane; unchanged implementation/WASI receipts retained through equivalence",
418+
"merge_authorization": "Maintainer requested ready and merge after checks/reviews pass; tags/publication separate"
412419
}
413420
}
414421
}

‎Documentation/Architecture/Release1.3/StructuredPreviews/Reconciliation.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,16 @@ separately from the earlier pinned return. Byte-identical HTML implementation/te
7272
assets retain their prior browser, physical-touch, VoiceOver and calibration evidence
7373
within its stated scope. The inherited approximately 11% streaming comparison and
7474
existing disposition remain unchanged. No PR merge, tag or publication is performed.
75+
76+
77+
## Final merge review: preserve the export lane
78+
79+
Review against current main found that the earlier CLI reconciliation had dropped
80+
its existing `export` lane and event-reader I/O diagnostics. Restore the complete
81+
five-command export lane, including the native public consumer and three Apple SDK
82+
probes, while retaining the structured combined focused inventory `[1, 39]`.
83+
Restore missing-event error capture and both console/ABI parameter counts in receipts.
84+
Library, CLI, assets, fixtures, product policy and all counters remain unchanged.
85+
Fresh required hosted checks and actual export-lane execution qualify the harness
86+
correction. Earlier source-bound implementation/WASI evidence is retained through
87+
exact equivalence; no previous receipt is relabelled to the new head.

‎Scripts/ci.py‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ def commands(lane, output):
4141
['swift', 'test', '-c', 'release', '--filter', 'qa'],
4242
['swift', 'test', '-c', 'release', '--sanitize', 'address', '--scratch-path', '.build/ci-address', '--filter', 'qa'],
4343
]
44+
if lane == 'export':
45+
return [
46+
['python3', '-B', 'Scripts/public_check.py'],
47+
['python3', '-B', 'Scripts/verify_html_assets.py'],
48+
['swift', 'test', '--filter', 'export|Export|apple'],
49+
['swift', 'test', '-c', 'release', '--filter', 'export|Export|apple'],
50+
['python3', '-B', 'Scripts/qualify_json_export.py', '--output', str(output / 'apple')],
51+
]
4452
if lane == 'browser':
4553
return [
4654
['python3', '-B', 'Scripts/verify_html_assets.py'],
@@ -176,7 +184,7 @@ def check_result(command, code, log, events=None):
176184

177185
def main():
178186
parser = argparse.ArgumentParser(description=__doc__)
179-
parser.add_argument('--lane', choices=['native', 'safety', 'docs', 'r0', 'qa', 'linux', 'linux-safety', 'wasm', 'browser', 'cli'], required=True)
187+
parser.add_argument('--lane', choices=['native', 'safety', 'docs', 'r0', 'qa', 'linux', 'linux-safety', 'wasm', 'browser', 'export', 'cli'], required=True)
180188
parser.add_argument('--output')
181189
args = parser.parse_args()
182190
output = ROOT / (args.output or '.build/ci/' + args.lane)
@@ -211,15 +219,21 @@ def save():
211219
log = log_path.read_text(errors='replace').replace(str(ROOT), '.')
212220
log_path.write_text(log)
213221
events = None
222+
event_error = None
214223
try:
215-
events = read_events(event_path.read_text()) if event_path is not None else None
224+
if event_path is not None:
225+
events = read_events(event_path.read_text())
216226
passed, counts = check_result(command, code, log, events=events)
217-
except (KeyError, ValueError, TypeError):
227+
except (OSError, KeyError, ValueError, TypeError) as error:
218228
passed, counts = False, []
229+
event_error = str(error)
219230
entry = {'command': [x.replace(str(ROOT), '.') for x in command], 'exit_code': code, 'status': 'passed' if passed else 'failed', 'log': log_path.relative_to(ROOT).as_posix(), 'log_sha256': hashlib.sha256(log_path.read_bytes()).hexdigest(), 'swift_testing_function_counts': counts, 'parameterized_case_invocations': sum(int(n) for n in re.findall(r'with (\d+) test cases passed', log))}
220231
if events is not None:
221-
entry['swift_testing_events'] = dict(events, path=event_path.relative_to(ROOT).as_posix(), sha256=hashlib.sha256(event_path.read_bytes()).hexdigest())
232+
entry['console_parameterized_case_invocations'] = entry['parameterized_case_invocations']
222233
entry['parameterized_case_invocations'] = events['parameter_case_invocations']
234+
entry['swift_testing_events'] = dict(events, path=event_path.relative_to(ROOT).as_posix(), sha256=hashlib.sha256(event_path.read_bytes()).hexdigest())
235+
if event_error is not None:
236+
entry['event_error'] = event_error
223237
receipt['commands'].append(entry)
224238
print(json.dumps(entry), flush=True)
225239
if not passed:

0 commit comments

Comments
 (0)