Repository navigation
Conversation
Incremental `/drift sync` covering 12 new in-scope upstream commits (5 dotnet/runtime, 7 dotnet/extensions) since pins baeeb465 / cc597aa2. Three ported, nine skipped. Pins advanced to d13c2266 / d2364e51. Ported: * dotnet/runtime #132617 (910c55a) — handle transient file system errors during active polling. PollingWildcardChangeToken treated a directory scan that threw as an empty scan, which compared against the previous state as "every file was removed" and fired a spurious change notification. _getCurrentState now returns null on a failed scan; a failed scan reports no change and retries on the next poll, and the first scan that completes establishes the baseline (upstream's `_previousHash is not null` guard). PollingFileChangeToken no longer treats an unreadable file as changed. 5 tests added. * dotnet/runtime #133013 (39b12a6) — document that watched paths need not exist. "isn't required to exist" added to the PhysicalFileProvider factory, PhysicalFileProvider.watch (which carried no dartdoc at all), the PhysicalFilesWatcher constructor and createFileChangeToken. * dotnet/extensions #7735 (47b6b06) — fail closed when a quality metric has no valid score. NumericMetric.interpretScore now reports a null score and an out-of-range score as failures with a reason, and quality_evaluator_base interprets unconditionally so a metric left unscored by a failed parse still carries a failed interpretation. The port is widened deliberately: upstream's new "rating is Inconclusive" branch is only reachable with upstream's rating bands, so the bands and the 4.0 minimum passing score were aligned too. The Dart port had drifted to >= 5/4/3/2 with a 3.0 threshold, so scores in [3.0, 4.0) that previously passed now fail. 23 tests mirrored from upstream EvaluationMetricExtensionsTests. Skipped (recorded in the ledger): * dotnet/runtime #131931 (6fa6b31) — linked cache entry thread safety. Interlocked/Volatile/MemoryBarrier machinery plus a copy-on-write ExpirationTokensList; a Dart isolate is single-threaded. New N/A entry for CacheEntry.ExpirationTokensList. * dotnet/runtime #133151 (4878f22) — MemoryCache OTEL unit/tag rename. The Dart caching subsystem publishes no metrics; nothing to rename. * dotnet/runtime #133494 (d13c226) — Configuration allocation tuning. List capacity hints and a collection expression, no behavior change. New N/A entry covering this class of edit. * dotnet/extensions #7749 (d2364e5) — Microsoft.Extensions.Http.Diagnostics, which no scope row covers. * dotnet/extensions #7738 (c74cd51) and #7732 (c4e8764) — TypeScript/npm assets of the HTML report frontend; the Dart port has no HtmlReportWriter. * dotnet/extensions #7724 (d0caf64), #7726 (b4b46cc), #7727 (2a8df4c) — Microsoft.Extensions.AI.OpenAI only, N/A by library. Also recorded as a new open priority rather than guessed at: the Dart RelevanceTruthAndCompletenessEvaluator returns early on an inconclusive rating, leaving its three metrics with no interpretation, where upstream falls through and interprets (so #7735 fails closed there and the Dart port still does not). Closing it is a larger restructure than the commit under review. packages/extensions bumped to 0.8.1 with a matching changelog entry. extensions_flutter is unchanged and not bumped. Verified: dart analyze --fatal-infos, dart format --set-exit-if-changed and dart test (1063 passing) in packages/extensions; flutter analyze --fatal-infos, dart format and flutter test (47 passing) in packages/extensions_flutter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014CCMWHQhqgyzMkQwBduWBG
|
Closing as superseded by #11 — but this PR found a real bug, and it's worth recording where it went. Two Rebasing wasn't the cheaper path: all nine files conflict against merged Carried over to #11:
Not carried over: the removal of the per-file Also worth flagging for whoever picks up the next run: two in-scope commits landed after this run and are recorded in the ledger as its first items — Generated by Claude Code |
Carry over the drift-sync residue PR #9 found
Incremental
/drift synccovering 12 new in-scope upstream commits (5dotnet/runtime, 7dotnet/extensions) since pinsbaeeb465/cc597aa2. Three ported, nine skipped. Pins advanced tod13c2266/d2364e51.lib/src/ai/changed — affectsjamiewest/agentsNumericMetric.interpretScore()changes semantics (its signature is unchanged, so this is a behavioral break, not a compile break):[3.0, 4.0)that previously reportedfailed: falsenow reportfailed: true.>= 5 / >= 4 / >= 3 / >= 2 / elseto upstream's(4,5] exceptional,(3,4] good,(2,3] average,(1,2] poor,(0,1] unacceptable, inconclusive outside that range.NaN), are nowfailed: truewith a reason, where both previously reportedfailed: false.QualityEvaluatorsubclasses now setinterpretationunconditionally, so a metric left unscored by a failed parse carries a failed interpretation instead ofnull.Anything downstream that gates on
EvaluationMetricInterpretation.failed, or asserts on specific ratings, will see different results. The downstream canary job checks compilation, which is unaffected; the behavioral change is not something it can catch. I could not run thejamiewest/agentscheckout locally — this session's GitHub access is scoped to this repository — so the ripple is unverified beyond CI.Ported
910c55aPollingWildcardChangeTokentreated a directory scan that threw (network share down, directory briefly inaccessible) as an empty scan, which compared against the previous state as "every file was removed" and fired a spurious change notification._getCurrentStatenow returnsnullon a failed scan; a failed scan reports no change and retries on the next poll, and the first scan that completes establishes the baseline rather than counting pre-existing files as additions (upstream's_previousHash is not nullguard).PollingFileChangeTokenno longer treats an unreadable file as changed — it leaves its recorded state untouched and retries. 5 tests added.39b12a6PhysicalFileProviderfactory,PhysicalFileProvider.watch(which carried no dartdoc at all), thePhysicalFilesWatcherconstructor, andcreateFileChangeToken.47b6b06EvaluationMetricExtensionsTests.Why #7735 was ported wider than the upstream diff
Upstream's new
_ when rating is EvaluationRating.Inconclusivebranch is only reachable because its rating bands map out-of-range values (> 5.0,<= 0.0,NaN) toInconclusive. The Dart bands had drifted so that no non-null value producedinconclusive, which would have made that branch dead code. Porting the fix correctly therefore required aligning the bands and the threshold. The drift itself predates this sync.PhysicalFilesWatcher's share of #132617 (thetryaroundtoken.HasChangedin the central timer loop) has no Dart counterpart: the Dart watcher has no central polling loop — each token polls on its own timer — so that guard lives inside the per-token code this PR fixes.Skipped (all recorded in the ledger)
6fa6b31Interlocked/Volatile/Thread.MemoryBarrierplus a copy-on-writeExpirationTokensList. A Dart isolate is single-threaded; there is no race to fix. New N/A entry forCacheEntry.ExpirationTokensList.4878f22cachingsubsystem publishes no metrics at all (themeterFactoryctor hook is a known open gap), so there is nothing to rename.d13c226Listcapacity hints and a collection expression, no behavior change. New N/A entry covering this recurring class of edit.d2364e5Microsoft.Extensions.Http.Diagnostics, which no scope row covers (thehttprow maps to dotnet/runtime'sMicrosoft.Extensions.Http).c74cd51, #7732c4e8764HtmlReportWriter.d0caf64, #7726b4b46cc, #77272a8df4cMicrosoft.Extensions.AI.OpenAIonly, N/A by library. Note: #7724 deletesOpenAIAssistantsChatClientandMicrosoftExtensionsAIAssistantsExtensionsupstream — two of the 15 names spelled out in that N/A row. The row is left intact so the audit's literal matcher keeps suppressing them.Recorded rather than guessed at
A structural divergence surfaced while porting #7735 and is filed as a new open priority instead of being fixed here: the Dart
RelevanceTruthAndCompletenessEvaluatorreturns early on a null/inconclusive rating (relevance_truth_and_completeness_evaluator.dart:106), leaving relevance, truth and completeness with no value and no interpretation. Upstream falls through toUpdateResult()in every branch and interprets, so with #7735 upstream now fails closed there and the Dart port still does not. Closing it means restructuring the evaluator — a larger change than the commit under review.The equivalent one-line fix was applied to
quality_evaluator_base.dart, where upstream's shape (_ = TryParse…; metric.Interpretation = metric.InterpretScore();) is unambiguous.Release
packages/extensions→ 0.8.1 (patch: fixes and docs, no new public API) with a matchingCHANGELOG.mdentry.extensions_flutteris unchanged and not bumped. No tags created and nothing published from this session.Verification
Run locally on Flutter 3.47.5 / Dart 3.13.4 (matching CI's
channel: stable):dart analyze --fatal-infos .(extensions)dart format --output=none --set-exit-if-changed .(extensions)dart test(extensions)flutter analyze --fatal-infos(extensions_flutter)dart format --output=none --set-exit-if-changed .(extensions_flutter)flutter test(extensions_flutter)🤖 Generated with Claude Code
https://claude.ai/code/session_014CCMWHQhqgyzMkQwBduWBG
Generated by Claude Code