codeburn/src
iamtoruk a1b4b22f51 fix(windows): close three holes in the cross-process preference lock
writeDockEnabled still did its own read, mutate and atomic write of
windows-dock.json, outside the lock the rest of the module takes. It is
the Node side of the dock's enabled switch, reached from the desktop
app's Sidebar toggle, so a toggle there could still land between the
tray app's read and its rename and erase whatever it had just stored,
which in practice is the rail's placement. It now merges through
patchTrayFile, which takes the lock for the whole cycle; enabled is
already an accepted dock key, so nothing is dropped on the way.

Stale-lock recovery could hand out two owners at once. Both sides did
"if abandoned, unlink and retry", and nothing stood between the check
and the unlink: contender A could already have removed the stale lock
and created a fresh one of its own, and B's unlink then deleted A's
fresh lock, leaving both of them holding the file. Windows' share mode
hides this most of the time, because a lock a live holder still has open
will not unlink at all, but the same protocol runs on Linux and macOS,
where the unlink always succeeds. Removing an abandoned lock is now
itself arbitrated, by the same exclusive create the lock uses, on a
sibling <lock>.takeover file. Only its winner may unlink, and only after
re-checking staleness under that right, so a rival that reclaimed first
keeps the lock it now holds. A takeover file is dropped on every path
out, never held across the wait, and one left behind by a reclaimer that
died is freed by the same staleness rule as the lock itself.

The cross-process test asserted only each side's final value, so it
noticed a lost update only when the last writes happened to collide: on
a deliberately broken lock it passed about one run in three, which is
weak evidence for the property it exists to prove. Each side now writes
a counter that only rises, and a reader thread watches the file for the
whole run. A separate reader is the point: neither writer can see its
own counter rolled back, because in the unlocked cycle each carries the
other side's value forward itself, so what it reads back is never older
than what it last read. With the lock both counters only ever rise in
the file; without it one falls. It now fails on every unlocked run.

Also: a placement that cannot be saved is logged instead of discarded
silently, since losing the lock under contention is a new way for the
rail to revert at the next launch; and the Codex sameLogin comment now
states outright that a replacement document carrying none of the three
identifying fields reads as the same login and is written over, which is
the deliberate side to err on.
2026-09-03 10:28:05 -07:00
..
act fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
data fix(windows): surface Capacity Dock show errors instead of discarding them 2026-09-01 14:18:12 -07:00
guard fix: keep macOS and Linux path behaviour exact in guard flags and Hermes 2026-09-02 15:11:01 -07:00
mcp feat(dock): glance popover with hero window, sessions and today strip 2026-09-02 06:09:06 -07:00
plugins fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
providers Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
quota fix(windows): close three holes in the cross-process preference lock 2026-09-03 10:28:05 -07:00
sharing feat(dock): glance popover with hero window, sessions and today strip 2026-09-02 06:09:06 -07:00
sync feat(desktop): complete plugin-era UI with details, install flow, settings, and team registry 2026-08-28 06:59:50 -07:00
antigravity-statusline.ts fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
audit-report.ts Merge origin/main into feat/copilot-session-store 2026-08-22 09:36:51 -07:00
bash-utils.ts perf(classifier): linear bash separator split 2026-08-16 18:31:41 -07:00
behavioral-weight.ts fix(hermes): keep post-finalization session growth on the observation day 2026-08-23 18:26:51 +05:30
budget.ts feat(budget): spend budgets with overview display and scriptable --check (#562) 2026-07-16 11:10:16 -07:00
cache-dir.ts fix(cache): treat a present versioned result file as exclusive 2026-08-22 01:49:39 +05:30
cache-refresh-lock.ts fix(lock): heartbeat replaces the lock body atomically instead of truncating in place 2026-08-30 03:29:01 -07:00
classifier.ts fix(insights): count read-shaped shell commands as reads, not as verification (#941) 2026-08-10 06:07:27 -07:00
cli-date.ts feat(cli): add lifetime period for CLI and dashboard (#753) 2026-07-20 05:24:33 -07:00
cli.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
codex-cache.ts perf: fan out the discovery sweep instead of walking it one syscall at a time 2026-08-22 15:52:47 -07:00
codex-credits.ts merge: rebase #1056 onto main with Codex v12 / daily v24 2026-08-22 02:35:51 +05:30
codex-throughput.ts fix(codex): exclude harness startup and fix partial-dedup timing in Tok/s 2026-08-21 15:29:14 -07:00
compare-stats.ts fix(report): bill remaining displayed output per call 2026-08-23 18:18:57 +05:30
compare.tsx fix(compare): honor --model-a/--model-b in the TUI and resolve display names 2026-07-29 22:58:05 +05:30
config.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
content-utils.ts fix(parser): flatten already-sliced previews and memoize canonical path walks 2026-08-16 01:49:10 -07:00
context-budget.ts fix(context-budget): stop double-counting home skills and CLAUDE.md 2026-08-04 06:32:58 +03:00
context-tree-codex.ts Extract shared token estimation helper, migrate all CHARS_PER_TOKEN sites (#644) (#677) 2026-07-16 11:58:22 -07:00
context-tree.ts feat(dock): glance popover with hero window, sessions and today strip 2026-09-02 06:09:06 -07:00
context-tui.tsx dashboard: Workflow panel, footer coaching notes, title-first context list 2026-07-20 22:26:50 +02:00
copilot-aiu.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
currency.ts test: skip the live Frankfurter fetch so FX moves can't shift assertions 2026-08-21 02:23:41 -07:00
cursor-cache.ts fix(cache): treat a present versioned result file as exclusive 2026-08-22 01:49:39 +05:30
daily-cache.ts fix(cache): DAILY_CACHE_VERSION 30 collides with open PR #1132 2026-09-02 07:32:02 -07:00
dashboard.tsx fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
day-aggregator.ts fix(report): route displayed output through billableOutputTokens 2026-08-23 17:31:12 +05:30
doctor.ts Merge remote-tracking branch 'origin/main' into fix/ft002-harness-launcher 2026-08-24 07:15:08 -07:00
export.ts fix(report): join model output on modelBreakdown keys 2026-08-23 18:43:37 +05:30
fetch-utils.ts fix(network): add timeouts to critical-path fetches (#445) (#448) 2026-06-06 03:25:36 +02:00
format.ts feat(copilot): read per-request input/cache from session-store.db 2026-08-17 17:52:01 -04:00
fs-utils.ts perf: fan out the discovery sweep instead of walking it one syscall at a time 2026-08-22 15:52:47 -07:00
granular-history.ts fix(web): count legend title uniqueness in code points 2026-08-21 21:59:13 +05:30
hermes-session-ledger.ts fix(hermes): superseded v1 ledger file was left on disk forever 2026-09-02 07:32:02 -07:00
ink-win.ts fix(ink-win): strip synchronized-update escapes instead of exact-matching them 2026-08-04 03:06:47 +03:00
launcher-homes.ts fix(codex): read a complete session_meta first line 2026-08-24 18:36:25 +05:30
live-sessions.ts feat(dock): glance popover with hero window, sessions and today strip 2026-09-02 06:09:06 -07:00
main.ts Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
menubar-installer.ts fix(cli): drain credential writes before exit, a staged-msi flag, a zero bucket 2026-09-03 03:06:13 -07:00
menubar-json.ts Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
model-breakdown.ts feat(codex): add tool-excluded active throughput metrics 2026-07-24 22:53:43 -04:00
model-efficiency.ts fix(devin): report friendly GPT model names with effort tier (#585) 2026-07-01 16:01:49 +02:00
models-report.ts fix(models): group Trend rows and the models command by the same display name (#1239) 2026-09-02 10:40:39 -07:00
models.ts derive versioned Claude family labels 2026-09-02 19:15:57 +05:30
optimize.ts fix(report): route displayed output through billableOutputTokens 2026-08-23 17:31:12 +05:30
overview.ts fix(report): join model output on modelBreakdown keys 2026-08-23 18:43:37 +05:30
parse-worker.ts perf(parse-workers): gate on pending bytes, size the per-worker budget per parse 2026-08-17 02:53:19 -07:00
parse-workers.ts perf(parse-workers): gate on pending bytes, size the per-worker budget per parse 2026-08-17 02:53:19 -07:00
parser.ts fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
path-privacy.ts fix(sync): address project privacy review 2026-08-24 20:09:27 +05:30
persistent-codeburn.ts refactor(cli): share persistent-codeburn resolver; tighten Antigravity hook ownership 2026-05-31 20:07:57 -07:00
plan-usage.ts docs(plan): calibrate the Copilot credit estimate wording against real session-store rows (#1199) 2026-08-31 03:13:04 -07:00
plans.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
quota.ts prerelease: quota NaN guard, 10-year daily retention, test date bomb (#764) 2026-07-20 07:37:56 -07:00
serve.ts Merge remote-tracking branch 'origin/main' into feat/1110-surface-hydration 2026-08-24 01:30:27 -07:00
session-cache.ts Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
session-output.ts fix(report): join billable output onto existing modelBreakdown keys 2026-08-23 20:06:31 +05:30
session-population.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
sessions-report.ts feat(sessions): deterministic work-unit resolver and sessions --by-work-unit (CB-2 slice 1) (#1145) 2026-08-25 09:30:05 -07:00
sessions-tui.tsx feat(cli): add interactive sessions browser (#793) 2026-07-21 13:03:47 +02:00
spend-flow.ts fix(cli): surface mDNS scan errors, robust spend-flow rollup + date label, harden tests 2026-07-10 16:20:41 -07:00
sqlite.ts fix(sqlite): only reach for an immutable URI where node:sqlite honours one 2026-08-18 10:38:01 -07:00
telemetry-snapshot.ts fix(cli): drain credential writes before exit, a staged-msi flag, a zero bucket 2026-09-03 03:06:13 -07:00
text-table.ts feat(devices): joined Totals by machine report (#536) 2026-06-20 19:23:03 +02:00
token-estimate.ts Extract shared token estimation helper, migrate all CHARS_PER_TOKEN sites (#644) (#677) 2026-07-16 11:58:22 -07:00
types.ts fix(omp): correct OMP period scoping, cost attribution, and Grok 4.6 prompt tiers (#1150) 2026-08-26 22:26:06 -07:00
usage-aggregator.ts Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
web-dashboard.ts fix(dash): keep the disambiguator visible, make the bootstrap safe by construction 2026-08-18 05:49:16 +03:00
work-units.ts feat(sessions): deterministic work-unit resolver and sessions --by-work-unit (CB-2 slice 1) (#1145) 2026-08-25 09:30:05 -07:00
workflow-insights.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
yield.ts fix(sync): trust only proven outbound project metadata 2026-08-24 16:05:35 +05:30