Autoadoption logs#2416
Merged
Merged
Conversation
- add scoped setup-log buffering to auto-adoption attempts - merge persisted failure logs from Core and component streams - use existing wizard.auto_adoption_state.adoption_result[component].logs persistence - enable debug-level tracing for defguard_setup::auto_adoption
There was a problem hiding this comment.
Pull request overview
Adds scoped tracing log buffering to auto-adoption attempts so that actionable Core + component-stream logs can be persisted into the existing wizard.auto_adoption_state.adoption_result[component].logs on failures, and enables debug-level tracing for the auto-adoption module.
Changes:
- Scoped Core tracing capture via
scope_setup_logs, and merged Core + component stream logs on failures. - Persist failure logs per component while avoiding persisting logs for successful adoptions.
- Added integration tests asserting per-component failure logs are persisted and include Core debug lines; enabled
defguard_setup::auto_adoption=debugin the main binary log filter.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/defguard_setup/src/auto_adoption.rs | Introduces scoped Core log buffering and merges Core + component logs into persisted failure results. |
| crates/defguard_setup/tests/auto_adoption_wizard.rs | Adds tests validating that per-component failure logs are persisted and include Core debug output. |
| crates/defguard_setup/Cargo.toml | Adds tracing-subscriber as a dev-dependency for the new tests’ tracing initialization. |
| crates/defguard/src/main.rs | Extends the runtime log filter to enable debug logs for defguard_setup::auto_adoption. |
| Cargo.lock | Locks the additional dev dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
moubctez
approved these changes
Mar 23, 2026
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.
Uh oh!
There was an error while loading. Please reload this page.