Skip to content

Consolidate run_hash and KARVA_RUN_ID into a single identifier#769

Merged
MatthewMckee4 merged 3 commits into
mainfrom
worktree-ticklish-orbiting-pancake
May 6, 2026
Merged

Consolidate run_hash and KARVA_RUN_ID into a single identifier#769
MatthewMckee4 merged 3 commits into
mainfrom
worktree-ticklish-orbiting-pancake

Conversation

@MatthewMckee4
Copy link
Copy Markdown
Owner

Summary

Closes #729. The runner used to mint two identifiers per karva test invocation: run_hash (a millisecond timestamp encoded into the cache directory name and used as a sort key for read_recent_durations / prune_cache), and KARVA_RUN_ID (a UUID v4 exposed to test code for log and artifact correlation). Two identifiers doing nearly the same job meant "where do I get the run id?" had two answers.

RunHash now carries both a millisecond timestamp and a UUID v4. The cache directory becomes run-<ms>-<uuid> so the timestamp prefix preserves the chronological sort that prune and read-recent-durations rely on, and KARVA_RUN_ID becomes the bare <ms>-<uuid> form, derived from the same source of truth. As a side benefit, dense CI matrices that start multiple runs in the same millisecond no longer collide on the cache directory.

from_existing continues to accept legacy run-<ms> directories on disk: a missing UUID falls back to Uuid::nil() and an unparseable timestamp falls back to 0, so prune cleans those up first rather than panicking.

Test plan

ci

@MatthewMckee4 MatthewMckee4 added the internal An internal refactor or improvement label May 6, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 6, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 1 untouched benchmark


Comparing worktree-ticklish-orbiting-pancake (89ab32f) with main (2cc8ff8)

Open in CodSpeed

@MatthewMckee4 MatthewMckee4 merged commit eb3c800 into main May 6, 2026
13 checks passed
@MatthewMckee4 MatthewMckee4 deleted the worktree-ticklish-orbiting-pancake branch May 6, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate run_hash and KARVA_RUN_ID into one identifier

1 participant