Skip to content

test(registry): seed live buckets with a real space DID - #88

Merged
bajtos merged 1 commit into
mainfrom
fix-failing-tests
Aug 17, 2026
Merged

test(registry): seed live buckets with a real space DID#88
bajtos merged 1 commit into
mainfrom
fix-failing-tests

Conversation

@bajtos

@bajtos bajtos commented Aug 17, 2026

Copy link
Copy Markdown
Member

Fix the three tests failing on the main branch:

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.

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 AI lite review requested due to automatic review settings August 17, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@bajtos
bajtos merged commit 2fb6627 into main Aug 17, 2026
10 of 12 checks passed
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
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.

3 participants