Repository navigation
🤖 refactor: usage, goal and timing services take the workspace FIFO from SessionLocks - #7379
Merged
Merged
Conversation
…m SessionLocks SessionUsageService and WorkspaceGoalService read historyService.locks.workspaceFiles at each use. SessionTimingService takes an optional locks argument (default nodeSessionLocks), and desktop.ts keeps the default. The three files import no lock module.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
🟢 e2e stories (Haiku): 14 passed27 agent steps · 7 replayed from cache · 31 model calls · 218.8k tokens (74% cached) All 14 tests in 9 files
e2e 0.20.0 · 3m 7s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (32% cached) All 3 tests in 3 files
e2e 0.20.0 · 20.9s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
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
The session usage, goal and timing services take the workspace FIFO from
SessionLocks. It is PR 7 of phase 4. Lock keys and order do not change: the Node layer gives today'sworkspaceFileLocks.Order
historyService.locks, which has merged. It uses no code from PR 8 or PR 5.Implementation
sessionUsageService.ts(8 calls) andworkspaceGoalService.ts(29 calls):fileLocksis a getter that returnshistoryService.locks.workspaceFiles. A memory or foreign-holder layer reaches these writes too. The getter reads at each use, not at construction, so tests that pass a partialHistoryServiceneed no edit.sessionTimingService.ts(4 calls):new SessionTimingService(config, telemetry, locks = nodeSessionLocks).desktop.tskeeps its call.desktop.tsandcore.tsdo not change.Validation
All on the head (
c7cacdb5db, this diff on main4770fa63e0):bun testofsessionUsageService*.test.ts,workspaceGoalService*.test.ts,sessionTimingService.test.tsandsessionLocks/: 324 pass, 0 fail. The test files pass with no edit. The call record fixture is unchanged.make static-check,make lint-eslint: pass.make test: 27753 pass, 0 fail in the main run, and every other run passes.scripts/perf/loopTestBaseline.ts --runs 3 --base origin/main): 0 trips.make crap-check: PASS, 0 violations.make mutate-check: PASS, 0 mutants in scope.Risks
historyService.locks.workspaceFilesand the default are the sameworkspaceFileLocksmap.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$122.03