Skip to content

feat: Phase 5.3 step 1 - flag MockFileSystem.MockTime for manual review#15

Merged
vbreuss merged 1 commit into
mainfrom
feat/phase-5.3-mocktime
May 15, 2026
Merged

feat: Phase 5.3 step 1 - flag MockFileSystem.MockTime for manual review#15
vbreuss merged 1 commit into
mainfrom
feat/phase-5.3-mocktime

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented May 15, 2026

TestableIO's fs.MockTime(Func<DateTime>) is invoked on every timestamp request. Testably's equivalent (o => o.UseTimeSystem(new MockTimeSystem(...))) takes a fixed initial time + mutable advance API and lives only inside the construction-time options lambda. The two have no observably-equivalent automatic rewrite for arbitrary delegates.

Ship the analyzer side now: pattern id MockFileSystem.MockTime, code-fix dispatcher silently falls through. The cross-statement fold for the narrow constant-DateTime lambda shape needs a custom FixAllProvider (the rewrite touches the construction expression that the parameterless / options ctor fixes also touch — BatchFixer races) and is deferred to a follow-up.

TestableIO's `fs.MockTime(Func<DateTime>)` is invoked on every timestamp
request. Testably's equivalent (`o => o.UseTimeSystem(new MockTimeSystem(...))`)
takes a fixed initial time + mutable advance API and lives only inside the
construction-time options lambda. The two have no observably-equivalent
automatic rewrite for arbitrary delegates.

Ship the analyzer side now: pattern id `MockFileSystem.MockTime`, code-fix
dispatcher silently falls through. The cross-statement fold for the narrow
constant-DateTime lambda shape needs a custom FixAllProvider (the rewrite
touches the construction expression that the parameterless / options ctor
fixes also touch — BatchFixer races) and is deferred to a follow-up.
@vbreuss vbreuss self-assigned this May 15, 2026
Copilot AI review requested due to automatic review settings May 15, 2026 07:51
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 15, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Test Results

  6 files  ± 0    6 suites  ±0   1m 16s ⏱️ -6s
141 tests + 6  141 ✅ + 6  0 💤 ±0  0 ❌ ±0 
423 runs  +18  421 ✅ +18  2 💤 ±0  0 ❌ ±0 

Results for commit 161e2c0. ± Comparison against base commit 3a4517e.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@vbreuss vbreuss enabled auto-merge (squash) May 15, 2026 08:26
@vbreuss vbreuss merged commit 0e2b270 into main May 15, 2026
17 of 22 checks passed
@vbreuss vbreuss deleted the feat/phase-5.3-mocktime branch May 15, 2026 08:26
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.

2 participants