compile_overlays: name the no-walk-root skip message so its test cannot drift

test_compile_overlays_static_split.test_data_only_capture_reports_skip_with_captured_log
has been red on master since 4683e923 (2026-09-12). That commit reworded both
emit sites deliberately -- "no walk-root seeds (data-only region)" became
"no shared walk-root seeds; checking fragments separately", because the region
is no longer declared data-only: its executed dispatch demands are still
served by the isolated-fragment pass. The assertion still names the old text,
so the test fails on a clean checkout:

  AssertionError: 'SKIP: no walk-root seeds' not found in '... SKIP: no
  shared walk-root seeds; checking fragments separately ...'

The literal was duplicated at the two emit sites and copied a third time into
the test, so rewording two of the three left the third stale with nothing to
catch it. Give it a name -- NO_SHARED_WALK_ROOT_SEEDS_SKIP -- use it at both
emit sites, and have the test assert the constant rather than a copy of its
text. A future reword then updates all three at once or fails loudly.

The printed output is unchanged, verified byte for byte against the pre-change
text including both leading spaces and the trailing blank line.

tools/test_compile_overlays_static_split.py: 10 tests, was 9 passed 1 failed,
now 10 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Kline
2026-09-18 18:36:35 -04:00
parent 1a0897ca50
commit 798b66bbdc
2 changed files with 16 additions and 3 deletions
+11 -2
View File
@@ -3255,6 +3255,15 @@ def current_variant_func_id_coverage(func_ids: list, data: bytes,
# contract/header change (which bumps the hash -> fresh dir -> fresh memo)
# re-attempts everything (e.g. the psx_rfe_mark_escape contract fix).
# So a memoized skip only ever elides a build that is deterministically doomed.
# Printed when a capture contributes no walk-root seed. The wording is
# deliberate: the region is NOT declared data-only -- its executed dispatch
# demands are still served by the isolated-fragment pass, which runs
# separately. Named so the two emit sites and the test cannot drift apart.
# They did: 4683e923 reworded both prints and left
# test_compile_overlays_static_split asserting the old string.
NO_SHARED_WALK_ROOT_SEEDS_SKIP = (
'SKIP: no shared walk-root seeds; checking fragments separately')
INTERIOR_FAIL_MEMO = 'interior_fail_memo.txt'
@@ -5818,7 +5827,7 @@ def _static_capture_job(cap, args, toml, forced_interiors, static_out, result):
seed.split()[0].startswith('0x'))
]
if not root_seeds:
print(' SKIP: no shared walk-root seeds; checking fragments separately\n')
print(f' {NO_SHARED_WALK_ROOT_SEEDS_SKIP}\n')
result['outcome'] = 'skip'
return
@@ -6366,7 +6375,7 @@ def main():
seed.split()[0].startswith('0x'))
]
if not root_seeds:
print(' SKIP: no shared walk-root seeds; checking fragments separately\n')
print(f' {NO_SHARED_WALK_ROOT_SEEDS_SKIP}\n')
stats.add_skip()
return
+5 -1
View File
@@ -227,7 +227,11 @@ class StaticWorkerContractTests(unittest.TestCase):
'overlays_static.c')
self.assertEqual(res['outcome'], 'skip')
self.assertIsNone(res['part'])
self.assertIn('SKIP: no walk-root seeds', res['log'])
# Assert the constant, not a copy of its text: this line asserted a
# stale literal from 4683e923 until 2026-09-18 and the test was red
# on master the whole time.
self.assertIn(compile_overlays.NO_SHARED_WALK_ROOT_SEEDS_SKIP,
res['log'])
self.assertEqual(res['requested_entries'], set())