Skip to content

Make interpreter cache invalidation test deterministic - #22310

Merged
zanieb merged 2 commits into
mainfrom
zb/future-20260912-interpreter-cache-ctime-test
Oct 7, 2026
Merged

zanieb merged 2 commits into
mainfrom
zb/future-20260912-interpreter-cache-ctime-test

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

Consecutive writes to the mock Python executable can retain the same Unix ctime, making test_cache_invalidation fail before exercising cache invalidation. Give the well-formed cached entry a different timestamp so the stale-cache case is independent of filesystem clock resolution.

zaniebot and others added 2 commits September 16, 2026 16:07
Consecutive executable writes can have the same Unix ctime. Give the existing well-formed interpreter cache entry a deliberately different timestamp, then assert that the real query path replaces its stale metadata and reuses the refreshed entry.
@astral-automations-bot astral-automations-bot Bot added internal A refactor or improvement that is not user-facing internal:ci-flake Related to internal CI flakes internal:testing Internal testing of behavior labels Oct 7, 2026
@codspeed

codspeed Bot commented Oct 7, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 6.64%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 60 untouched benchmarks
⏩ 47 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation pip_install 22.2 ms 20.8 ms +6.64%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing zb/future-20260912-interpreter-cache-ctime-test (9a13dd6) with main (1f24ecd)2

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (7248453) during the generation of this report, so 1f24ecd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@zanieb
zanieb merged commit 1ce01af into main Oct 7, 2026
64 checks passed
@zanieb
zanieb deleted the zb/future-20260912-interpreter-cache-ctime-test branch October 7, 2026 19:50

This branch was previously deployed

1 inactive deployment
automations — 9a13dd61 Deployed Oct 7, 2026 by astral-automations-bot[bot] via review / security review #50055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal:ci-flake Related to internal CI flakes internal:testing Internal testing of behavior internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants