Repository navigation
fix(libre): scope the private-bench suite to the host it can actually audit - #179
shroominic wants to merge 1 commit into
Conversation
… audit
CI Unit was red on 13 private-bench tests with exit 66 and
{"analyzed":false,"error":"unsupported_platform"}. The tool is not broken there:
_readDescriptorBound only reads through the audited Darwin descriptor path and
refuses every other host before it opens a file or parses a byte. The suite
asserted Darwin analysis results on ubuntu-latest.
The Darwin assertions now carry @teston('mac-os'), and the contract every other
host gets is asserted in private_bench_host_scope_test.dart: analysis fails
closed with unsupported_platform, and the CLI keeps stdout to one redacted JSON
line with an empty stderr. No production path changes and no platform support is
claimed that was not audited.
|
Superseded by #183 — do not merge both; prefer #183. Both PRs fix #153's red Unit gate, but in opposite directions. This PR scopes the suite to the host it can audit ( The assembled aggregate (#163) was re-cut to carry #183 and drop this merge, so nothing on the candidate depends on this branch. Left open rather than closed so the decision stays visible; recommend closing it in favour of #183. |
|
Closed as superseded on the consolidated line, with the evidence stated plainly. This PR scopes Evidence that the suite needs no scoping here: the CI Unit job on So the red Unit gate described here was fixed a different way on this line. If the 0.4.0 aggregates (#139, #163) still show a red Unit gate for this cause, the fix belongs on those branches; this PR is not the carrier for it. Labeling the reason explicitly rather than leaving the PR in limbo: no owner needed here, and nothing was absorbed from it. |
Fixes the CI half of #153. This is the diagnosed cause of the red Unit gate on #128, #136, #139 and #163.
Diagnosis
CI Unit was red on 13 tests in
packages/cgm_libre2_glucose/test/private_bench_test.dart:The job log carries the tool's own reason on stdout:
{"analyzed":false,"error":"unsupported_platform"}.That is the tool working as designed, not a regression.
tool/analyze_private_bench.dartreads inputs only through_readDescriptorBound, which returnsunsupportedPlatformunlessPlatform.isMacOSand the ABI ismacosArm64/macosX64. ItssecurityFailuredecodes audited Darwinstat64offsets with the note "Only audited Darwin64 ABIs are enabled, never guessed Linux offsets." The suite, however, asserted Darwin analysis results while CI runs it onubuntu-latest, so it could never pass there — which is why it passed on a macOS host and failed on every CI run of this train.Change
private_bench_test.dartcarries@TestOn('mac-os'): every assertion in it describes the audited Darwin path.private_bench_host_scope_test.dart(@TestOn('!mac-os')) asserts the contract every other host gets instead: analysis fails closed with66and{"analyzed":false,"error":"unsupported_platform"}, and the CLI keeps stdout to one redacted JSON line with an empty stderr.The platform scope is proved on both hosts rather than skipped, and no unaudited Linux
statsupport is invented.Verified
make bootstrap,make format-check,make lintexit 0 on this branch.dart testinpackages/cgm_libre2_glucoseon macOS: 33 tests passed.66/unsupported_platform); this PR turns that into the assertion.Base
release/v0.4.0so the aggregate can carry it; the fix also belongs on the libre lane (#119).