Skip to content

fix: make retired touch observations consistent - #3151

Closed
thymikee wants to merge 1 commit into
refactor/session-action-lifetimesfrom
fix/session-observation-review
Closed

thymikee wants to merge 1 commit into
refactor/session-action-lifetimesfrom
fix/session-observation-review

Conversation

@thymikee

@thymikee thymikee commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Selector and coordinate touch response construction now discard settle observations and reference frames when their admitted session lifetime has ended. Both branches read the same current lifetime after any frame probe. Mandatory action finalization still refuses writes to a successor session.

Removed unused captured-record arguments from selector and find capture and touch response construction. The blocked-directory open control now asserts the actual ENOTDIR error after native dispatch.

Nine files changed. Part of #3116, stacked on #3150; addresses the non-point touch finding on #3148 and optional cleanup on #3145.

Validation

Validated a4b723e799. The new selector retirement control fails against the pre-fix code (1 failed | 27 passed); all 44 focused controls pass after the fix. Quick and Fallow checks pass. Independent review found no actionable findings.

pnpm check:affected --base refactor/session-action-lifetimes --run passes selected runnable gates and 1,050 related tests across 180 files. CI and the requested live device evidence remain pending.

Review in cubic

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.96 MB 4.96 MB -51 B
Package (unpacked) 4.96 MB 4.96 MB -51 B
Package (download) 1.49 MB 1.49 MB -7 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 18.4 ms 19.2 ms +0.8 ms
CLI --help 55.0 ms 54.1 ms -0.9 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/daemon/interaction/internal/interaction-touch-response.ts
@thymikee

thymikee commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

This PR is ready at a4b723e. All 14 checks pass on this head, and I know of no conflicts. Not blocking, and you can take or leave it: buildFillResponsePayloads at https://github.com/callstack/agent-device/blob/a4b723e/src/daemon/interaction/internal/interaction-touch-fill.ts#L213 still calls sessionStore.requireCurrent after dispatch, so a lifetime that retires during a fill would throw session_lifetime_ended instead of dropping the reference frame and settle as the touch path now does. A follow-up could use resolveCurrent there, as buildTargetedTouchResponsePayloads does, with a matching retired=true control.

I did not run the focused tests or the pre-fix red run, so regression validity comes from reading the base code path. I did not review live device evidence, because the live-session route is unchanged and the new unit control covers the retired path. That control calls buildTargetedTouchResponsePayloads directly, but the press caller passes params straight through, so the bypass is thin. Nothing else is needed before merge, and the PR then lands after the stacked base #3150.

The Cubic P3 thread still applies and is optional: #3151 (comment). The retired point touch still runs the reference-frame probe and logs a warning, but the base commit behaves the same, so this is noise and not a regression.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 3, 2026
@thymikee
thymikee added this pull request to stack #3146 October 3, 2026 13:46
@thymikee
thymikee force-pushed the refactor/session-action-lifetimes branch from 9902936 to 4dd9c5b Compare October 3, 2026 14:41
@thymikee
thymikee force-pushed the fix/session-observation-review branch 2 times, most recently from 06cab25 to de94efd Compare October 3, 2026 15:16
@thymikee
thymikee force-pushed the refactor/session-action-lifetimes branch from 4dd9c5b to 7eb2460 Compare October 3, 2026 15:16
@thymikee
thymikee force-pushed the fix/session-observation-review branch from de94efd to d1db9a5 Compare October 3, 2026 16:41
@thymikee
thymikee force-pushed the refactor/session-action-lifetimes branch from 4b20874 to 4e91b9e Compare October 3, 2026 16:56
@thymikee
thymikee force-pushed the fix/session-observation-review branch from d1db9a5 to 14e551c Compare October 3, 2026 16:56
@thymikee
thymikee force-pushed the refactor/session-action-lifetimes branch from 4e91b9e to f52701f Compare October 3, 2026 17:49
@thymikee
thymikee force-pushed the fix/session-observation-review branch from 14e551c to 3e0116c Compare October 3, 2026 17:49
@thymikee
thymikee removed this pull request from stack #3146 October 3, 2026 19:38
@thymikee
thymikee force-pushed the fix/session-observation-review branch from 3e0116c to c7da1e8 Compare October 3, 2026 19:39
@thymikee
thymikee added this pull request to stack #3187 October 3, 2026 19:45
@thymikee
thymikee removed this pull request from stack #3187 October 3, 2026 20:59
@thymikee

thymikee commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

Consolidated into #3144 as part of reducing #3116 to seven PRs. The composition preserves the complete pre-consolidation source tree, including tests and later review corrections. This PR is superseded; its review discussion and native evidence remain available. Outstanding findings transfer to the owning keeper in the implementation record.

@thymikee thymikee closed this Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-03 21:17 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant