fix(scripts): reset-aware handshake refuses a null reset value; document additive timeouts (#36 review)
A null resetValue encoded to null, which wrote an empty string and then handed the waiter a null target (= any change), fast-pathing on the stale cache and reinstating the race the overload exists to close. The context parameter is now non-nullable and the accessor throws ArgumentException before any write. Also: additive-timeout note on all surfaces, batch-failure message no longer names the bool overload, and the error-message/batch-failure branches are pinned. Claude-Session: https://claude.ai/code/session_01XPsuy2ZZ5Gbyfpt8PrK5BV
This commit is contained in:
@@ -476,7 +476,11 @@ public class SandboxAttributeAccessor
|
||||
/// <param name="responseValue">The response value to wait for.</param>
|
||||
/// <param name="timeout">The maximum time to wait for the response.</param>
|
||||
/// <param name="resetKey">The attribute written first and waited on before the batch.</param>
|
||||
/// <param name="resetValue">The reset value the device must echo before the batch is written.</param>
|
||||
/// <param name="resetValue">
|
||||
/// The reset value the device must echo before the batch is written. MUST NOT be null — the
|
||||
/// real accessor throws <see cref="System.ArgumentException"/>, because a null would write an
|
||||
/// empty string and then wait on "any change", reinstating the race the overload closes.
|
||||
/// </param>
|
||||
/// <param name="resetTimeout">The maximum time to wait for the reset echo; <c>null</c> means <paramref name="timeout"/>.</param>
|
||||
/// <returns>Never returns; always throws <see cref="ScriptSandboxException"/> in the sandbox.</returns>
|
||||
public Task<HandshakeResult> WriteBatchAndWaitAsync(
|
||||
|
||||
Reference in New Issue
Block a user