Skip to content

Conversation

@jmetrikat
Copy link
Collaborator

@jmetrikat jmetrikat commented Aug 2, 2025

  • Replaced the injectApiObjectKey function with injectAndEnsureUniqueApiObjectKey, which ensures that the ApiObjectKey is unique by appending sequential suffixes if necessary.
  • This method is now used in createObjectType, createRelation, and createRelationOption functions.

@jmetrikat jmetrikat requested review from Copilot and deff7 August 2, 2025 08:42

This comment was marked as outdated.

@jmetrikat jmetrikat requested a review from Copilot August 2, 2025 08:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a uniqueness constraint for ApiObjectKey during the creation of object types, relations, and relation options. The implementation replaces simple key injection with a uniqueness checking mechanism that automatically appends sequential suffixes when conflicts are detected.

Key changes:

  • Replaced injectApiObjectKey with injectAndEnsureUniqueApiObjectKey that validates uniqueness
  • Added ensureUniqueApiObjectKey method with conflict resolution logic
  • Updated creation methods for object types, relations, and relation options to use the new uniqueness-aware function

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
core/block/object/objectcreator/util.go Implements new uniqueness checking logic with sequential suffix generation
core/block/object/objectcreator/util_test.go Comprehensive test coverage for the new uniqueness functionality
core/block/object/objectcreator/object_type.go Updates object type creation to use uniqueness-aware key injection
core/block/object/objectcreator/relation.go Updates relation creation to use uniqueness-aware key injection
core/block/object/objectcreator/relation_option.go Updates relation option creation to use uniqueness-aware key injection
Comments suppressed due to low confidence (1)

core/block/object/objectcreator/util.go:103

  • [nitpick] The error message could be more actionable by suggesting potential solutions, such as 'Consider using a different base key or cleaning up unused objects with similar keys'.
	return fmt.Errorf("failed to find unique apiObjectKey after %d attempts for key: %s", maxIterations, baseKey)

@github-actions
Copy link

github-actions bot commented Aug 2, 2025

Previous Coverage 50.9% of statements
New Coverage 50.9% of statements
Patch Coverage 73.0% of changed statements (27/37)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​anyproto/​any-sync@​v0.10.2 ⏵ v0.10.37410010010070
Updatedgolang/​github.com/​anyproto/​any-store@​v0.3.8 ⏵ v0.4.2100100100100100

View full report

@jmetrikat jmetrikat changed the base branch from main to develop October 14, 2025 12:19
@github-actions
Copy link

Testomat.io Report 🔴 SMOKE-TEST FAILED
Tests ✔️ 20 tests run
Summary 🔴 20 failed; 🟢 0 passed; 🟡 0 skipped
Duration 🕐 26 minutes, 12 seconds
Testomat.io Report 📊 Run #c0b52484
Job 🗂️ Smoke Tests / smoke-test
Operating System 🖥️ Linux X64

🟥 Failures (20)

🔴 Revoking an invite link []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (148028.28ms)
And the user 1 is using client 1 (0.71ms)
And the user creates a new account on "staging" (6424.58ms)
And the account is synced within 60 seconds (62089.16ms)
Given the user has shared his space and generated an invite link (0.00ms)
When the user revokes the invite link (0.00ms)
Then the invite link should be invalid (0.00ms)
And the account is deleted (0.00ms)
And the server 1 is stopped (0.00ms)

🔴 Revoking an invite link []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (417.06ms)
And the user 1 is using client 1 (0.38ms)
And the user creates a new account on "staging" (5702.90ms)
And the account is synced within 60 seconds (62063.85ms)
Given the user has shared his space and generated an invite link (0.00ms)
When the user revokes the invite link (0.00ms)
Then the invite link should be invalid (0.00ms)
And the account is deleted (0.00ms)
And the server 1 is stopped (0.00ms)

🔴 User cancels their join request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (398.10ms)
And the user 1 is using client 1 (0.33ms)
And the user creates a new account on "staging" (5677.87ms)
And the account is synced within 60 seconds (62099.25ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
And the user cancels their join request (0.00ms)
And the user 1 is using client 1 (0.00ms)
Then there is no request pending for joining the space (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User cancels their join request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (391.86ms)
And the user 1 is using client 1 (0.30ms)
And the user creates a new account on "staging" (5736.66ms)
And the account is synced within 60 seconds (62065.56ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
And the user cancels their join request (0.00ms)
And the user 1 is using client 1 (0.00ms)
Then there is no request pending for joining the space (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User deletes the space and rejoins later []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (386.01ms)
And the user 1 is using client 1 (0.36ms)
And the user creates a new account on "staging" (5643.09ms)
And the account is synced within 60 seconds (62052.77ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user sends requests to join the space (0.00ms)
Then the request is automatically approved as "Viewer" again (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User deletes the space and rejoins later []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (397.64ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (5694.25ms)
And the account is synced within 60 seconds (62062.66ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user sends requests to join the space (0.00ms)
Then the request is automatically approved as "Viewer" again (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner changes the rights of a user from Viewer to Editor []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (395.70ms)
And the user 1 is using client 1 (0.24ms)
And the user creates a new account on "staging" (5627.19ms)
And the account is synced within 60 seconds (62088.05ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 1 changes the rights of user 2 from "Viewer" to "Editor" (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner changes the rights of a user from Viewer to Editor []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (383.53ms)
And the user 1 is using client 1 (0.28ms)
And the user creates a new account on "staging" (5697.41ms)
And the account is synced within 60 seconds (62115.38ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 1 changes the rights of user 2 from "Viewer" to "Editor" (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves a join request with Editor permissions []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (391.09ms)
And the user 1 is using client 1 (0.21ms)
And the user creates a new account on "staging" (5764.06ms)
And the account is synced within 60 seconds (62072.71ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves a join request with Editor permissions []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (393.59ms)
And the user 1 is using client 1 (0.24ms)
And the user creates a new account on "staging" (5718.89ms)
And the account is synced within 60 seconds (62032.61ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner declines a join request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (390.86ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (5697.16ms)
And the account is synced within 60 seconds (62046.20ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 declines the join request of user 2 (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner declines a join request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (396.48ms)
And the user 1 is using client 1 (0.27ms)
And the user creates a new account on "staging" (5710.96ms)
And the account is synced within 60 seconds (62093.20ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 declines the join request of user 2 (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner removes a participant from the space []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (386.05ms)
And the user 1 is using client 1 (0.21ms)
And the user creates a new account on "staging" (5718.23ms)
And the account is synced within 60 seconds (62078.96ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
When the user 1 removes the user 2 from the space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner removes a participant from the space []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (413.26ms)
And the user 1 is using client 1 (0.25ms)
And the user creates a new account on "staging" (5822.72ms)
And the account is synced within 60 seconds (62083.31ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
When the user 1 removes the user 2 from the space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner deletes a space []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (396.43ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (5727.18ms)
And the account is synced within 60 seconds (62103.83ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 1 deletes the shared space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner deletes a space []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (397.40ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (5802.88ms)
And the account is synced within 60 seconds (62049.26ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 1 deletes the shared space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves leave request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (396.00ms)
And the user 1 is using client 1 (0.18ms)
And the user creates a new account on "staging" (5800.96ms)
And the account is synced within 60 seconds (62030.33ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user 1 approves the leave request of user 2 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves leave request []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (430.52ms)
And the user 1 is using client 1 (0.25ms)
And the user creates a new account on "staging" (5921.69ms)
And the account is synced within 60 seconds (62075.17ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user 1 approves the leave request of user 2 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Sync on staging nodes []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (396.70ms)
And the user is using client 1 (0.28ms)
And the user creates a new account on "staging" (5719.59ms)
And the user creates an object 1 in the account (5.81ms)
And the user can open the object 1 (10007.20ms)
And the account is synced within 80 seconds (82031.21ms)
And the server 1 is stopped (0.00ms)
And data is deleted (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user is using client 2 (0.00ms)
When the user logs in to their account on "staging" (0.00ms)
Then the account should have an analyticsId, profile picture and name (0.00ms)
Then the user can open the object 1 (0.00ms)
And the account is deleted (0.00ms)
And the server 2 is stopped (0.00ms)

🔴 Sync on staging nodes []

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:238:13)

################[ Steps ]################
Given the server "default" 1 is running (410.74ms)
And the user is using client 1 (0.22ms)
And the user creates a new account on "staging" (5740.42ms)
And the user creates an object 1 in the account (6.26ms)
And the user can open the object 1 (10004.65ms)
And the account is synced within 80 seconds (82120.38ms)
And the server 1 is stopped (0.00ms)
And data is deleted (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user is using client 2 (0.00ms)
When the user logs in to their account on "staging" (0.00ms)
Then the account should have an analyticsId, profile picture and name (0.00ms)
Then the user can open the object 1 (0.00ms)
And the account is deleted (0.00ms)
And the server 2 is stopped (0.00ms)

🐢 Slowest Tests

  • Revoking an invite link [] (3 minutes, 36.545897574999984 seconds)
  • Sync on staging nodes [] (1 minute, 38.28324370199999 seconds)
  • Sync on staging nodes [] (1 minute, 38.161385284999994 seconds)
  • Owner approves leave request [] (1 minute, 8.428286418000003 seconds)
  • Owner removes a participant from the space [] (1 minute, 8.320143424000008 seconds)

@jmetrikat jmetrikat requested a review from requilence October 31, 2025 12:40
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.

2 participants