Skip to content

fix(subagents): retain completion notices across retry and retirement - #199455

Open
dankarization wants to merge 1 commit into
openclaw:mainfrom
dankarization:fix/subagent-completion-notice-c538-20261115
Open

dankarization wants to merge 1 commit into
openclaw:mainfrom
dankarization:fix/subagent-completion-notice-c538-20261115

Conversation

@dankarization

@dankarization dankarization commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Completion notices could be discarded after a failed append or terminal bookkeeping, and an expired or revoked delivery owner could prevent unrelated sweep work.

Change

Port the repair to the current native completion owners: append the requester-visible expiry outcome before retiring its obligation, fence append to the current requester incarnation, preserve observed receipts through retries, and continue sweeping independent rows when authority changes.

Evidence

Current head: 4caed6730919c4bbba9ae77bfe1373356ead8671, based on main 667304f2ddf28bd23295a647f8c7f2a6c4b09e9e; complete tree af9a2f6610ad7b347a6c766aee295574730ba00f. Eight changed files: three production, four tests and the SQLite test-path inventory. Native upstream owners replace the old broader implementation.

On the isolated Linux checkout at previous main 423ae090720, five SQLite integration cases passed in three files, including actual Gateway reset versus compaction, expiry bookkeeping failure/retry and notice receipt failure without redelivery. Seven suspended-pressure cases passed in a separately routed agents-support run. The seven product/test files are byte-identical after the current rebase; only the test-path inventory changed to preserve upstream's large-agent-database entry and register our three paths beside related subagent tests. A Node import/selection check confirmed all four entries exactly once. These are prior-base runtime results plus current-head registry validation, not a new-base full-build claim.

Formatting and whitespace checks passed. One initial bootstrap failed on a missing UI dependency link before tests; the corrected checkout completed the named runs. The first infra-only invocation did not select pressure; the separate seven-case run supplies that coverage. Tests use synthetic state and do not prove external Telegram delivery. Parent source review covered requester/incarnation fences, receipt retention, revoked-owner handling and release paths.

Remaining Checks

Required current-head hosted CI, maintainer review and final custom Gateway build/live acceptance remain pending. Older CI, releases and screenshots are not current-head proof. The focused checkout lacks the newer tokenjuice dependency in this main lockfile; the tests did not require it, so no full-install parity is claimed.

Related: #166964.

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: XL labels Nov 15, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 9426ba1d40b78632dd73fc09a1fe142b0d01be1c, but the PR head is now 083c504176ac214e5843e228a873d8beb24fd9d8. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-15T05:09:49.417Z sha 9426ba1 :: needs real behavior proof before merge. :: [P2] Preserve notices when completion custody retires | [P1] Settle the yielded lifecycle independently of notice permission

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Addressed the two paths in 5d46922.

For the yielded failure, terminal lifecycle settlement is now independent of notice delivery, while the original run, session and revision fences still apply. The real-storage regression failed on the previous head and passes with this change; it checks the cleared wake, failed lifecycle, denied transcript and single release.

For store replacement and expiry, the host retirement diagnostic is limited to the committed original target and still checks the original session ID and revision. The existing storage matrix went from 11 failures / 1 pass on the previous head to 12 passes; an explicit unavailable-operator case remains denied. The focused set passed 21 tests, and formatting, line-cap and lint checks passed.

This does not establish the broader host-diagnostic policy or prove an upgrade/live failure path. The integrated follow-up tests and build are still pending; the PR remains draft while hosted checks are unresolved.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Operator integration update (15 November): the reviewed completion-notice repair is now installed in our production Gateway as integration commit 8d4832349e9963340e4e40c46fbef4660aa3a45c, retaining the prior reviewed overlays. This is deployment evidence for that integration, not an upstream merge.

Validation of this integrated r2:

  • Official production build passed.
  • 91 focused tests passed across the relevant completion/notice suites.
  • Requester-wake E2E: 39/39 passed through the normal repository test wrapper.
  • Independent review of the final six-file integration found no blocking issue; original session/lifecycle/revision and authority fences remain intact.
  • All 209,692 installed files and 6,926 symlinks were independently verified against the frozen artifact manifest; zero mismatches. No data/schema migration or permission expansion was applied.
  • Post-install main/programmer memory status is ready; a real memory search returns results.
  • A fresh live OpenClaw sessions_spawn → requester sessions_yield scenario passed: yield acknowledged at 09:42:21.601 UTC; the child made a NEW separate command at 09:44:54.655 UTC and returned its marker at 09:44:56.022 UTC; the parent automatically resumed with that actual result at 09:45:08.417 UTC. No manual wake, injected result or external delivery was used.

The successful live delegation scenario is separate from the real-storage negative-path regressions; it does not substitute for proving denied notice delivery. Hosted checks on published head 5d469229 currently require Actions approval (action_required); they have not run successfully and are not being described as green. Current-main mergeability is being refreshed separately.

Copy link
Copy Markdown
Contributor Author

Post-install acceptance completed on integration 8d483234: all eight configured Codex models actually replied OK through normal per-session selection and Gateway execution: 6.1 Sol/Terra; 6 Astra/Sol/Luna; 5.6 Sol/Terra/Luna. Requested, effective and response models match; agentHarnessId=codex, no reroute/fallback. The final model catalog has no pending providers. Main/programmer memory is ready and real memory search returned three results. The prior live post-yield proof remains independently successful. No rollback was needed. These are operator integration checks, not a claim that hosted CI has run or that every unrelated UI issue is fixed.

@dankarization
dankarization force-pushed the fix/subagent-completion-notice-c538-20261115 branch from 5d46922 to 083c504 Compare November 15, 2026 10:08
@dankarization
dankarization marked this pull request as ready for review November 15, 2026 10:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T10:32:06.807855Z 083c504 Draft marked ready
ℹ️ 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.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: 4caed6730919c4bbba9ae77bfe1373356ead8671

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Nov 15, 2026
@clawsweeper clawsweeper Bot removed merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 083c504176

ℹ️ 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".

Copy link
Copy Markdown
Contributor Author

Operator acceptance follow-up for the previously reported integration 8d483234:

The initial readiness, memory and Canvas checks missed the main WebUI. SDK/E2E bootstrap had rewritten runtime build metadata after the earlier frontend build. The resulting frontend/runtime build-ID mismatch caused WebUI HTTP 503, while Telegram and Gateway readiness remained operational.

Recovery rebuilt only the frontend with the exact frozen runtime commit/timestamp. Verified the UI overlay (5,011 files), HTTP 200 for the root and eight initial asset references, and a fresh Chromium application mount with 26 JS/CSS responses, no JavaScript errors and matching WebSocket client build identity. The Gateway PID and configuration were unchanged. This was an operator packaging correction; no additional change to this PR was required.

The earlier full artifact manifest describes the package before that UI replacement; the replacement has separate verified overlay evidence. Subsequent acceptance now asserts frontend/runtime identity after all SDK/E2E bootstrap steps and checks actual HTTP assets before cutover. Fresh Chromium proof covers application startup, not the user's authenticated chat history.

@dankarization
dankarization force-pushed the fix/subagent-completion-notice-c538-20261115 branch from 615fa85 to 67bd607 Compare November 21, 2026 20:34
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed gateway Gateway runtime size: XL labels Nov 21, 2026
@dankarization dankarization changed the title fix(subagents): show failure notices when child results cannot be delivered fix(subagents): retain completion notices across retry and retirement Nov 21, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Nov 21, 2026
Rebase the native-owner repair onto main 667304f. Preserve the upstream large-agent-database test entry and register the three completion tests beside related subagent tests. Seven product/test files are identical to the tested 67bd607 tree; registry selection confirms all four new entries exactly once. The five SQLite and seven pressure test results were obtained on main 423ae09; current-head hosted CI remains a separate gate.

This branch has not been deployed

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

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant