test(registry): seed live buckets with a real space DID - #88
Merged
Conversation
Get parses the bucket's space column into a did.DID, so the '' sentinel the seed inserted now fails the parse and takes three subtests down with it. Give each seeded bucket a random DID and assert the round-trip instead of the empty default. The claim-count subtest also generated a fresh DID for its second space on every use, so the count query looked up a space nothing was written under; hold it in a variable and reuse it. Assisted-by: Claude:claude-opus-5 Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Copilot stopped reviewing on behalf of
bajtos due to an error
August 17, 2026 14:17
alanshaw
approved these changes
Aug 17, 2026
alanshaw
reviewed
Aug 17, 2026
| r := registry.NewPostgres(pool) | ||
| seedBucket := func(t *testing.T, name string) { | ||
| // seedBucket inserts a bucket row directly, bypassing Create, and returns | ||
| // the space it was given. space has no default — Create always supplies |
Member
There was a problem hiding this comment.
Suggested change
| // the space it was given. space has no default — Create always supplies | |
| // the space DID it generated. space has no default — Create always supplies |
Member
Author
There was a problem hiding this comment.
Since this PR was already merged when the suggestion came in, it's applied in a follow-up PR: #89
Generated by Claude Code
bajtos
added a commit
that referenced
this pull request
Aug 18, 2026
…nerated (#89) Apply alanshaw's review suggestion from #88: seedBucket generates the space DID itself rather than receiving one, so say so. Claude-Session: https://claude.ai/code/session_016pXpui5gkkB5S4Kc82CoQy Co-authored-by: Claude <noreply@anthropic.com>
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.
Fix the three tests failing on the
mainbranch:Get parses the bucket's space column into a did.DID, so the '' sentinel the seed inserted now fails the parse and takes three subtests down with it. Give each seeded bucket a random DID and assert the round-trip instead of the empty default.
The claim-count subtest also generated a fresh DID for its second space on every use, so the count query looked up a space nothing was written under; hold it in a variable and reuse it.