feat: add simplified Space API and unit test infrastructure#34
Merged
jimmieme merged 2 commits intoao-space:devfrom Feb 7, 2026
Merged
feat: add simplified Space API and unit test infrastructure#34jimmieme merged 2 commits intoao-space:devfrom
jimmieme merged 2 commits intoao-space:devfrom
Conversation
- Add SpaceResource for simplified space registration API - Add SpaceRegistryInfo and SpaceRegistryResult DTOs - Add mock implementations for Redis-dependent tests: - MockGTRClient: in-memory replacement for Redis GT routes - MockNSRClient: in-memory replacement for Redis network routes - MockDistributedLockFactory: in-memory lock for tests - Add unit tests: BasicResourceTest, NetworkResourceTest, SpaceResourceTest - Update README with contributing guidelines Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix registryBox call to include 4th parameter (networkSecretKey) - Fix registerSpace to return plaintext network secret instead of hash - Update MockDistributedLockFactory to use real MySQL locks for MySQL type Co-Authored-By: Claude Opus 4.5 <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.
Summary
POST /v2/platform/spaces)Changes
New Simplified API
SpaceResource.java: New REST endpoint for simplified space registrationSpaceRegistryInfo.java: Request DTO for space registrationSpaceRegistryResult.java: Response DTO with network credentialsRegistryService.registerSpace(): One-step registration combining box, user, andclient registration
Test Infrastructure
MockGTRClient.java: In-memory mock for Redis GT route clientMockNSRClient.java: In-memory mock for Redis network server route clientMockDistributedLockFactory.java: Mock for distributed locks (Redis mocked, MySQLreal)
Unit Tests
SpaceResourceTest.java: Tests for simplified space APINetworkResourceTest.java: Tests for network authentication APIBasicResourceTest.java: Tests for status and ability endpointsAPI Example