Retain ServiceLevel requests across binding and publisher failures #720
Reference in New Issue
Block a user
Delete Branch "fix/servicelevel-binding-replay"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ServiceLevel requests made before the SDK publisher was bound were lost, leaving the SDK default 255 visible to clients. Failed SDK writes could also advance actor deduplication and prevent recovery. Retain and serialize the latest request, replay it on binding (including zero), propagate SDK failures, and deduplicate only after successful publication; invalidate deduplication after any failure.
If binding fails after endpoint startup, detach bindings and observe SDK stop before disposal. Preserve ownership when cleanup faults so final shutdown can retry. Guard disposal against the already-halted SDK CurrentInstance getter while allowing the admin host to continue booting.
Validation: 2,381 passed and 4 existing retired-v3 skips across affected Commons, SDK, Runtime, Host and targeted integration suites. Independent root loopback rerun passed both real client reads of ns=0;i=2267 (100 and 0). Lock-removal and dedup-invalidation mutations failed as intended and were restored. Reviewed independently; diff check clean. No live device/historian calls or deployment.
The real Host fault test injects publisher-construction failure after confirming a listener, then verifies closure and continued admin boot. Actual Host replay/SDK-stop failure coverage is composition evidence from separate adapter/SDK and cleanup-callback tests; persistent SDK failure is not claimed to guarantee endpoint closure. Health arithmetic, election and Warm mode remain separate work under #717.
Resolves #719 after hosted full CI passes.
Integration update: latest head
8828e999c4includes merged main PR #714. Both integration merge commits preserve the combined tree a7ce6c7688e5aa5e28c47519fd526c809306f93e; 11 diagnostic guard fixtures were rerun successfully. Required hosted run #983 passed on the final head: all steps successful, 62 TRX files, 14,648 executed, 573 individual skips, minimum 12,000, artifacts finalized. Merged as 1bf8c614; merged treea7ce6c7688exactly equals the tested tree. Earlier run #980 tests the previousc8e3e279tree and will not substitute for the final head.