Repository navigation
fix(core): keep overflow telemetry live and stat mentions asynchronously - #83
Merged
Merged
Conversation
- createFileOverflowSink now rotates its dedupe window instead of fusing at maxEntries, so a width regression surfacing late in a long session is still recorded (values below 1 behave as 1; default 200 unchanged). - listDirectoryMentions resolves symlinks with await stat instead of statSync, matching the sibling scanner and keeping the autocomplete chain unblocked. - frame-clamp spec covers the rotation and the sub-1 window contract.
The dedupe window keeps late width violations recording, but a changing over-wide row (spinner, elapsed time, progress) is distinct every frame, so the log still grew one synchronous write per frame with no bound. Add maxLines (default 1000): once the total budget is spent the sink stays silent, so the backstop cannot flood the disk or the render path.
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.
Summary
Part of #72 — the two low-risk findings (UX-35 rotation and the UX-33
statSynchalf). The rest of #72 is intentionally deferred.createFileOverflowSinkno longer fuses atmaxEntries. Once the dedupe window fills it resets, so a width regression that surfaces late in a long session is still recorded.maxEntrieskeeps its default (200); values below 1 behave as 1. The JSONL schema is unchanged and writes stay synchronous + never-throwing (async batching is out of scope here).listDirectoryMentionsresolves symlinks withawait statinstead ofstatSync, matching the sibling scanner and keeping the autocomplete task chain unblocked. Behavior is unchanged — directory symlinks stay directories, broken symlinks stay file candidates.Changes
packages/mayfly/src/core/frame-clamp.ts— dedupe-window rotation + JSDoc contract update.packages/mayfly/src/interaction/file-mention.ts— asyncstat; drop the now-unusedstatSyncimport.packages/mayfly/tests/core/frame-clamp.spec.ts— rotation and sub-1 window tests.Verification
pnpm run verify:changed— passed: 2433 tests passed / 7 skipped;frame-clamp.tsandfile-mention.tsat 100% statements/branches/functions/lines.oxlinton the changed files — 0 warnings / 0 errors.PROFILE=mayfly-perf-a script/install-dev.shthendsh --profile mayfly-perf-a— passed (symlink mention drill-down, narrow-width, large-panel arrow navigation).Deferred
UX-33 candidate caching/TTL, UX-34 control-tree memoization, UX-36 status throttling, async/batched overflow writes, and the audit-doc merge (#77).