Repository navigation
Conversation
scripts/atlas/atlas.ts scan lists the collection's indexes, including any TTL, and prints aggregate counts and vp sizes against the 350 KB sharing limit and DynamoDB's 400 KB item limit. It reads only, takes its connection string from ATLAS_URI in the environment, prints the host but never the credentials, and never prints ids, holder DIDs or credential content. Run it by hand with tsx, now a dev dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Stacked on #285 — review and merge that first.
Adds
scripts/atlas/atlas.ts scan, a read-only report on the credentials collection in MongoDB Atlas, so the 350 KB sharing limit can be checked against real data before the move off Atlas. It is a maintainer's tool run by hand with a read-only database user; it is not part of the app, its build or CI.scan:expireAfterSeconds);createdAtwithin 365 days), and those with a missingcreatedAt,sharedorvpor an id that is not a v4 UUID;vpsize (UTF-8 JSON bytes, the measure the app's limit uses): max, p50, p90, p99, and how many are over 350 KB and over 400 KB, among all documents and among the shared and unexpired;createdAtrange of the shared and unexpired.It takes
ATLAS_URI,ATLAS_DBandATLAS_COLLECTIONfrom the environment only, prints the host but never the user or password, and never prints ids, holder DIDs or credential content. Commands are dispatched from a table, socopyand a synthetic-data generator can be added besidescanlater.tsxis added as a dev dependency to run it. Seescripts/atlas/README.md.Validation
mongo:7with auth on, seeded with 29 Atlas-shaped documents (id,controller,createdAt,vp,shared) covering each count, run as a user with only the built-inreadrole: every count, percentile and date matched the expected values; the seed's marker ids, DIDs and content and the password appeared nowhere in the output; the database profiler recorded onlylistIndexesand onefind.ATLAS_URIexits 2 without echoing it; wrong password and unknown collection exit 1.npm ci,npm test(116 passed, 26 skipped),npx tsc --noEmit.Not yet run against Atlas itself; a maintainer runs it by hand.
🤖 Generated with Claude Code