[PR #421] [MERGED] fix(process): normalize resize frame timestamps #1971

Closed
opened 2026-10-16 21:12:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/421
Author: @morluto
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @morluto

Base: main ← Head: codex/fix-process-resize-timestamps


📝 Commits (1)

  • 77696df fix(process): normalize resize frame timestamps

📊 Changes

4 files changed (+28 additions, -10 deletions)

View changed files

📝 src/application/ProcessCaptureJournal.ts (+12 -2)
📝 src/application/ProcessCaptureLifecycle.ts (+5 -5)
📝 src/application/ProcessNormalization.ts (+9 -2)
📝 tests/processCapture.test.ts (+2 -1)

📄 Description

Description

Fixes a process-capture validation race where a resize renderer entry used its exact dispatch time while adjacent PTY output used a normalized time bucket. A resize at 301 ms followed by its SIGWINCH output at bucketed 300 ms preserved causal order but produced decreasing rendered-frame timestamps, so an otherwise successful capture returned a validation error.

Resize renderer entries now use the same elapsed-time normalization helper as PTY frames. Interaction-event dispatch times remain exact; renderer and journal order remain causal and are not sorted or clamped.

The regression uses a 60-second bucket so the old mismatch is deterministic on PTY-capable hosts.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation-only change
  • Refactor (no behavior change)

Testing

  • Unit tests added or updated
  • npx vitest run tests/processCapture.test.ts
  • npm run typecheck
  • npm run lint
  • Real Hopper smoke test (if applicable)
  • Browser CDP end-to-end verifier (if applicable)

Real-provider verification is not applicable to the provider-neutral PTY capture path.

Tool Contract Impact

  • MCP tool schemas changed
  • CLI behavior changed
  • Generated product catalog refreshed
  • Documentation updated

No schema change. Valid resize captures no longer fail when timestamp normalization crosses a bucket boundary.

Found while validating #420.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/421 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/fix-process-resize-timestamps` --- ### 📝 Commits (1) - [`77696df`](https://github.com/morluto/rea/commit/77696dff9144fd6c110247711bbff144ec63b19b) fix(process): normalize resize frame timestamps ### 📊 Changes **4 files changed** (+28 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/application/ProcessCaptureJournal.ts` (+12 -2) 📝 `src/application/ProcessCaptureLifecycle.ts` (+5 -5) 📝 `src/application/ProcessNormalization.ts` (+9 -2) 📝 `tests/processCapture.test.ts` (+2 -1) </details> ### 📄 Description ## Description Fixes a process-capture validation race where a resize renderer entry used its exact dispatch time while adjacent PTY output used a normalized time bucket. A resize at 301 ms followed by its `SIGWINCH` output at bucketed 300 ms preserved causal order but produced decreasing rendered-frame timestamps, so an otherwise successful capture returned a validation error. Resize renderer entries now use the same elapsed-time normalization helper as PTY frames. Interaction-event dispatch times remain exact; renderer and journal order remain causal and are not sorted or clamped. The regression uses a 60-second bucket so the old mismatch is deterministic on PTY-capable hosts. ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation-only change - [ ] Refactor (no behavior change) ## Testing - [x] Unit tests added or updated - [x] `npx vitest run tests/processCapture.test.ts` - [x] `npm run typecheck` - [x] `npm run lint` - [ ] Real Hopper smoke test (if applicable) - [ ] Browser CDP end-to-end verifier (if applicable) Real-provider verification is not applicable to the provider-neutral PTY capture path. ## Tool Contract Impact - [ ] MCP tool schemas changed - [ ] CLI behavior changed - [ ] Generated product catalog refreshed - [ ] Documentation updated No schema change. Valid resize captures no longer fail when timestamp normalization crosses a bucket boundary. ## Related Issues Found while validating #420. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1971
No description provided.