Repository navigation
feat(analyzers): read elapsed-time bounds, completion checks, polling and helper timeouts in C# (spec 014 phase 2) - #192
Merged
adrian-xping merged 2 commits intoDec 4, 2026
Conversation
… and helper timeouts in C# (spec 014 phase 2) Spec 013's extractor hands Spec 014 the helpers it followed and, per recognized assertion, its upper bounds, condition comparisons and NUnit constraint. The timeout extractor reads elapsed upper bounds (§8.1-§8.2) with the assertion's span and the elapsed root as subject, completion checks (§8.3), NUnit .After(n) and FluentAssertions NotThrowAfter polling (§9), and helper limits once per call site with parameters folded as the caller's arguments (§10). TimeoutFact gains an optional Subject. §8.5 stays a TODO(spec) until Spec 085 adds ExpectedValue.Resolved. Spec-Runner: spec=014 phase=2 step=implement
Contributor
Author
spec-runner review, phase 2, round 1
|
…ved (spec 014 phase 2) Spec-Runner: spec=014 phase=2 step=fix-1
Contributor
Author
spec-runner review, phase 2, round 2No findings. |
adrian-xping
deleted the
phase/spec-014-csharp-timeout-extraction/2-assertions
branch
December 4, 2026 00:44
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.
Spec 014 (docs/specs/core/014-csharp-timeout-extraction.md), phase 2: Assertions and helpers.
Phase 2 of Spec 014. Spec 013's assertion extractor now exposes an internal hook (
TimeoutHooks.cs): the same-file helpers it followed, with each parameter's argument, and per recognized assertion its upper-bound arguments,!-pushed condition comparisons and NUnit constraint. The timeout extractor uses it to emitelapsedAssertiontimeouts for upper bounds on elapsed subjects (Elapsed,ElapsedMilliseconds,Total*/Ticks,GetElapsedTime, FAExecutionTime[Of], unchanged locals;ElapsedTicksand unit mismatches unresolved), with the assertion's span and the elapsed root assubjectso §8.4 can pair them with XP001's bound. Completion checks (FACompleteWithin[Async], ShouldlyShould.CompleteIn) and FANotThrowAfter[Async]are new table rows; NUnit.After(n)with unit links is read from the constraint in NUnit tests. Followed helpers' bodies are scanned once per call site, with parameters folded as the caller's arguments (unmapped ones unresolved).TimeoutFactgains an optionalSubject. New fixtures:samples/timeouts/elapsed,completion,polling,helpers;cataloggains one elapsed test fortimeout.subject.Notes
sw.ElapsedMilliseconds)..TotalXand.Ticksare read on any elapsed duration form (for exampleStopwatch.GetElapsedTime(start).TotalMilliseconds), not only on<x>.Elapsed. Spec table updated.Spec updated: yes
Phase row
2-assertionsExpectedValue.Resolvedexists, Spec 085 phase 1; else aTODO(spec)): elapsed subjects through Spec 013's hook, completion rows, NUnit and FluentAssertions polling, helpers; theelapsed,completion,polling,helpersfolders.main)Opened by spec-runner.