Repository navigation
feat(analyzers): extract C# timeouts from attributes, cancellation sources, waits and delay races (spec 014 phase 1) - #191
Merged
adrian-xping merged 2 commits intoDec 4, 2026
Conversation
…urces, waits and delay races (spec 014 phase 1) Adds the embedded timeout pattern table with its loader and validation, the value folder (literals, TimeSpan forms, arithmetic, same-file locals, fields and properties), and the extractor for framework attributes (xUnit, NUnit incl. class attributes, MSTest), CancellationTokenSource/CancelAfter, WaitAsync/Wait/WaitOne/WaitAll/WaitAny and Task.WhenAny delay races. CSharpTestAnalyzer now fills `timeouts`. Fixtures under samples/timeouts/. Spec-Runner: spec=014 phase=1 step=implement
Contributor
Author
spec-runner review, phase 1, round 1
|
… skip argument is unresolved (spec 014 phase 1) Spec-Runner: spec=014 phase=1 step=fix-1
Contributor
Author
spec-runner review, phase 1, round 2No findings. |
adrian-xping
merged commit Dec 4, 2026
9be4135
into
feat/spec-014-csharp-timeout-extraction
3 checks passed
adrian-xping
deleted the
phase/spec-014-csharp-timeout-extraction/1-engine
branch
December 4, 2026 00:19
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 1: Engine and calls.
Spec 014 phase 1. New
Xping.Analyzers.CSharp/Timeouts/:timeouts.json(14 rows: xUnitTimeout =, NUnitTimeout/CancelAfter/MaxTime, MSTestTimeout, CancellationTokenSource, CancelAfter, WaitAsync, Wait, WaitOne, Task.WaitAll/WaitAny, WaitHandle.WaitAll/WaitAny),TimeoutPatterns(load + §4.4 validation),TimeValues(§5 fold and §5.2 name lookup) andTimeoutExtractor(§3, §4.3 binding, §6.2 NUnit class attributes, §7.3 ifUnknown, §7.4 delay races, §11 spans).CSharpTestAnalyzerfillstimeouts;LocalScopenow records declared types and whether a name is declared at all;AssertionFilegains same-file member lookup. Eight fixture folders undersamples/timeouts/(slow-runner, framework-attributes, cancellation, waits, delay-race, values, not-limits, preprocessor) with reviewed expected.json, plus the §13 phase-1 tests and a timeout part inFactsFixtureTests(§12.2: problem1-timeout and catalog match without correction).Notes
frameworkliterally, as the spec says: a framework-less row and annunitrow with the same kind/member/arity aren't refused. No such pair is in the table.onvalue and unknown top-level fields, which fall under §4.4's 'a field or value is unknown'.using NUnit.Frameworkwould turn xUnit[Theory]into NUnit (Spec 012 §4.3). The file has a comment saying so.Spec updated: no
Phase row
1-engineslow-runner,framework-attributes,cancellation,waits,delay-race,values,not-limits,preprocessorfolders; §12.2.Opened by spec-runner.