fix(gateway): harden cache invalidation and test dependencies - #67785
Closed
KKamJi98 wants to merge 3 commits into
Closed
fix(gateway): harden cache invalidation and test dependencies#67785KKamJi98 wants to merge 3 commits into
KKamJi98 wants to merge 3 commits into
Conversation
The honcho.json parse memo was keyed on (path, st_mtime_ns) alone. Kernel file timestamps come from the coarse clock, so an edit landing in the same tick as the previous write leaves st_mtime_ns unchanged and the memo serves the stale parse. Reproducible on WSL2 where back-to-back write_text() calls observably share one mtime_ns, which is exactly how test_honcho_cache_busting_config_memoized_by_mtime fails there. Add st_size to the memo key so same-tick rewrites that change content length still bust the cache.
_build_agent_with_db stubbed the compressor but left the lazy check_compression_model_feasibility probe live inside _compress_context. That probe makes a real openrouter.ai HTTP call with the fake test key plus a full plugin-discovery pass (~15s+ on WSL2), and its module-global 60s unhealthy-provider cache leaks across tests, so one thread takes the fast cached path while the other is still probing. The serialize test's 15s barrier/join timeouts then expire with neither result recorded (the 'got 0' failure), and the fork file's refresh test misses its 10s compression_started wait. Set _compression_feasibility_checked so the lock-contract tests never leave the process; no timeouts were changed. Also cuts the two files from ~6min to ~50s locally.
Collaborator
Related to closed #46385 for the Honcho memo-key hunk, but this branch also changes WeCom dependency contracts and compression-test isolation. Please consider splitting the independently reviewable surfaces. |
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.
Summary
Validation
No Discord/replay behavior or runtime configuration changes.