fix(test): use CARGO_MANIFEST_DIR for test config & stronghold paths - #385
Merged
Conversation
📝 WalkthroughWalkthroughTest utilities now resolve Stronghold and provisioned configuration fixtures relative to package manifests. ADR 0003 documents hermetic testing practices, including in-memory unit tests and explicit configuration injection. ChangesHermetic testing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nanderstabel
marked this pull request as ready for review
July 30, 2026 07:57
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent_secret_manager/src/lib.rs`:
- Around line 28-35: Update the test-utils path setup in
agent_secret_manager/src/lib.rs:28-35 to copy the manifest fixture to a unique
per-test temporary Stronghold path or serialize all Stronghold access,
eliminating shared mutable fixture and password collisions. Update
docs/adr/0003-hermetic-test-architecture-and-config-decoupling.md:40-41 to limit
the rationale to CWD-independent lookup and document per-test Stronghold
isolation as a separate requirement.
In `@docs/adr/0003-hermetic-test-architecture-and-config-decoupling.md`:
- Around line 40-41: Update the “Speed & Parallelism” rationale in the ADR to
remove claims that manifest-relative resolution eliminates disk contention or
password collisions. Describe the current change as fixing CWD-relative lookup
failures, and track per-test Stronghold isolation as a separate follow-up while
shared Stronghold storage remains in test_utils.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 49edb37c-f486-40da-9b27-c889c4a6425e
📒 Files selected for processing (3)
agent_secret_manager/src/lib.rsagent_shared/src/config/provisioned.rsdocs/adr/0003-hermetic-test-architecture-and-config-decoupling.md
daniel-mader
approved these changes
Jul 30, 2026
7 tasks
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.
Description of change
Uses
CARGO_MANIFEST_DIRto resolvetest.config.yamlandtest.stronghold.datpaths at compile time. This fixes test lookup failures when running unit tests from outer workspace roots or nested subcrates where current working directories differ. Also added ADR 0003 documenting test path resolution standards.Links to any relevant issues
N/A
How the change has been tested
_core/ssi-agentroot (UNICORE__PROFILE=development cargo test --all).Definition of Done checklist
Add an
xto the boxes that are relevant to your changes.Summary by CodeRabbit
Bug Fixes
Documentation