Repository navigation
test(lifecycle): I9 skips logging records on stderr only for verbose or debug runs - #4370
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 20, 2026
Merged
Conversation
…erbose or debug runs (#4113) A run with -v/--verbose or APM_DEBUG asked for logging records ('DEBUG apm_cli.core.token_manager ...'); their repeats are diagnostics, not user output. In a default run the same repeated record still fails I9. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 15:15
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The lifecycle check reads pytest’s environment instead of the child command’s explicit environment, causing incorrect I9 results when their APM_DEBUG settings differ.
1 open issue
What changed in this PR
This test-infrastructure change refines the lifecycle output oracle from #4113 to allow repeated Python logging records during diagnostic runs while preserving duplicate detection for default runs.
Changes:
- Filters matching
DEBUGandINFOrecords from stderr before the I9 noise check when verbose flags orAPM_DEBUGindicate diagnostics. - Adds regression tests for verbose-run acceptance and default-run rejection.
| File | Description |
|---|---|
tests/utils/lifecycle_evidence.py |
Adds diagnostic-mode detection and stderr logging-record filtering. |
tests/unit/scripts/test_lifecycle_evidence.py |
Tests repeated logging records in verbose and default runs. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-t1-oracle-cells-2
branch
November 20, 2026 15:20
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4370 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4370 Co-authored-by: Copilot App <[email protected]>
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.

Refs #4113
Why
Integration runs with
--verbose(orAPM_DEBUG) emit Python logging records on stderr, for exampleDEBUG apm_cli.core.token_manager gh auth token failed for github.com: ..., and the same record can print twice. The global output oracle's I9 then reports "stderr repeats a line", which kept main red on #4137's integration run.Change
output_violationsdrops stderr lines that look like Python logging records (DEBUG|INFO <logger.name> ...) before it runs the I9 noise check, but only when the run itself asked for diagnostics:-vor--verbosein the arguments, orAPM_DEBUGset. A default run still fails I9 on the same repeated record (steward condition).Validation
test_logging_records_repeat_freely_on_a_verbose_runandtest_logging_records_still_fail_i9_on_a_default_run.pytest tests/unit/scripts/test_lifecycle_evidence.py -k "logging_records or rejects_each or known_output": 18 passed.Out of scope