Skip to content

tools/run_tests.sh: add build-staleness gate - #47

Merged
Thrameos merged 1 commit into
masterfrom
backport/run-tests-staleness-check
Sep 6, 2026
Merged

Thrameos merged 1 commit into
masterfrom
backport/run-tests-staleness-check

Conversation

@Thrameos

@Thrameos Thrameos commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Running tests against a stale native/Java build after a source edit produces output indistinguishable from a real regression -- has repeatedly cost real debugging time chasing bugs that were actually just an old binary.
  • Adds a check_stale_build gate that fails loudly with a grep-able STALE_BUILD_ERROR: line when libjcef.so or the compiled Java classes are older than their sources. JCEF_SKIP_STALE_CHECK=1 overrides when needed.
  • Backport of coverage/phase1-value-objects-phase2-handlers' bd7bff1, infra-only, no test-visible behavior change beyond the new guard. Independent of PR tools/run_tests.sh: fix --select-class scope leak; make leak-sweep opt-in only #44 (different section of the same file: that PR fixes --select-class scope-leak + leak-sweep opt-in, this adds the staleness check inserted earlier in the script).

Test plan

  • bash -n tools/run_tests.sh (syntax check)
  • Isolated logic check of check_stale_build() against synthetic old/new mtimes -- correctly fails when source is newer than artifact, passes when artifact is newer
  • CI (build/test/coverage jobs)

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq

Running tests against a stale native/Java build after a source edit
produces output indistinguishable from a real regression, and has
repeatedly cost real debugging time chasing bugs that were actually
just an old binary. Fail loudly with a grep-able STALE_BUILD_ERROR:
line instead. JCEF_SKIP_STALE_CHECK=1 overrides when needed.

Backport of coverage/phase1-value-objects-phase2-handlers' bd7bff1.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq
@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.99%. Comparing base (be68fe1) to head (c39d378).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #47      +/-   ##
============================================
- Coverage     38.01%   37.99%   -0.03%     
+ Complexity      735      732       -3     
============================================
  Files           243      243              
  Lines         14863    14863              
  Branches       2449     2449              
============================================
- Hits           5650     5647       -3     
- Misses         8011     8012       +1     
- Partials       1202     1204       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Thrameos Thrameos added the enhancement New feature or request label Sep 6, 2026
@Thrameos
Thrameos merged commit 3254528 into master Sep 6, 2026
9 checks passed
@Thrameos
Thrameos deleted the backport/run-tests-staleness-check branch September 6, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant