Skip to content

feat: host generic TWA0004, TWA0023, and TWA0038 - #45

Merged
StevenTCramer merged 6 commits into
masterfrom
task/034-receive-generic-twa-rules-twa0004-etc-from-timewar
Nov 10, 2026
Merged

StevenTCramer merged 6 commits into
masterfrom
task/034-receive-generic-twa-rules-twa0004-etc-from-timewar

Conversation

@StevenTCramer

Copy link
Copy Markdown
Contributor

Summary

Architecture 486's table marks TWA0004, TWA0023, and TWA0038 generic. Those three now live in TimeWarp.SourceGenerators under TimeWarp.SourceGenerators, with the same ids, default severities, and editorconfig keys. TWA0023 still matches TypeStemIdentifierAttribute by simple name. The attribute type stays in TimeWarp.Architecture.Attributes. No other TWA id moved.

Package version is 1.0.0-beta.13. dev check-version reports source one prerelease ahead of NuGet 1.0.0-beta.12. NuGet publish is dev release from a clean master after this pull request merges. Until that publish, Architecture.Analyzers still reports the same three ids, so this repo does not delete them there.

./bin/dev test passed: the smoke console ran, and the analyzer console passed 54 cases (0 failed). ganda repo audit exited 0 (41 passed, 0 failed, 3 skipped).

Review

Disposition: clean. There were 2 rounds, each with one general reviewer. Round 1 ran at effort 3 and round 2 at effort 2. Final counts: bug 0, suggestion 1 fixed, nit 2 fixed, 0 open, 0 wontfix. Round 1 (2026-11-10) raised M1, M2, and M3, and fix pass e8c0ae8 implemented them. Round 2 (2026-11-10) verified each fix on the delta 62a0489..e8c0ae8 and found no new issues. ./bin/dev test reran with 56 passed, 0 failed.

  • M1: Locate throws when the snippet occurs more than once. Flag throws when a second expected flag resolves to a span already matched. OverrideAndExplicit_Should_ReportOnlyFreeNames uses abstract void Run(HttpClient client) and HttpClient Client { get; } so the abstract parameter and the interface property are each checked once. DuplicateSnippet_Should_Throw and SameSpanTwice_Should_Throw lock those throws. The abstract Run snippet was also shared with the override; that flag is unique now too.
  • M2: the TWA0023 Design region says TWA0009 and TWA0021 live in TimeWarp.Architecture.Analyzers.
  • M3: global using System.Threading; sits after System.Text.RegularExpressions.
  • The analyzer ports match timewarp-architecture cef55c09f. Round 1 reran ./bin/dev test at 54 passed. After this fix pass the analyzer console is 56 passed, 0 failed, and ganda repo audit exited 0 (41 passed, 0 failed, 3 skipped).
  • Paths: review/review-framework.md, review/round-1/general.md, review/round-1/merged.md, review/round-2/general.md, review/round-2/merged.md (final ledger), review/disposition.md.

Test plan

Smoke

./bin/dev test
grep -n 'TWA0004' source/timewarp-source-generators/AnalyzerReleases.Unshipped.md documentation/releases.md
grep -n 'DiagnosticId = "TWA0004"' source/timewarp-source-generators/purpose-region-analyzer.cs
grep -n 'DiagnosticId = "TWA0023"' source/timewarp-source-generators/type-stem-identifier-analyzer.cs
grep -n 'DiagnosticId = "TWA0038"' source/timewarp-source-generators/file-length-analyzer.cs
grep -n 'Snippet is not unique' tests/timewarp-source-generators-analyzer-tests/type-stem-identifier-test-fixture.cs
grep -n 'TimeWarp.Architecture.Analyzers' source/timewarp-source-generators/type-stem-identifier-analyzer.cs
grep -n 'global using' source/timewarp-source-generators/global-usings.cs

Expect

  • ./bin/dev test ends with Tests completed successfully! and Passed: 56 Failed: 0.
  • Unshipped release tracking and documentation/releases.md name TWA0004, TWA0023, and TWA0038.
  • The three analyzer files still use those diagnostic ids.
  • source/Directory.Build.props has <Version>1.0.0-beta.13</Version>.
  • Locate throws with Snippet is not unique.
  • The TWA0023 Design region names TimeWarp.Architecture.Analyzers for TWA0009 and TWA0021.
  • global using System.Threading; follows global using System.Text.RegularExpressions;.

Kanban task 034
Session: Grok 01a1c422-c20a-75f1-9f7d-4fd4c78c2e0b

Architecture 486 classified these three style rules as generic. They move
here with the same diagnostic ids so existing .editorconfig keys keep working.
Version 1.0.0-beta.13 is the pin consumers use after dev release from master.

Audit: the CI pipeline step is pwsh, and the git hooks match the attest baseline.
The override test's interface snippet also matched the abstract property, and
the Run snippet also matched the override, so those diagnostics were checked
twice. Locate now throws when a snippet occurs more than once, and Flag
refuses a second match of the same span. The Design note points TWA0009 and
TWA0021 at TimeWarp.Architecture.Analyzers, and System.Threading sits in
alphabetical order.

Records the round 1 review ledger on the task branch.
@StevenTCramer
StevenTCramer merged commit f176ac0 into master Nov 10, 2026
1 check passed
@StevenTCramer
StevenTCramer deleted the task/034-receive-generic-twa-rules-twa0004-etc-from-timewar branch November 10, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant