fix(ci): stabilize Android cache and timeout gate#17
Merged
Conversation
andrescera
force-pushed
the
agent/srt-android-ccache-compiler-content
branch
from
July 14, 2026 02:49
99eb6bf to
4fbda26
Compare
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.
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-ndkmaterializes 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
TestConnectionTimeout.Nonblocking100 times.SRT_ENOSERVERwithin 300 ± 80 ms and the socket reachesSRTS_BROKENwithSRT_REJ_TIMEOUT.master, run Android twice from the same source: the first run must save the exact clean-treecontent-v1key; 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