Skip to content

fix: make render test logging initialization idempotent - #13889

Merged
bnavetta merged 1 commit into
masterfrom
oz-agent/implement-issue-13853
Jul 17, 2026
Merged

bnavetta merged 1 commit into
masterfrom
oz-agent/implement-issue-13853

Conversation

@warp-for-oss

@warp-for-oss warp-for-oss Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Closes #13853

Summary

  • Updated the warp_editor render test logging helper to use try_init() instead of init().
  • Preserved the existing warp_editor=trace test filter when this helper wins logger initialization.
  • Ignored SetLoggerError when another test has already installed the process-global logger, removing the full-suite-only test-order failure.

Validation

  • ./script/format
  • cargo test -p warp_editor (478 passed)
  • cargo clippy -p warp_editor --all-targets --all-features --tests -- -D warnings
  • cargo clippy --workspace --all-targets --all-features --tests -- -D warnings was attempted, but failed on unrelated existing unused/dead-code errors in app/src/terminal/* and app/src/lib.rs.

Notes

  • No approved spec context was supplied for this issue.

Co-Authored-By: Oz <[email protected]>

Co-Authored-By: Ben Navetta <[email protected]>
@fbartho

fbartho commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Independently reached the same diagnosis before spotting this PR: reproduced the 8 full-suite-only failures on master (first panic is the SetLoggerError inside the Once closure — a logger-install collision with the try_init() helper in content/find_tests.rs — and the other 7 are the poisoned-Once fallout), and arrived at this exact diff.

Verified with it applied: 479/479, twice in a row, clippy/fmt clean.
Fixes: #13853. Let's ship this!

(Note, as an external-contributor, I don't have maintainer access, or the ability to mark this fix as a non-draft, or the ability to formally review this)

@fbartho

fbartho commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

/oz-review

@warp-for-oss

warp-for-oss Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@fbartho

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@warp-for-oss warp-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR makes the render test logging helper tolerate a process-global logger that may already be initialized by switching from env_logger::init() to try_init() while preserving the existing test filter when this helper initializes logging first.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the provided diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@bnavetta
bnavetta marked this pull request as ready for review July 17, 2026 23:31
@warp-for-oss

warp-for-oss Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@bnavetta

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@bnavetta
bnavetta enabled auto-merge (squash) July 17, 2026 23:32

@warp-for-oss warp-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR makes the warp_editor render test logging helper idempotent by switching process-global logger setup from init() to try_init() while preserving the warp_editor=trace filter when this helper installs the logger.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found. The attached spec context states no approved or repository spec context was available for this PR.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@bnavetta
bnavetta merged commit 7867010 into master Jul 17, 2026
43 checks passed
@bnavetta
bnavetta deleted the oz-agent/implement-issue-13853 branch July 17, 2026 23:48
iamwavecut pushed a commit to iamwavecut/warp that referenced this pull request Jul 18, 2026
…3889)

Closes warpdotdev#13853

## Summary
- Updated the `warp_editor` render test logging helper to use
`try_init()` instead of `init()`.
- Preserved the existing `warp_editor=trace` test filter when this
helper wins logger initialization.
- Ignored `SetLoggerError` when another test has already installed the
process-global logger, removing the full-suite-only test-order failure.

## Validation
- `./script/format`
- `cargo test -p warp_editor` (478 passed)
- `cargo clippy -p warp_editor --all-targets --all-features --tests --
-D warnings`
- `cargo clippy --workspace --all-targets --all-features --tests -- -D
warnings` was attempted, but failed on unrelated existing
unused/dead-code errors in `app/src/terminal/*` and `app/src/lib.rs`.

## Notes
- No approved spec context was supplied for this issue.

Co-authored-by: Oz <[email protected]>
Co-authored-by: Ben Navetta <[email protected]>
kessler-frost added a commit to kessler-frost/rift that referenced this pull request Jul 20, 2026
render/model/test_utils.rs called env_logger::...init() while
content/find_tests.rs already called try_init(). Sharing one test binary,
whichever lost the race panicked with SetLoggerError -- and because the guard
is a parking_lot::Once, that panic poisoned it, cascading into 8 failures.

`cargo test -p rift_editor --lib` was 419 passed / 8 failed before this and is
427 / 0 after. CI never caught it because nextest forks per test, but
CLAUDE.md's own port-verification bar prescribes `cargo test -p <crate>`.

Ported from warpdotdev/warp#13889.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
zhangyu1818 added a commit to zhangyu1818/warply that referenced this pull request Aug 3, 2026
…pdotdev#13889)

Port upstream fix so render-test logging uses try_init() instead of init(),
ignoring SetLoggerError when another test already installed the global
logger. Removes full-suite-only test-order failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warp_editor: 8 render::tests fail when the full crate test suite runs together; each passes in isolation

3 participants