Skip to content

Avoid repeated Bitwarden listings during harness startup - #101

Merged
JacobStephens2 merged 1 commit into
mainfrom
fix/bitwarden-launch-lookups
Sep 7, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
fix/bitwarden-launch-lookups

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

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:

  • Added a CLI regression that failed before the fix (two listings instead of one) and passes afterward.
  • Covered mixed references, source UUID comments, fresh values across launches, fail-closed errors, manager-token removal, and AGY arguments/cwd.
  • cargo check --all-targets, cargo test, cargo fmt --check, and cargo clippy --all-targets -- -D warnings passed.
  • Standards and spec reviews: zero findings each.

Fixes #100

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
@JacobStephens2
JacobStephens2 merged commit a5b9075 into main Sep 7, 2026
2 checks passed
@JacobStephens2
JacobStephens2 deleted the fix/bitwarden-launch-lookups branch September 7, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitwarden manifest resolution repeats the full secret listing for every named reference, delaying harness startup

1 participant