Skip to content

fix(release): clean stale build state before first verification build (#649) - #650

Merged
Ulrond merged 1 commit into
developfrom
feature/649-release-clean-first-verification
Jul 5, 2026
Merged

fix(release): clean stale build state before first verification build (#649)#650
Ulrond merged 1 commit into
developfrom
feature/649-release-clean-first-verification

Conversation

@Ulrond

@Ulrond Ulrond commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Closes #649.

Problem

The release verification build (run_verification_build./build_modules.sh manifest) can pass on a developer machine yet fail on a fresh clone:

  • Stale staged headersout/build/include/<dep>/<ver>/include/ is populated incrementally by prior builds, so a missing dependency header (the Build failure in VideoSink (v0.2.0.0) – Missing PropertyValue.h dependency #638 PropertyValue.h case) is invisible to anyone who has already done a full build.
  • Build cacheout/.build-cache skips the verification build entirely when input AIDL hashes are unchanged, even if on-disk staged artefacts are stale.

Net effect: a release could be cut and tagged "having passed verification" without ever proving the cohort builds cleanly from scratch.

Fix

verification_clean_once() runs before the first verification build of a release invocation (guarded to once per run) and performs a targeted clean:

  • rm -rf build/
  • rm -rf out/build/include
  • rm -f out/.build-cache
  • keeps out/target/ (the Binder SDK) — no SDK rebuild, so the clean is fast

The verification build then re-stages all dependency headers from scratch, so release verification reflects a clean-checkout build. Both build_modules.sh manifest and all repopulate out/build/include themselves, so nothing downstream breaks.

Test

  • bash -n scripts/release.sh clean
  • Guard + rm-target behaviour verified in isolation (runs once, removes the three targets, preserves out/target).

…#649)

The verification build (run_verification_build → build_modules.sh manifest)
could pass on a developer machine while failing on a fresh clone, because:

- out/build/include is staged incrementally by prior builds, so a missing
  dependency header (e.g. #638 PropertyValue.h) is invisible once a full
  build has been run; and
- out/.build-cache skips the verification build entirely when input AIDL
  hashes are unchanged, even if staged artefacts are stale.

A release could thus be cut having passed verification without ever proving
the cohort builds from scratch.

Add verification_clean_once(): before the first verification build of a
release run it removes build/, out/build/include and the build cache, while
keeping the Binder SDK in out/target (no SDK rebuild — clean is fast). The
guard ensures it runs once per invocation; later passes reuse the freshly
staged state.
Copilot AI review requested due to automatic review settings June 29, 2026 16:25
@github-project-automation github-project-automation Bot moved this to Architecture Review Required in halif_aidl Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ensures scripts/release.sh release verification builds reflect a clean-checkout build by clearing only the stale staged headers and verification cache once per invocation, without forcing a Binder SDK rebuild.

Changes:

  • Add verification_clean_once() guarded by _VERIFY_CLEAN_DONE to perform a targeted clean (build/, out/build/include, out/.build-cache) once per release run.
  • Invoke the one-time clean at the start of run_verification_build() so the first verification build re-stages headers and does not get skipped by a stale cache.

@Ulrond
Ulrond requested a review from a team July 3, 2026 10:53
@Ulrond Ulrond self-assigned this Jul 3, 2026
@Ulrond Ulrond added the bug Something isn't working label Jul 3, 2026
@Ulrond Ulrond moved this from Architecture Review Required to Under Review in halif_aidl Jul 3, 2026
@Ulrond Ulrond added this to the Next Release milestone Jul 3, 2026
@Ulrond Ulrond added Minor Change Additive, backwards-compatible interface change — bumps minor; the default for real work scope:infrastructure Repo tooling, CI/CD, scripts, governance docs labels Jul 4, 2026
@Ulrond
Ulrond merged commit 343eaa0 into develop Jul 5, 2026
5 checks passed
@Ulrond
Ulrond deleted the feature/649-release-clean-first-verification branch July 5, 2026 08:30
@github-project-automation github-project-automation Bot moved this from Under Review to Resolved in halif_aidl Jul 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working Minor Change Additive, backwards-compatible interface change — bumps minor; the default for real work scope:infrastructure Repo tooling, CI/CD, scripts, governance docs

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

release.sh: clean stale build state before the first verification build

2 participants