- Migration 002: VECTOR(768) -> VECTOR(1024) to match qwen3-embedding:0.6b default output
- integration_test.go: update test vector from 768 to 1024 dimensions
- TestSettleHook (internal/server/mcp_test.go): verifies SaveTransactionParams field mapping
- Tests all 6 params: X402TransactionHash, Amount, Asset, Network, Recipient, Sender
- Ensures params are settable without panic, critical for legal compliance of x402 flow
- TestStoreSaveTransaction (internal/store/integration_test.go): integration test against real Postgres
- Exercised SaveTransaction query end-to-end with full param mapping
- Skipped without TEST_DATABASE_URL (same pattern as TestStoreRoundTrip)
- Verifies: insert returns ID and CreatedAt, ID is positive, CreatedAt is valid
- Uses unique transaction hash per test run via time.Now().Unix()
Both tests ensure the critical transaction-saving mechanism is verified at both unit and integration levels, providing regression protection for the legal-compliance x402 payment flow.
- TestSaveTransactionSQL: verifies the sqlc-generated SaveTransaction query constant matches the source SQL file
- TestSaveTransactionParams: verifies SaveTransactionParams struct can be constructed with valid and edge-case values (empty hash, empty amount)
Both tests are pure-unit tests that don't require a database connection. They ensure the critical transaction-saving SQL query and its parameter mapping remain consistent, which is important for legal compliance of the x402 payment flow.
- Rewrite GetStyleProfile, FindSimilarUsers, UpsertStyleProfiles SQL queries
to use @named parameters instead of positional placeholders
- Regenerate sqlc Go files with meaningful parameter names
- Update server.go and integration test to use new parameter field names
- Fix Similarity int32→float64 type conversion
Runnable (HTTP-mocked) unit tests:
- activitypub: GetActor (accounts/lookup) plus id-lookup fallback, and SearchActors
(accounts/search).
- twitter: GetActor (/users/by/username) and SearchActors (/users/search).
- nostr: SearchActors best-effort path (non-resolvable query returns empty, no network).
- store: extractUpSQL parsing helper.
Store integration test (TestStoreRoundTrip) is gated behind TEST_DATABASE_URL and skipped
when no Postgres+pgvector is available; it runs Migrate and exercises the Upsert/Get/
FindSimilarUsers round-trip against a real database.
Co-Authored-By: Claude (AI assistant) <noreply@anthropic.com>