Sketch: semantic quiescence for .modelTesting (design proposal, no code) - #72
Closed
mansbernhardt wants to merge 4 commits into
Closed
mansbernhardt wants to merge 4 commits into
mansbernhardt wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mitive at the source is not parallel-apple defines its own Clock protocol, so wrapping values that conform to _Concurrency.Clock would match nothing. Any type-recognition mechanism is fragile for the same reason. Replaced with a single public primitive that the input source wraps its own suspension in — for their clocks that is one default implementation plus two overrides, covering every clock.sleep in every model. Also records Mans's point that unmarked work is bounded by test teardown cancellation, not only by the backstop, which is what makes adoption incremental: unmarked suspensions produce a settle() failure naming what to mark, never a wedged process. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… and async-algorithms The adoption question answered concretely: node.forEach can mark around its own next() whatever the sequence is, so debounce/throttle and every other third-party operator park correctly with zero user action — that is why the design is cheap in practice. A sequence wrapper covers hand-written loops; a source wrapping its own await covers a bare clock.sleep, which for parallel-apple's Clock is three edits because the protocol already funnels every caller through one method. Third-party library authors need do nothing. Also records that 'parked' currently conflates waiting-for-the-test with waiting-for-wall-time, which matches today's behaviour but is a conflation worth naming. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…is enough Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Closing: the design's implementation (#74) was measured and rejected on cost; not merging the sketch into Docs/ so a rejected design doesn't read as current guidance. Branch kept for the record. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design sketch only — no implementation, nothing to merge. Opened as a draft so it renders and can be commented on inline.
The idea: decide
settle()/expectfrom SwiftModel's own registry of work (running / parked / finished) rather than by observing executor and queue idleness. The registry already spans everynode.task/forEach/onChangefrom creation to return; the drive just asks it the wrong question ("has it started" instead of "is it still running"). That closes the yield, background-QoS and clock blind spots by construction rather than one patch at a time, and makes the invariant deterministically testable instead of needing a starved machine to reproduce.The question that decides viability is §6 tier 2: SwiftModel defines no clock, so a
clock.sleepis invisible to it. Nearly every.modelTestingsuite sleeps on aTestClock, so if those cannot be marked parked the design is dead. That spike goes first, before the inventory audit.Also inside: the inventory the soundness rests on, a first-pass audit that already found two unregistered work sources (one of which would break the rule outright if counted naively), what the design deletes, why a wall clock returns only as a reporter of unfinished work, and a staged plan that runs both answers side by side before any verdict depends on the new one.
Read
Docs/test-quiescence-redesign.md.