Skip to content

ci: record compact execution logs on preflight and quality-matrix, and diff two runs to name cache-miss causes - #13781

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud/13724
Nov 19, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud/13724

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Linked Issue

Part of #13724

Changes

  • .github/workflows/ci.yml: the preflight launch smoke and the quality-matrix test step pass --execution_log_compact_file=$RUNNER_TEMP/exec-log/<step>.log. A secret scan (if: always()) and an upload follow, as exec-log-<job>-<platform>, kept for 7 days.
  • tools/testing/src/exec_log.rs: new ExecLog parser reads each spawn's args (1), env (2), input/tool sets (4/5), runner (11), cache_hit (12), remote_cacheable (15), digest (16) and metrics.total_time (18.1). inputs() resolves input sets (entry 6, packed or unpacked ids, transitive sets), directories (expanded to child files) and runfiles trees (entry 10, plus the _repo_mapping manifest) to path → digest. read/problems keep their behaviour.
  • exec_log::diff plus determinism_check diff <first> <second> [--top N] (default 20): prints the slowest spawns that ran in the second log, keyed <label> <mnemonic> <first output>. Each one shows the inputs (first 20, then a count), args and env that differ from the first log. When nothing differs, it says why the spawn could not hit: not remote cacheable, no matching spawn in the first log, or the same action whose result never reached the cache. Test spawns carry no digest, so their inputs are compared directly.
  • New fixtures exec_log_fixtures/cache_{first,second}.log.zst (Bazel 9.3.1, recipe in the module doc) hold a disk-cache hit, a miss caused by a changed input, and a no-cache spawn.
  • .github/workflows/README.md: how to download two exec-log-* artifacts and diff them.

I also checked the reader against a real repo log: I ran //tools/testing:determinism_check_test twice with different --test_env. The diff named env PROBE: a -> b on the TestRunner spawn and resolved its runfiles tree.

Still open on #13724: the launch-heavy job (only in draft #13727 so far) needs the same flag and upload. The "done" evidence also needs two consecutive main runs on macos_arm64.

Verification

Tested: bazel test //tools/testing:dx_testing_test //tools/testing:determinism_check_test //tools/ci:secret_flags_test //tools/ci:workflow_files_test //tools/ci:actionlint_test //tools/ci:workflow_expressions_test //tools/ci:input_validation_test //tools/ci:determinism_allowlist_test all pass. tools/dx check --apply on the touched files exits 0. It also regenerated unrelated deps in tools/testing/BUILD.bazel; I reverted that.

//tools/ci:prose_rules_test (docs/design/tool-prebuilts.md 1363 words) and //tools/ci:zero_compat_test (cli/shim, android/repositories.bzl and others) fail on files this PR does not touch. Both are main failures.

Not run: tools/dx check --affected / tools/dx test --affected, and the CI workflow itself.


Generated by Claude Code

…d diff two runs to name cache-miss causes (part of #13724)

- ci.yml: the preflight launch smoke and the quality-matrix test step write
  --execution_log_compact_file and upload it as exec-log-<job>-<platform>
  (7 days, if: always() behind the secret scan).
- exec_log.rs: parse runner, cache_hit, remote_cacheable, digest, total time,
  args and env of each spawn, and resolve input sets, directories and
  runfiles trees to file digests.
- determinism_check diff <first> <second> [--top N]: prints the slowest
  spawns that ran in the second log with the inputs, args and env that
  differ, or why the spawn could not hit the cache.
- New fixtures cache_first/cache_second hold a disk cache hit, a miss from a
  changed input and a no-cache spawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hz39bWaDqidVSvFZuj
@TrapsterDK TrapsterDK added the train Tested; land via merge train label Nov 19, 2026 — with Claude
@TrapsterDK
TrapsterDK merged commit 729fd57 into main Nov 19, 2026
4 of 5 checks passed
@TrapsterDK
TrapsterDK deleted the cloud/13724 branch November 19, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

train Tested; land via merge train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants