Skip to content

FIX: detect rollout activity despite stale Windows timestamps - #87

Open
Peace7 wants to merge 1 commit into
merefield:mainfrom
Peace7:codex/windows-rollout-activity
Open

Peace7 wants to merge 1 commit into
merefield:mainfrom
Peace7:codex/windows-rollout-activity

Conversation

@Peace7

@Peace7 Peace7 commented Oct 23, 2026

Copy link
Copy Markdown

Windows can retain a rollout's old modification time while Codex keeps the writer open. This can produce a blinking CHECK SESSION warning after three minutes even while new events are being written, and can hide fresh activity when the filesystem timestamp falls outside the active horizon.

Track activity using observed file-size changes and owned event timestamps alongside modification time. At startup, inspect the recent JSONL tail and extend through its overlapping record so large tool results and reasoning records still establish activity. Unchanged polls and repeated reads of an incomplete record do not refresh activity; genuine quiet periods, approval requests, and input requests retain their existing behavior. Token accounting is unchanged.

Regression coverage includes stale timestamps at startup and after appends, unchanged polls, partial records, large records and exact tail boundaries, inherited history, future timestamps, and approval/input precedence. The README describes the Windows behavior.

Validation on Windows:

  • gofmt and git diff --check
  • go test -cover -timeout 10m ./...
  • go vet ./...
  • go build -trimpath ./...
  • Independent adversarial source review, including a corrected large-record edge case and passing regression tests

Local race instrumentation was unavailable because this Windows environment has no configured C compiler (CGO_ENABLED=0). The repository's existing CI runs race tests on Windows, Linux, and macOS.

Use owned event timestamps and observed size changes alongside filesystem
mtime. Bootstrap complete tail records, including oversized records, without
recounting tokens. Preserve definite requests and real inactivity warnings.
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