Skip to content

fix(ci): stabilize Android cache and timeout gate#17

Merged
andrescera merged 4 commits into
masterfrom
agent/srt-android-ccache-compiler-content
Jul 14, 2026
Merged

fix(ci): stabilize Android cache and timeout gate#17
andrescera merged 4 commits into
masterfrom
agent/srt-android-ccache-compiler-content

Conversation

@andrescera

@andrescera andrescera commented Jul 14, 2026

Copy link
Copy Markdown
Member

Affected repo & language: srt / GitHub Actions YAML, C++ test, and repository guidance

What

Make Android ccache use content-based NDK compiler identity in a clean versioned namespace, expose compiler/cache identity diagnostics, and make the nonblocking connection-timeout test measure the existing upper bound at the async failure callback instead of after the waiting thread is rescheduled.

Why

The immutable Android key restored the same archive on consecutive trusted runs, but a warm build still produced only 4 hits from 236 cacheable compilations. setup-ndk materializes identical NDK r23 compiler bytes with fresh timestamps, while ccache defaults to mtime-based compiler identity, making restored entries unusable.

The first PR head also exposed a pre-existing macOS timing flake: the timeout event and state were correct, but the waiting test thread resumed 13 ms beyond its post-return wall-clock allowance. Instrumentation reproduced on-time expiry/readiness with delayed caller wakeup, and separately proved that genuinely late timeout publication still violates the unchanged 380 ms bound.

How to verify

  • Run actionlint, parse all workflows as YAML, and run the trigger and deterministic cache-policy checks.
  • Run the full suite and repeat TestConnectionTimeout.Nonblocking 100 times.
  • Confirm the callback reports SRT_ENOSERVER within 300 ± 80 ms and the socket reaches SRTS_BROKEN with SRT_REJ_TIMEOUT.
  • Confirm controlled post-readiness delay does not alter the observed event time, while controlled late readiness exceeds the 380 ms assertion.
  • On trusted master, run Android twice from the same source: the first run must save the exact clean-tree content-v1 key; the second must restore it and report material hits with the same compiler checksum despite a fresh mtime.

Risks

Content identity hashes the compiler once during ccache setup. The new namespace intentionally makes the first trusted build cold. The test keeps the existing 300 ± 80 ms behavior contract and adds callback-error, epoll-result, socket-state, and reject-reason assertions; it does not change runtime code, timeout configuration, C++03 expectations, or release gates.


Checklist

  • Docs updated if behavior or structure changed (Rule A: AGENTS.md)
  • Started from updated master (Rule B)
  • Rule D local-scratch reference check passes for tracked files
  • Relevant workflow lint, YAML, trigger, deterministic timeout, and cache-policy assertions pass

@andrescera andrescera changed the title fix(ci): stabilize Android compiler cache identity fix(ci): stabilize Android cache and timeout gate Jul 14, 2026
@andrescera
andrescera force-pushed the agent/srt-android-ccache-compiler-content branch from 99eb6bf to 4fbda26 Compare July 14, 2026 02:49
@andrescera
andrescera merged commit 9a291c4 into master Jul 14, 2026
14 checks passed
@andrescera
andrescera deleted the agent/srt-android-ccache-compiler-content branch July 17, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant