450#457
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #450
Wires
DisplayModeintoDisplay for Error— error output now adapts to the deployment environment, as the README originally promised.Behavior
MASTERROR_ENV=prod/ k8s / release buildMASTERROR_ENV=stagingsource_chain, no ANSIMASTERROR_ENV=local/ debug buildcoloredstyles this layout onlyMode is detected once per process and cached;
MASTERROR_ENV=localis the escape hatch for in-cluster CLI tools; withoutstdthe mode falls back to build profile.Redaction fixes (security-relevant)
HashandLast4fields raw — now sha256 hex / masked (field omitted when masking yields nothing)Redactfields render as a[REDACTED]placeholder (consistent with ProblemJson) instead of being silently omittedMessageEditPolicy::Redact(previously printed everything raw)pub(crate)redaction module used by both Display and ProblemJson — one source of truthBreaking (0.x behavior change, targeted at 0.29.0)
Default (non-colored)
Displayoutput changes from a one-line kind label to the mode-appropriate layout. The stable short form remainserror.kind's Display. Log-parsing consumers should pinMASTERROR_ENV.Tests
Per-mode dispatch tests via a test-only RAII mode override (no env mutation in-process; a dedicated single-test integration binary exercises the real
MASTERROR_ENVpath), full redaction matrix per layout, strengthened caching test. Rebased over #451'sStoredSourcestorage and re-verified: 1451+ tests, doctests, no_std build, clippy zero warnings, nightly fmt, readme_sync — all green.