chore: migrate GRACE-Poly anchors to hierarchical dotted naming
Systematic rename of all semantic anchors (#region, [DEF], @RELATION) across 1400+ files — backend Python, frontend Svelte/TS, specs, docs: - Flat anchors become Namespace.Module.Entity - @RELATION references updated to match new anchor paths - Zero business logic changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# #region TestAsyncAPIClient [C:3] [TYPE Module] [SEMANTICS test, async, client, semaphore]
|
||||
# #region Test.AsyncClient.TestAsyncAPIClient [C:3] [TYPE Module] [SEMANTICS test, async, client, semaphore]
|
||||
# @BRIEF Tests for AsyncAPIClient — contract tests, semaphore limits, timeout behavior.
|
||||
# @RELATION BINDS_TO -> [AsyncAPIClient]
|
||||
# @RELATION BINDS_TO -> [Core.AsyncNetwork.AsyncAPIClient]
|
||||
# @TEST_CONTRACT: AsyncAPIClient.request() -> Response dict
|
||||
# @TEST_INVARIANT: Semaphore limits concurrent requests — VERIFIED_BY: test_semaphore_limits_concurrent_requests
|
||||
# @TEST_INVARIANT: Semaphore timeout returns error — VERIFIED_BY: test_semaphore_timeout_returns_503
|
||||
@@ -18,7 +18,7 @@ _BASE_CONFIG = {
|
||||
}
|
||||
|
||||
|
||||
# #region test_async_client_request [C:2] [TYPE Function]
|
||||
# #region Test.AsyncClient.TestAsyncClientRequest [C:2] [TYPE Function]
|
||||
# @BRIEF Verify AsyncAPIClient.request() returns parsed JSON on success.
|
||||
@pytest.mark.asyncio
|
||||
async def test_async_client_request():
|
||||
@@ -36,10 +36,10 @@ async def test_async_client_request():
|
||||
result = await client.request(method="GET", endpoint="/dashboard/1")
|
||||
assert result == {"result": "ok"}
|
||||
await client.aclose()
|
||||
# #endregion test_async_client_request
|
||||
# #endregion Test.AsyncClient.TestAsyncClientRequest
|
||||
|
||||
|
||||
# #region test_semaphore_limits_concurrent_requests [C:2] [TYPE Function]
|
||||
# #region Test.AsyncClient.TestSemaphoreLimitsConcurrentRequests [C:2] [TYPE Function]
|
||||
# @BRIEF Semaphore limits concurrent requests to pool_size. Verify total runtime ≈ max(batch_time).
|
||||
@pytest.mark.asyncio
|
||||
async def test_semaphore_limits_concurrent_requests():
|
||||
@@ -70,10 +70,10 @@ async def test_semaphore_limits_concurrent_requests():
|
||||
single_time = results[0]
|
||||
assert elapsed < single_time * 3.5, f"Semaphore not limiting: {elapsed:.3f}s vs {single_time*2:.3f}s expected"
|
||||
await client.aclose()
|
||||
# #endregion test_semaphore_limits_concurrent_requests
|
||||
# #endregion Test.AsyncClient.TestSemaphoreLimitsConcurrentRequests
|
||||
|
||||
|
||||
# #region test_semaphore_timeout_returns_503 [C:2] [TYPE Function]
|
||||
# #region Test.AsyncClient.TestSemaphoreTimeoutReturns503 [C:2] [TYPE Function]
|
||||
# @BRIEF When semaphore is exhausted, acquire with timeout returns TimeoutError.
|
||||
@pytest.mark.asyncio
|
||||
async def test_semaphore_timeout_returns_503():
|
||||
@@ -88,5 +88,5 @@ async def test_semaphore_timeout_returns_503():
|
||||
await asyncio.wait_for(semaphore.acquire(), timeout=0.05)
|
||||
|
||||
semaphore.release()
|
||||
# #endregion test_semaphore_timeout_returns_503
|
||||
# #endregion TestAsyncAPIClient
|
||||
# #endregion Test.AsyncClient.TestSemaphoreTimeoutReturns503
|
||||
# #endregion Test.AsyncClient.TestAsyncAPIClient
|
||||
|
||||
Reference in New Issue
Block a user