Skip to content

docs: fix two broken README snippets and nine stale claims before 2.0.0 - #80

Merged
StuartMeeks merged 1 commit into
mainfrom
docs/readme-2.0-review
Aug 26, 2026
Merged

docs: fix two broken README snippets and nine stale claims before 2.0.0#80
StuartMeeks merged 1 commit into
mainfrom
docs/readme-2.0-review

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Full README review ahead of 2.0.0. Twelve findings; the two code ones were verified by running them, and so were the replacements.

Two snippets that did not work

1. The DPAPI example could not resolve.

services.AddSingleton<ICredentialManager, FileCredentialManager>();   // throws

FileCredentialManager takes a string credentialsDirectory:

InvalidOperationException: Unable to resolve service for type 'System.String'
  while attempting to activate 'FileCredentialManager'.

Replaced with an explicit factory registration — which also passes GetServices<ICredentialSummaryProvider>(). That detail matters beyond compiling: without it the provider columns silently disappear from accounts list. The replacement is verified end to end (add + list, provider columns=1).

2. The custom-encryption advice was backwards, and failed silently.

The README said register your ICredentialEncryption before AddCredentialStore. But AddCredentialStore registers its own, and last registration wins:

registered before AddCredentialStore -> resolved: LocalFileCredentialEncryption

So a custom backend registered first was ignored, and credentials kept using the default — with no error, on a change made specifically to strengthen encryption. That is the worst available failure mode for this particular piece of advice. Now documents after, explains why order matters, and gives a one-liner to verify. Confirmed: resolved=MarkerEncryption.

Stale after this cycle

Missing

  • Cancellation — 2.0.0's headline change, unmentioned.
  • export/import absent from the features list.
  • accounts list marking rows (unreadable).
  • accounts export skips credentials it cannot read and warns. Called out beside the "Fidelity" bullet, which previously read as though everything is always preserved. An archive can be legitimately incomplete — and the reason is worth stating, since exporting a blank payload instead would restore over a real secret at the far end.
  • Providers.GitHub ships at 1.0.1 and was missing from the table — while the worked example teaches you to build a GitHub provider from scratch. Now listed, and the example says so.
  • "Three interfaces" corrected to what the sample actually defines.

Verification

Build clean; no code changed. Both new snippets executed successfully, and all external links resolve.

🤖 Generated with Claude Code

Two examples did not work. Both were verified by running them, and both
replacements verified the same way rather than by inspection.

The DPAPI section registered the manager by type,
AddSingleton<ICredentialManager, FileCredentialManager>(). FileCredentialManager
takes a string credentialsDirectory, so DI throws "Unable to resolve service for
type 'System.String'". Replaced with an explicit factory registration that also
passes GetServices<ICredentialSummaryProvider>() -- without which the provider
columns silently vanish from accounts list even once it resolves.

The custom-encryption-backend section had the order backwards: it said register
before AddCredentialStore. AddCredentialStore registers its own
ICredentialEncryption and the last registration wins, so a custom backend
registered first was silently ignored and credentials stayed on the default.
No error, on a change made specifically to strengthen encryption -- the worst
failure mode available. Now says after, says why order matters, and gives a
one-liner to verify.

Stale claims corrected: the libsecret intro still advertised KWallet and "any
Secret Service implementation" twenty lines above the block declaring KWallet
unsupported; that block still attributed the hang to the missing cancellable,
which #74 disproved by observing the cancellation fire and the call still not
return; "operations will throw" omitted that they can instead block; and
Contributing pointed at now-closed #74.

Missing documentation added: CancellationToken support, which is 2.0.0's
headline; export/import in the features list; the (unreadable) marking in
accounts list; and that accounts export skips credentials it cannot read and
warns -- an archive can be legitimately incomplete, which matters because the
alternative would restore a blank over a real secret.

Providers.GitHub ships at 1.0.1 and was missing from the table, while the worked
example walked readers through writing a GitHub provider from scratch. Listed,
and the example now says it exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@StuartMeeks
StuartMeeks merged commit 703e2c2 into main Aug 26, 2026
11 checks passed
@StuartMeeks
StuartMeeks deleted the docs/readme-2.0-review branch August 26, 2026 05:30
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.

1 participant