Avoid repeated Bitwarden listings during harness startup - #101
Merged
Merged
Conversation
Resolve name and project references through one lazy snapshot of parsed lookup metadata. UUID references skip listing, each mapping still fetches its value, and every resolution starts with fresh lookup state. Add CLI regression coverage for bounded backend calls, mixed references, source recordings, fresh values, fail-closed errors, and child contracts. Clarify the listing lifetime and remaining get overhead in the README. Validation: - Regression failed before the change: 2 listings instead of 1. - Targeted CLI tests, cargo check --all-targets, cargo test, cargo fmt --check, and cargo clippy --all-targets -- -D warnings pass. - Standards and Spec reviews: 0 findings each. Live macOS comparison using the same 23-name/2-UUID manifest and timing wrapper, two runs per binary, reversing order on the second pair: - Installed v0.4.21: 12.946/13.173s, 23 list + 25 get calls. - Optimized local build: 6.530/5.171s, 1 list + 25 get calls. - Remaining get calls took 5.207/4.024s; startup is not at bare AGY parity. Only command verbs, durations, and status were recorded, never secrets. An extra uninstrumented baseline failed then succeeded on retry; it is excluded from the comparison above. Fixes #100
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.
Bitwarden harness launches were listing the full vault separately for every named or project-qualified reference. Reuse parsed lookup metadata within one manifest resolution. UUID-only and empty manifests skip listing, and every launch still fetches current secret values.
With the reported 23 named references and two UUID references, backend calls fell from 48 to 26. Two live runs per build, using identical timing instrumentation, measured 12.9–13.2 seconds before and 5.2–6.5 seconds after. The remaining 25 value fetches account for roughly 4–5 seconds.
Validation:
cargo check --all-targets,cargo test,cargo fmt --check, andcargo clippy --all-targets -- -D warningspassed.Fixes #100