You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve all open csharp-sdk bug, doc, and coverage issues (#34)
* fix: resolve all open csharp-sdk bug, doc, and coverage issues
Bug fixes:
- #22: register resume tokens server-side, restore prior session's EventLog
on resume, return RESUME_WINDOW_EXPIRED for unknown/expired tokens.
- #23: enforce max_runtime_sec via a watchdog linked to the run-token; emit
job.error with FinalStatus="timed_out" and ErrorCode.Timeout on expiry.
- #24: stop the lease watchdog as soon as the job reaches any terminal state
so RunAsync no longer blocks on a sleeping watchdog until lease expiry.
- #25: call BudgetLedger.AssertNotExhausted after charging a cost.* metric
so the job terminates with BUDGET_EXHAUSTED (Retryable=false) on overspend.
- #26: store an idempotency record including a SHA-256 payload fingerprint
and creation time; mismatched payloads now raise DUPLICATE_KEY and entries
expire after IdempotencyWindowSec (new ArcpServerOptions field, default 1h).
- #27: buffer per-job events on the Job and replay them in order to a new
subscriber that requested history:true, respecting from_event_seq; set
JobSubscribedPayload.Replayed only when history was actually sent.
- #30: client-side request bookkeeping (_pendingSubmits, _listJobsRequests,
_subscriptions) is now cleaned up in catch blocks when send or
wait-for-ack fails, so the next successful request isn't bound to a
stale slot. Also fixes ArcpClient.DisposeAsync double-dispose throw.
- #32: WebSocketTransport.ReceiveAsync uses a fast path that deserializes
directly from the rented buffer when EndOfMessage is true on the first
receive; multi-frame messages now stream into a pooled ArrayBufferWriter
instead of allocating a new MemoryStream + ToArray() per message.
Documentation:
- #28: removed CS1591 from the global NoWarn list so missing XML
documentation on public/protected members becomes a build error. Added
~700 doc summaries across the SDK so the build is clean with the
warning enforced.
Tests / coverage (#29):
- Added 47 new tests across Arcp.UnitTests and Arcp.IntegrationTests.
- Total tests: 60 -> 109. Line coverage union: 70.9% -> 80.7%.
- New scripts/check-coverage.py merges cobertura reports and enforces a
threshold; CI test job now runs the full solution with coverage and
fails if line coverage drops below 80%.
- CONTRIBUTING.md documents the local coverage workflow.
Note: #31 was already addressed on main in 1f2d627.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: replace malformed XML doc summary for generic ToJsonElement<T>
The auto-generated stub used `<t>` (Roslyn read it as an unclosed XML element)
inside the summary, which surfaces as CS1570 in Release builds and breaks
both the test job and the CodeQL autobuilder. Replace with a hand-written
summary.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments