ci(macos-amd64): flip checked-in gate from must-stay-broken to must-pass - #83
Conversation
…pass Deliverable (B) of the macos-amd64 libgc-dylib-pairing plan, following vlang/v#27982 (deliverable A, merged): vlang/v's update_tccbin.yml now rebuilds libgc.dylib in lockstep with every tcc.exe rebuild for this platform, mirroring macos-arm64's already-proven dylib+rpath pattern, instead of silently preserving a stale libgc.a across every rebuild. The "verify the checked-in tcc.exe (as distributed, before rebuild)" step previously hard-failed if the checked-in pair unexpectedly passed the conformance suite, because until now it genuinely could not (ancient v0.9.27 tcc.exe, broken libc.dylib symlink, static-only libgc.a). That assumption no longer holds and would immediately misfire the moment a correct pair is published. This strengthens the gate rather than relaxing it: split into five steps mirroring the already-proven shape used below for the freshly-rebuilt copy - tcc.exe executable-bit check, independent libgc.dylib symlink/install-name re-verification, libgc.a archive validation (now fat-or-thin aware via `lipo -archs`, since a pair published through vlang/v's amd64-native rebuild is expected to be a thin x86_64-only archive, unlike the FAT universal binary this replaces), a blocking dylib lane, a blocking no-GC fallback lane, and a signature- checked XFAIL-only static lane - each one now required to actually PASS instead of required to fail a specific known way. Note: this PR's own CI run is expected to fail against the current tip of thirdparty-macos-amd64, since the checked-in pair hasn't been replaced by vlang/v#27982's producer-side fix yet (that publish is intentionally gated behind vlang/v's MACOS_AMD64_LIBGC_PUBLISH_UNLOCKED repo variable until this PR lands). Merging this PR is expected to keep CI red until the real publish happens next. Co-Authored-By: WOZCODE <contact@withwoz.com>
The libgc.dylib check's expected failure (pre-publish) was skipping this step entirely by default, so the new lipo-archs-based fat-or-thin detection never actually ran against the real checked-in archive in this PR's own validation run. It validates a wholly separate file (libgc.a, not libgc.dylib) - a dylib-check failure shouldn't hide whether the archive is also fine or also broken, mirroring the !cancelled() pattern already used below for the no-GC/static-XFAIL lanes. Co-Authored-By: WOZCODE <contact@withwoz.com>
|
CI results from the two runs so far, both against the current, still-unpublished tip of this branch - as noted above, this is expected to be red until the real publish happens:
Everything else in both runs is an expected, transient symptom of testing binaries that predate vlang/v#27982's publish, not a new bug:
No unexpected failures in either run - everything traces back to the single, correctly-identified root cause (the real pair hasn't published yet), plus one now-fixed gap in test independence. |
|
Great work, is exactly the gate we needed. Once it is merged, we will take care of the vlang/v side and the safe publication process. Thanks! |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Deliverable (B) of the macos-amd64 libgc-dylib-pairing plan, following vlang/v#27982 (deliverable A, merged):
vlang/v'supdate_tccbin.ymlnow rebuildslibgc.dylibin lockstep with everytcc.exerebuild for this platform, mirroring macos-arm64's already-proven dylib+rpath pattern, instead of silently preserving a stalelibgc.aacross every rebuild.The
verify the checked-in tcc.exe (as distributed, before rebuild)step previously hard-failed if the checked-in pair unexpectedly passed the conformance suite - because until now it genuinely could not (ancient v0.9.27tcc.exe, brokenlibc.dylibsymlink, static-onlylibgc.a). That assumption no longer holds and would immediately misfire the moment a correct pair is published.This strengthens the gate; it does not relax anything. Split the single step into five, mirroring the shape already proven below for the freshly-rebuilt copy:
verify the checked-in tcc.exe is executable(unchanged logic, split out)verify the checked-in libgc.dylib(new - independent symlink/install-name re-verification, same principle already applied invlang/v'sthirdparty-macos-amd64_bdwgc_validate.sh)verify the checked-in libgc.a is a well-formed x86_64 archive(adapted - now fat-or-thin aware vialipo -archs, since a pair published throughvlang/v's amd64-native rebuild is expected to be a thin x86_64-only archive, unlike the FAT universal binary this replaces;lipo -thinfails outright on an already-thin input, so it's now only invoked when the archive is actually fat)run shared conformance tests against the checked-in pair (libgc.dylib, dynamic - blocking)(new - was previously untested against the static-only checked-in archive)verify no-GC fallback path against the checked-in pair(new)run shared conformance tests against the checked-in pair (libgc.a, static - XFAIL)(adapted from the old must-fail assertion - tcc's Mach-O archive-parsing limitation is a property of tcc itself vs. a modern-toolchain-built static archive, independent of whether that archive is checked-in or freshly rebuilt, so this lane is expected to keep failing this one specific way even after the dylib pairing lands, exactly as already proven for the freshly-rebuilt copy)thirdparty-macos-amd64. The checked-in pair hasn't been replaced by vlang/v#27982's producer-side fix yet - that publish is intentionally gated behindvlang/v'sMACOS_AMD64_LIBGC_PUBLISH_UNLOCKEDrepo variable until this PR lands (to avoid the reverse problem: a correct pair getting auto-published by the monthly cron while this gate still expected brokenness). Merging this PR is expected to keep CI red on this branch until the real publish happens next - that's the intended state, not a bug in this PR.Suggested sequence
vlang/v, set the repo variableMACOS_AMD64_LIBGC_PUBLISH_UNLOCKEDtotrue.vlang/v'supdate_tccbin.ymlwithpublish=true force_rebuild=true, using the exact TinyCC/bdwgc/libatomic_ops SHAs already validated in vlang/v#27982's fork run, to push the real pair to this branch.builtin_d_gcboehm.c.v).Test plan
yaml.safe_load) and every step's shell script syntax-checked (bash -n) locally - done.lipo -archs-based fat/thin detection logic verified in isolation for all four cases (fat with x86_64 present, thin x86_64, thin arm64-only correctly rejected, fat with reversed arch order) - done,lipoitself unavailable outside macOS so this couldn't be exercised end-to-end locally.