test: cover macOS keychain metadata#64
Conversation
|
Findings None. Code Quality Lens The diff is tightly scoped to #62: one Darwin+cgo gated empirical test, no public API changes, no formatting changes, and no downstream or release work. The test exercises the intended product path by writing through I reran |
|
b31f490 to
011e619
Compare
|
Minor
Code Quality Lens No blockers or product drift. The added coverage is still scoped to #62, exercises real Keychain metadata, and avoids public API changes. I reran |
011e619 to
6e07882
Compare
|
PR review failed and the daemon has stopped retrying for this commit. I am removing my pending review request to stop the automated review cycle. Re-request @monit-reviewer to retry, or push a new commit and re-request. |
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 6e07882
Manually approved via CLI.
|
Findings None. The review-driven edits stayed within the agreed architecture: the test still writes through I reran |
## Summary - bump cli-common to the immutable pseudo-version containing open-cli-collective/cli-common#64 - add a Darwin+cgo gated empirical test that writes through nrq's keychain adapter with an injected newrelic-cli/<profile> config and inspects ByteNess Keychain metadata for newrelic-cli/<profile>/api_key - keep config/state hermetic while restoring HOME only for real macOS Keychain default-keychain discovery ## Verification - go list -m github.com/open-cli-collective/cli-common - go mod tidy -diff - go test ./internal/keychain - NRQ_KEYCHAIN_METADATA_TEST=1 go test ./internal/keychain -run TestKeychainMetadataGated -count=1 -v - go test ./... - make test - make verify Closes #131
## Summary - bump cli-common to the immutable pseudo-version containing open-cli-collective/cli-common#64 - add a Darwin+cgo gated empirical test for slck Keychain metadata - seed stale metadata for both bot_token and user_token, then verify the adapter overwrite path repairs concrete labels/descriptions ## Verification - go list -m github.com/open-cli-collective/cli-common - go mod tidy -diff - go test ./internal/keychain - SLCK_KEYCHAIN_METADATA_TEST=1 go test ./internal/keychain -run TestKeychainMetadataGated -count=1 -v - go test ./... - make test - make verify Closes #188
Summary
credstore.Store.Setand inspects the real ByteNess Keychain metadata viaGetMetadataservice accountformat used to avoid prompts naming""Existing blank-label Keychain items are not mutated by reads or failed no-overwrite writes. Metadata is present for new items and successful overwrites.
No semver tag/release is being cut here; downstream consumers still need to be verified against this fix before the coordinated release train is considered complete.
Closes #62
Verification
go test ./credstorego test -tags keyring_no1password,keyring_nopassage ./credstoreCREDSTORE_OS_KEYRING_TEST=1 go test ./credstore -run 'TestOSKeyringBackendsGated|TestKeychainMetadataGated' -count=1 -vmake checkgo test -race -tags keyring_nopassage ./...go test -race -tags keyring_no1password,keyring_nopassage ./...