Skip to content

fix(server): deliver Action results that finish during a pause - #497

Merged
lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/action-followup-pause-recovery-current
Oct 29, 2026
Merged

lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/action-followup-pause-recovery-current

Conversation

@lastobelus

Copy link
Copy Markdown
Owner

When a resumable Project Action finished while the environment was paused, its follow-up was held in the Action ledger until Resume. That hold also kept the thread's launch gate closed. In one case the result waited about 31 hours: it finished Oct 24 at 7:15 AM PT and was delivered Oct 25 at 2:23 PM PT. All that time the agent couldn't start another Action, so it couldn't attach to the next build it needed. A restart during the pause could also turn a pending result into manual recovery.

Completed results now go straight into the thread's durable queue. The orchestrator already holds automatic wakes there during a pause without starting the provider, so the Action gate is free at once, and Resume starts exactly one follow-up. Startup, and listing or launching an Action, retry any follow-up that is still undelivered. This removes ActionResume's own pause tracking.

Validation: regression tests reproduced the stuck gate and the restart case before the fix. 54 focused tests, vp run check:changed origin/lastcode/main and Quick CI pass. A runtime check covered a paused result being queued, another Action launching, and Resume starting one follow-up.

Implemented by Codex gpt-6.1-sol (xhigh); reviewed by Claude Opus 5.5 in T3 Code.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T23:51:24.619620Z 75c7975 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c30e30cab5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus force-pushed the lastcode/main branch 4 times, most recently from 3793cb9 to 040e1c7 Compare October 28, 2026 23:41
Use the durable thread queue to retain completed follow-ups while automation is paused. Retry pending delivery after startup recovery and before listing or launching another Action.

Carry-Group: incubator

Carry-Observation: This fix depends on the Incubator-owned environment pause integration and must replay after that integration.
@lastobelus
lastobelus force-pushed the lastcode/action-followup-pause-recovery-current branch from c30e30c to 75c7975 Compare October 28, 2026 23:49
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 75c797526c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit 8177d86 into lastcode/main Oct 29, 2026
20 checks passed
@lastobelus
lastobelus deleted the lastcode/action-followup-pause-recovery-current branch October 29, 2026 00:04
lastobelus added a commit that referenced this pull request Oct 29, 2026
A finished Project Action can vanish from view while its result is still waiting for the agent, and an environment pause can be easy to miss from an affected thread. Phase 2 of #482 makes both visible on web/desktop and mobile. Part of #482, which stays open.

Source review, matching-client native development QA and model revalidation are complete. The full 108-case run and selected failed-guard comparison retain their failures and limits below; the current focused controls passed 20/20 valid samples. Current source checks and Quick CI pass; exact-head GitHub gates remain pending. The prompts fit the normal context budget without an approval label. Later installed mobile/remote checks and restart/Pause persistence remain tracked in #482.

## 🔎 What changed

- **Named wait/result notices** show the Action's name, its result and its continuation state, built on Phase 1's existing status helper and the exact Action follow-up.
- **Distinct states** separate delivery, queue holds, pending input and current pause. An ended turn is not treated as completion of the delegated task.
- **Pause visibility:** the current environment's pause shows beside the affected thread.
- **Child rows** keep their existing shells and show only supported, non-delivered Action waits. Local and connected remote children use the same destination as navigation, including the owning environment’s pause state.
- **Recovery permissions** disable Resume agent and Discard for read-only destinations, matching the server’s existing `orchestration.operate` requirement.
- **Drafts** keep their guarded detail subscriptions.
- **#507** held-result notice is consolidated into the new one; result outcomes and summaries are preserved.
- **Settlement guidance** is clarified. Ordinary top-level Actions launch and resume with no settlement change. The temporary parent-relay safeguard keeps a mediating parent visible only while it owes a child a result.
- **#484** is reused unchanged.
- **CI fixtures** use normal scheduling priority in their isolated settings so gate subprocesses can compete with the surrounding test workers. Production defaults and test deadlines are unchanged.

## 🚫 What this does not do

- Keep one delegated task alive across an Action wait (Phase 3).
- Enable child-owned PR watches (Phase 4).
- Authorize a checkpoint, production install, restart or Phase 3.

## ✅ Validation

- **Delivery source:** `a57aefcd20ba2467dce60e84e09171e17db16709`, based on `1556523eef088062a129484af6e859c349b25c56`. Reuses #484 and #497 unchanged and integrates the named Action notice with main’s unified current-work status without a duplicate composer notice. The rebase incorporates main’s independent PR-watch quiet deadline; Phase 2 does not add that behavior.
- **Source checks:** the current exact head/base passes the complete changed-file gate: 694 tests across 18 files, all 36 typechecks, formatting, lint, GraphQL and unused-code checks. Compiled web tests previously passed 65 cases, with nine focused React Compiler checks; the affected application code is unchanged by this rebase.
- **Context budget:** measured provider prompts are five bytes below main and the tool inventory four bytes below main. The ordinary budget test passes; no approval label is needed.
- **Quick CI:** passed on exact head `a57aefcd20ba2467dce60e84e09171e17db16709` and base `1556523eef088062a129484af6e859c349b25c56` (run `38f31b1a-72c1-4c28-b272-6b290d54eb2b`). The normal push hook can reuse this matching receipt. GitHub CI remains required.
- **Source review:** Astra High’s exact `1556523eef088062a129484af6e859c349b25c56..a57aefc` integration re-check is clean. The current-work conflict preserves main’s compact styling and Phase 2’s derived status without duplicate names. The reviewer accepted native input equivalence and bounded model revalidation; current source/model results remain separately recorded.
- **Regression proof:** destination-permission cases failed before the fix; all 39 permission tests then passed. Remote-child badge coverage also reproduced its defect before repair. The static-markup-only mobile table was removed following GitHub review; shared behavior, draft, permission and interaction coverage remain. The latest GitHub finding removed two duplicate shared-function tests from the mobile suite; all 55 focused tests across mobile, client-runtime and shared suites pass. The two new deadline graders reproduced invalid-regex errors before the repair and pass uppercase/negative-response coverage afterward; all 411 eval-grader tests pass. Six current-work browser tests and the focused React Compiler check also pass.
- **Matched real guidance comparison:** six cases, three samples per arm, Sol medium and a Luna shell simulator, with identical runner/fixtures and only the actual baseline Action text changed. Candidate 18/18; baseline 15/18; no API errors. The visibility-explanation case improves from 0/3 to 3/3. Own-Action, retraction, existing-protection, PR-watch and stack-link controls pass both versions. This does not reproduce the original top-level incident or establish universal model behavior.
- **Eval fixture repair:** two PR cases retain their tasks, prior turns and expectations. Explicit whole-command mocks stabilize repository prerequisites through existing shell history/link accounting. Other commands still use the simulator; these are bounded snapshots, not a Git emulator.
- **Full real-model run:** on `dfc5f3468548bb8612c5c1dc30e3d33dfff733f4` / `4fc5620986a11ec9138e2bcac719364609b33337`, Sol medium with a Luna shell simulator completed all 108 Codex-applicable cases: 100 passed the majority rule, with 203/226 valid sample passes and one retained incomplete-response error. All four Action cases passed 8/8 samples. The eight selected failed guards were compared with the actual base’s two Action-text files; four failed both versions, while other scores differed under simulator contradictions or policy/check mismatches. This small, selected comparison establishes neither causation nor absence of regression. No expectations were weakened. The new base adds two deadline cases and changes dynamically discovered watch metadata; the 108 common initial requests are identical, and bounded current-head revalidation covers the new deadline cases and affected Action/watch/child controls. No full current-head 110-case pass is claimed. The eight existing current-head controls passed 16/16 valid samples; one provider-rejected child sample is separately recorded and was not retried. Both new quiet-deadline cases initially had invalid regex graders. After a red/green fixture-based syntax repair with unchanged requirements and actor prompts, their rerun passed 4/4 samples. The rebase changed only web styling; all 110 initial requests and dynamically discovered tool metadata remain unchanged, preserving the eight-case result. The focused total is 20/20 valid samples; this is not a full current-head 110-case run.
- **Native development-client QA:** [refreshed matching-client results](#520 (comment)) passed on `f8beb472c81b18297e4dac5bedb6d4f9c392bdec`, fingerprint `6fabe8c41ef164a8d9100d88463f12435ea928eb`. Real checks covered read-only/operate recovery, interrupted-result Resume and Discard without rerunning commands, draft submission/live detail, a named Action/result/continuation, and a durable Pause hold with explicit release. Release cancelled a draining pause; all-quiet Resume and installed restart persistence remain open. Labelled local/remote shell fixtures covered badge reasons, negatives and navigation. Current application/native inputs are unchanged through the test-only update and rebase, with exact comparison proof; Astra found no concrete path requiring a repeated device run.
- Native shell fixtures prove rendering/navigation, not autonomous child execution. Source and development-client evidence do not pass installed checkpoint acceptance or all-quiet restart/Pause persistence.

## 🖼️ Visual evidence

Synthetic Action metadata with no Action ledger. Before is the installed baseline; the two after views show the refreshed Phase 2 isolated dev client’s single named current-work row and result details. These prove rendering only, not real Action delivery.

![Before: installed baseline with no pending Action notice](https://github.com/user-attachments/assets/5ab393f3-36a4-42ab-9be0-87671733c620)

![After: named Action wait in current work](https://github.com/user-attachments/assets/f5bd52d6-aa52-4e7a-8215-a9c1104be688)

![After: derived result details under current upstream styling](https://github.com/user-attachments/assets/39a1723f-4e37-438c-a373-14cb96f0696c)

## ⛔ Acceptance still open

- **Before source merge:** exact-head GitHub CI/Codex review. Source checks, Quick CI, native development QA, model assessment and local integration review are complete. Normal context-budget limits pass without an approval label.
- **Later installed checkpoint:** all four acceptance scenarios in #482, including installed mobile/remote behavior, isolated restart/Pause persistence, and the remaining Phase 1 checks.
- Child badge fixtures prove rendering/navigation only. Actual child Action ownership remains Phase 3.

This PR does not waive any of these gates.

Implemented with GPT-6.1 Sol through the Codex harness in LastCode, reviewed by Astra High, with a Claude writing pass for guidance and app copy.

Co-Authored-By: Codex <[email protected]>

Carry-Source-Ref: refs/lastcode/carry-sources/pr-520/a57aefcd20ba2467dce60e84e09171e17db16709
Carry-Source-Base: 1556523
Carry-Source-Head: a57aefc
lastobelus added a commit that referenced this pull request Nov 1, 2026
Keep app-owned delegated tasks unfinished while a resumable Project Action owns their continuation. Bind calls to native provider executions, persist the owner with its continuation fence, and preserve exact task ownership through local and linked-environment waits, recovery, cancellation and final delivery.

Part of #482. Reuse the existing background-result and pause-delivery repairs from #484 and #497.

Carry-Group: incubator
Carry-Fix: #482
Carry-Observation: The ownership fences depend on pause-aware Action delivery and linked-environment delegation in Incubator. Provider attribution, task finalization, recovery and remote handoff must ship together.
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
lastobelus added a commit that referenced this pull request Nov 1, 2026
A delegated child can end its turn while a resumable Project Action is still running. That turn must not become the task's final result or make the parent poll for progress.

Part of #482, which stays open. This is Phase 3 of the four-phase rollout.

- Keep the same delegated task through the child Action, its automatic continuation and the eventual final result. Intermediate turns remain unfinished; the parent gets one final result.
- Attribute native Codex and Claude Action calls to an exact execution. Refuse unattributed child calls, retain checks after remote disposal, and preserve ordinary top-level and explicitly independent Actions.
- Stage remote delegation before execution, recover interrupted handoffs, and stop only work owned by the cancelled task. Discarding an interrupted Action reports interruption rather than an earlier waiting message.
- Protect outstanding owned work from automatic settlement and enable child Action guidance conditionally on runtime capability and an accepted installed checkpoint. Reuse #484 and #497.

Validation on the refreshed base: ownership/Stop/remote protocol, native-subagent cancellation and context-budget integration passed 154 tests across six suites. All 35 affected package typechecks passed. The provider/replay and thread-lifecycle checks passed 622 tests across 10 suites; the final combined changed-file check passed 1,461 tests across 49 files and all fast checks, including the full PDF browser file. Current generated Action requests decode; Action policy, tool descriptions, schemas and cases match the previously validated head. The shared runtime PR-wait sentence differs; this does not claim full request equivalence. Prompt growth remains the approved 1,214 Claude / 1,212 Codex / 1,438 tool-inventory bytes.

Earlier development evidence remains separately pinned: an actual isolated Codex parent/child run launched the command once, resumed the child under the same task ID, and delivered one final parent result without parent polling. Original/later-round Stop and interrupted-result regressions have red/green proof. A refreshed-base archive test also reproduced a race in its global no-event assertion; it now settles descendant and owner completion results through the existing locked recovery helper before checking rejected deletion. No production code or expectations changed in that repair. The remote background-cancellation finding is fixed separately: disposal routes its latest ended owned run through normal interruption when provider background work remains, with a narrow unfinished-item read and an unrelated-later-round guard. The existing remote Stop regression fails before the fix and passes both cases afterward. Queued cancellation now settles explicitly owned local rounds and remote associations even when their run never started; those unstarted runs cannot inherit or interrupt unrelated provider background work. Existing follow-up and remote-protocol cases reproduce both failures before the correction and pass afterward, including independent result delivery and a parent wake. Shutdown now interrupts the exact owned task before disposing its Action; existing original/later/remote integration cases reproduce stale successful recovery before the fix and pass afterward. Remote activation also uses common update-drain admission; drain and claim-race regressions preserve refusal without side effects, retry and receipt replay. The repeated Web CI failure reached the PDF test deadline during its fourth document load. Its independent restoration and first-page/different-file scenarios are split into two cases, preserving assertions and the deadline; both pass in the real browser locally. Final focused model checks passed 10/11 retained samples across five cases; all five passed by majority. The failed handoff sample made extra shell reads without launching an Action. The full model run passed 197/224 completed samples, with 27 failures and two incomplete samples retained (93/113 cases passed by majority). Audited failures include actor misses, fixture/policy mismatches and API errors; no concrete blocking Phase 3 regression was established. These are historical model results, not an exact-head full pass or an absence-of-regression claim. Quick CI passed for `9ef44f5f76a3d670230613cbbf47bbe0bc915b3c` against `446b3b054710e41c615a4b6689bab9f2aa4af0de`. Renewed GitHub checks/review are pending.

Installed Phase 3 acceptance remains open: exact installed artifacts, the required provider pairs and later rounds, cross-environment ownership/recovery, cancellation on reused provider sessions, Pause/restart, matching clients and representative real use. Source merge does not enable ordinary child-owned Actions for an unaccepted installed version. Child PR watching remains Phase 4.

Implemented by GPT-6.1 Sol through the Codex harness, with Codex implementation assistance and Astra High source reviews. Claude wrote the agent guidance.

Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

Carry-Source-Ref: refs/lastcode/carry-sources/pr-555/9ef44f5f76a3d670230613cbbf47bbe0bc915b3c
Carry-Source-Base: 446b3b0
Carry-Source-Head: 9ef44f5
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