Repository navigation
check_kernel_residuals: a bare, uncorroborated strings-only line is not a residual (macOS) - #525
Merged
Merged
Conversation
added 2 commits
October 26, 2026 13:00
…r line is machine-code noise, not a residual (CR-352) The macOS arm64 Release kernel archive printed the free-standing 4-byte run `TvJO` through `strings -a`: no symbol, no header, no source text contains it, and the "Tv/TV camel case" vocabulary read it as an identifier with no ADR-0001 row. Main's macOS Release leg has failed test_kernel_residuals on it since CR-150. An unruled identifier finding whose surface is `strings`, whose whole stripped line is that one identifier, and which is corroborated by none of (a) the normalised nm symbols, (b) installed-header code and header-literal identifiers, (c) the identifiers of the DECODED, JOINED string values of the kernel sources (simple, hex, octal and universal escapes, adjacent, prefixed and raw literals; collected separately, so the legacy source-literal surface, its findings and its presence role are unchanged), is no longer a finding. Ruled rows are resolved before the suppression, so presence and stale-row behaviour are unchanged; texts, separators, phrase hits, nm, header and source-literal hits are judged exactly as before. No ADR row, no vocabulary or regex change, no length floor change. Remaining hole (stated, not closed): bytes that reach the archive without a matching string value, symbol or header token (a char-array initialiser, macro built data) print as the same bare line and are now treated as noise; main caught them through strings. Not run on the author's machine; macOS and Linux CI are the evidence.
…al/state/pineforge-top-core/lanes/ci-lab/clone into fu-tvjo2
luisleo526
added a commit
that referenced
this pull request
Oct 26, 2026
Adds one bullet to the CI and release process list from the merged change #525: the kernel residuals check no longer reports a bare, uncorroborated `strings` line, with the limit the change states. Checker and tests only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526
added a commit
that referenced
this pull request
Oct 26, 2026
Main moved by scripts and tests only (#525, #521, #526); CHANGELOG.md is unchanged on main since the base of this branch, so the merge result is main's tree with this branch's CHANGELOG.md. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scripts/check_kernel_residuals.pyno longer reports a free-standing, uncorroboratedstringsline as an unruled identifier. The macOS arm64 Release kernel archive prints the 4-byte machine-code runTvJOthroughstrings -a(whole lineTvJO; not annmsymbol; no source text contains it), and the "Tv/TV camel case" vocabulary read it as an identifier with no ADR-0001 row.test_kernel_residualshas been red on every compiled main macOS Release run since the kernel-residuals vocabulary rule because of it.The rule
An unruled identifier finding is dropped only when all of these hold:
strings,nmsymbols, (b) installed-header code and header-literal identifiers, (c) the identifiers of the decoded, joined string values of the kernel sources contains it.(c) is a new, separately collected set (
decode_string_literal: simple, hex, octal and universal escapes, adjacent, prefixed and raw literals; directives and include paths kept apart). The legacy source-literal surface, its findings and its role in ruled-row presence are unchanged. Ruled rows are resolved before the suppression, so presence and stale-row behaviour are unchanged. Texts, separators, phrase hits,nm, header and source-literal findings are judged exactly as before. No ADR row, no vocabulary or regex change, no length-floor change, no special case of the token.Limit (stated, not closed)
Bare identifier-only archive strings now require symbol, header, or decoded/joined source-literal evidence; this removes printable machine-code noise but also stops detecting otherwise uncorroborated bare names assembled as character arrays or macro-built data, which the previous strings-only rule would have reported.
The same hole in the shapes the reviewer listed: a bare archive identifier line with no symbol, installed-header token or decoded source literal behind it is dropped, which also covers a stringised macro argument (
#xalone), a__func__string of a function with no symbol left, pieces joined across a preprocessor conditional ("tv_" #if A "foo" #endif), and any compiled literal outside the scanned set (a generated file, a header outsidesrc/and the installed set). On the kernel scope at this commit none of them occurs (the reviewer's greps: no__func__; the two#fieldmacros always carry a"trades."prefix so their result is a dotted text, still judged; no literal split across#if; no kernel include ofinclude/pineforge/sourceorcompat; one char-array initialiser,tags{'E','T','O','V','K','X','H'}, which is not vocabulary). Nothing real is lost today; the gate is silent at exactly the moment someone adds such a name. Optional later hardening (not in this PR): add the identifiers of the kernel sources' code (comments stripped, literals blanked) to the corroboration set.Evidence of the failure being fixed
macOS Release diagnostics (run 40259306020, job 121368062308):
test_kernel_residualsfailed with exactly ONE finding,unruled 'TvJO' ... line=[[TvJO]](... 188 archive hits ... 1 findings ... FAIL). Nothing else was red in that test.How the PR proves it
BareStringsTests.test_an_uncorroborated_bare_identifier_is_not_a_finding: the exact bare lineTvJO(and an unrelatedTvQZ) with nonm, header or source evidence gives no finding and exit 0. It is red on the base checker (one unruled finding); the lab "red on base" job runs the new tests against the old checker:rj-20261026t050742-abe8cb: exactly the 3 expected subtests fail on the old checker (61 tests run).nm-corroborated and source-literal-corroborated bare names (TvJO,tv_foo, three-charactertv_) stay findings; escaped (hex, octal, universal), joined, prefixed and raw literals keep their finding through the decoded set; texts, separators, phrase hits and a ruled bare line (live and stale) behave as before; the existing header-only ruling control is untouched.check()on a compiled probe archive (Linux): lab remote ctest-onlykernel_residuals:rj-20261026t050054-766c02on the fix commit: PASS (Ran 61 tests ... OK); re-run on the merged tree ec60b10394c4:rj-20261026t054611-c1edb4: PASS.TvJOwith one more printable byte, which this rule does not cover), the window to fix it is the last push at 19:00.Not run on the author's Mac.
🤖 Generated with Claude Code