Skip to content

fix(session-temporal): refuse refresh superseded by a session reset - #4381

Merged
ScriptedAlchemy merged 15 commits into
masterfrom
devin/1792525425-temporal-reset-preempts-candidate
Oct 22, 2026
Merged

ScriptedAlchemy merged 15 commits into
masterfrom
devin/1792525425-temporal-reset-preempts-candidate

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

A rollout rewrite can request a temporal reset while its old refresh candidate is still running. Treat that superseded candidate as a terminal InvalidStateTransition, so the scheduler fails the stale operation and the next begin applies the pending reset and rebuilds from the rewritten source. This prevents repeated retryable storage failures from leaving the session unavailable indefinitely.

Completion checks the pending reset after validating the running binding. Refusal preserves the active generation. Grouped completion uses the same authority and retains per-item savepoint rollback. The regression verifies typed refusal, preservation of the active generation, application of the pending reset, and activation of the rebuilt candidate.

The host fixture retains exact-profile endpoint discovery, child ownership and early-exit diagnostics, and cleanup limited to a freshly created short socket directory. Both long-profile regressions and their existing wait bounds remain.

Validation:

  • Four focused Bazel tests previously passed on the integrated tree at b66ac773: temporal candidate reset/rebuild, all-host catalog lifecycle, long-profile doctor, and canonical short-socket cleanup. Strict Bazel Clippy passed for the root session suite and CLI host journey suite. These results precede the latest master integration.
  • The old head 73222209 passed Clippy, feature gates, repository/dashboard gates, and the shipped Linux CLI build. Its full Linux build failed when three remote actions returned NOT_FOUND: Failed to find existing task at 04:40:44 UTC. Worker logs show the scheduler stream closing and connection refusal at the same time. The test-execution step was skipped, so that run supplies no test results.
  • Current head b2d5196faaae28be18cb9f0af730a7d98db62a6d preserves the prior PR head and merges master through cd9fde234d, including resident-memory and cache-output revalidation repairs.

Full CI on the current head must pass before merge, including the Linux fleet and aggregate result.

Fixes #4373

A source rewrite that retires an observation while a refresh is running
requests a session reset. Completion then failed with a retryable storage
error (frontier mismatch), so the scheduler retried forever and the reset,
which only applies once no refresh runs, never did. Completion now refuses
such a candidate as a terminal state transition so the scheduler fails it
durably and the next refresh applies the reset.

Fixes #4373

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@changeset-bot

changeset-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2d5196

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 22, 2026 00:26
@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 22, 2026 03:16
@ScriptedAlchemy
ScriptedAlchemy merged commit dfe8edc into master Oct 22, 2026
16 checks passed
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.

Codex session never becomes readable when its rollout is rewritten right after the first import

1 participant