Repository navigation
Fix two cache compatibility checks - #8
Merged
Merged
Conversation
The repository has no workflow that builds Traffic Server or runs its tests, so changes get no automated verification on GitHub. Add one covering the license audit, formatting, the build with its unit tests, the end to end AuTests sharded four ways, and the documentation build. Several choices are not obvious and are commented in the file. AuTests run on the bare runner rather than in a container, because every MakeATSProcess binds an IPv6 port and the Actions Docker bridge has IPv6 disabled; a preflight fails fast with a clear message otherwise. The build is installed before ctest, because the plugin verification tests exec traffic_server, which chdirs to the install prefix. nc comes from nmap ncat, matching the Fedora images upstream uses, because accept_timeout needs its -c to behave the way ncat's does. Cripts is enabled, because the connection_exempt_list plugin is written in Cripts and tests that load it fail at start up without it. A failing test is retried once on its own before the shard fails, and both the retry and the eventual pass are reported as warnings, so a genuinely flaky test stays visible rather than being absorbed silently. The http2 test is fixed here rather than separately, because without it this workflow cannot be green on the platform it runs on. It built its curl command with the bash only |& operator, and AuTest runs commands through /bin/sh, which is bash on the Fedora images upstream uses but dash on Ubuntu, where it fails to parse and curl never runs. The POSIX 2>&1 | merges the streams the same way on both, and this was the only use of |& in the test suite. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01Xp4ZMfVaT5EzvZsyMTx2y5
The exit status came from the failure counts parsed out of each worker's output, and ignored the workers' own return codes. A worker that ran forty tests and then died contributes no failures of its own, so the shard was reported green having silently skipped whatever it had left to run. The only existing backstop fires when a worker ran nothing at all. Count the return codes too, and name the workers that exited non zero. This matters most exactly when something has already gone wrong. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01Xp4ZMfVaT5EzvZsyMTx2y5
Neither of these misbehaves today. Both are wrong in a way that only shows up once the cache minor version moves, which makes them easy to trip over. unmarshal_helper picks HTTPInfo::unmarshal_v24_1 for any object older than CACHE_DB_VERSION. That constant is standing in for the 24.2 boundary, which is where HTTPInfo's marshalled layout actually changed. The two happen to coincide right now. Bumping the minor version parts them, and every existing object would then be read with the wrong unmarshaller. Pin the comparison to the version it describes. load_http_info recomputes the well known string indices persisted in marshalled headers for objects written by an older version, and skipped anything coming from the RAM cache on the grounds that it was already fixed up. That does not hold when the RAM cache is compressed: those entries are stored still marshalled and decompressed into a fresh buffer on every hit, so the indices stay stale. The work is bounded to objects written by an older version either way. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01Xp4ZMfVaT5EzvZsyMTx2y5
JakeChampion
force-pushed
the
claude/autest-portability
branch
from
August 22, 2026 09:29
1cc0813 to
b3ae2ff
Compare
JakeChampion
force-pushed
the
claude/cache-compat-fixes
branch
from
August 22, 2026 09:30
14cb4b8 to
9e54faa
Compare
JakeChampion
marked this pull request as ready for review
August 22, 2026 10:17
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.
Draft. PR 3 of 4 — sits on #7. Prerequisite for the cache version bump in #5.
Two latent bugs in the cache compatibility path. Neither misbehaves today. Both are wrong in a way that only shows up once
CACHE_DB_MINOR_VERSIONmoves, which makes them easy to trip over — #5 moves it, which is how they were found.The
HTTPInfocompat check is pinned to a moving constantunmarshal_helperpicks the legacy unmarshaller for anything older than the current version:CACHE_DB_VERSIONis standing in for the 24.2 boundary, which is whereHTTPInfo's marshalled layout actually changed (#4874). The two coincide right now, at 24.2, so it works.Bump the minor version and they part: every existing 24.2 object then reads as "older than current" and goes down
unmarshal_v24_1— the wrong unmarshaller for its layout. Pinning the comparison to a fixedCACHE_DB_VERSION_HTTPINFO_V24_2keeps it describing the one format change it is about.The RAM cache skips the well-known-string fixup when compressed
load_http_inforecomputes the WKS indices persisted in marshalled headers for objects written by an older version, and skipped anything from the RAM cache:That comment does not hold when
proxy.config.cache.ram_cache.compressis set. Compressed entries are stored still marshalled and decompressed into a fresh buffer on every hit, soalt->m_magic == MARSHALEDagain and the indices are stale again — the recompute has to run each time. The work stays bounded to objects written by an older version either way.The consequence is subtle and only bites after a token-table change:
field_find()on a cached header consults the wrong presence bit and slot accelerator, so a header reads as absent or as a different header entirely.Builds and passes 172/172 unit tests standalone on this branch, without the version bump that motivated finding them.
Generated by Claude Code