Skip to content

🤖 refactor: usage, goal and timing services take the workspace FIFO from SessionLocks - #7379

Merged
ThomasK33 merged 1 commit into
mainfrom
phase4/services-locks
Oct 24, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
phase4/services-locks

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

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's workspaceFileLocks.

Order

Implementation

  • sessionUsageService.ts (8 calls) and workspaceGoalService.ts (29 calls): fileLocks is a getter that returns historyService.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 partial HistoryService need no edit.
  • sessionTimingService.ts (4 calls): new SessionTimingService(config, telemetry, locks = nodeSessionLocks). desktop.ts keeps its call.
  • desktop.ts and core.ts do not change.

Validation

All on the head (c7cacdb5db, this diff on main 4770fa63e0):

  • bun test of sessionUsageService*.test.ts, workspaceGoalService*.test.ts, sessionTimingService.test.ts and sessionLocks/: 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.
  • Tripwire (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

  • None for behavior: in the app, historyService.locks.workspaceFiles and the default are the same workspaceFileLocks map.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $122.03

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T02:01:50.059189Z c7cacdb PR opened
🔒 Security Review ✅ Completed 2026-10-24T02:00:40.687308Z c7cacdb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

27 agent steps · 7 replayed from cache · 31 model calls · 218.8k tokens (74% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 2 steps · 4 calls 31.9s
🟢 a chat survives a restart of the server 2 steps · 4 calls 31.9s
🟢 compaction.e2e.ts · 1 passed 3 steps · 7 calls 45.3s
🟢 /compact replaces the old chat with a summary 3 steps · 7 calls 45.3s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 17.0s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 17.0s
🟢 settingsRoundTrip.e2e.ts · 1 passed 3 steps · 5 calls 29.1s
🟢 a chat survives trips through Settings 3 steps · 5 calls 29.1s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.2s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.2s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.0s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.0s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 6.8s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 6.8s
🟢 todoNudge.e2e.ts · 1 passed 2 steps · 4 calls 23.5s
🟢 the agent finishes open TODO items after the turn-end nudge 2 steps · 4 calls 23.5s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 23.2s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.9s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 3.8s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.3s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 4.8s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 2.9s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.6s

e2e 0.20.0 · 3m 7s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (32% cached)
Spend: $0.01 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 8.4s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 8.4s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.6s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.6s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 4.8s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 4.8s

e2e 0.20.0 · 20.9s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit db39664 Oct 24, 2026
33 of 34 checks passed
@ThomasK33
ThomasK33 deleted the phase4/services-locks branch October 24, 2026 02:25
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