Skip to content

fix(tasks): keep Incognito task content out of durable records - #156446

Merged
vincentkoc merged 1 commit into
mainfrom
fix/incognito-task-content-20260923
Sep 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/incognito-task-content-20260923

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Native delegated tasks can retain Incognito prompts and task summaries in durable task and flow records.

User Impact

Incognito task records retain content-free lifecycle information, while live task activity, cancellation, and completion delivery continue to work. Ordinary tasks keep their existing content.

Why This Change Was Made

Project conversation content before the requester-scoped task runtime calls persistence, preserving the existing task identity, assignment checks, cancellation marker, and completion ownership. This keeps task rows and mirrored flows consistent without adding a second registry or changing storage schemas.

Evidence

  • Personally traced native Codex and Copilot task producers, durable task/flow writers, live activity, completion delivery, and cancellation consumers.
  • Fresh scoped P0–P2 review completed with no findings.
  • Added ordinary/Incognito coverage at the SDK writer boundary, including legacy and exact-assignment paths, the cancellation marker, and full live completion content.
  • Added an isolated durable-store regression covering task and flow rows, reload, and transient activity. It does not start another Gateway.
  • The original code failed the real durable task/flow content assertion. The reviewed repair passed all 108 tests across the five targeted SDK, persistence, native Codex mirror/completion, and Copilot mirror suites (57.75 seconds).
  • All 35 required changed checks passed on the exact reviewed source (570.49 seconds), including core and extension production/test typechecks, lint, Knip, SDK boundary/budget checks, and unchanged schema v18. Hosted exact-head CI and review are pending; this PR is not ready to merge.

Production: +44/-5 lines for one shared persistence projection; tests: +203/-0 using the existing SDK fixture plus a 93-line durable-store regression; documentation: +2/-0. No deployment, storage migration, or blanket native telemetry guarantee.

Test cost

Six new cases reuse the existing SDK fixture and a 93-line isolated durable-store fixture. The latter exercises real task/flow persistence without another Gateway startup. The five targeted suites run 108 tests in 57.75 seconds; the failing original-code persistence case took 27.17 seconds. No broad Vitest suite was run.

Required base refresh

Rebased once to include the canonical footer-fixture repair 91ee6aa3de10, which fixes the observed shared hosted typecheck and six-case test failure. All four reviewed file hashes, the dependency lock, and the stable patch ID are unchanged. The recorded 108-test proof and 35 changed checks apply to those identical bytes; fresh exact-head hosted CI and review are pending for 1eb725195cadef05c69ced17deed9290b0a2410a. No source behavior was changed in this refresh.

@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 23, 2026 10:46
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 7:12 AM ET / 11:12 UTC (Revision 2).

ClawSweeper review

What this changes

Redacts Incognito prompts, labels, summaries, results, and free-form errors before saving delegated task records, with regression coverage and session documentation.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on current main. The reviewed patch preserves task ownership, cancellation, and live completion delivery, and I found no blocking correctness defect.

Priority: P2
Reviewed head: 1eb725195cadef05c69ced17deed9290b0a2410a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful persistence coverage, documented validation, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Inspected coverage exercises the shared runtime against durable task/flow storage and separately checks live completion content; reported executions were not rerun here. Existing nullable storage fields, unchanged identity contracts, and reload coverage support compatibility without migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Inspected coverage exercises the shared runtime against durable task/flow storage and separately checks live completion content; reported executions were not rerun here. Existing nullable storage fields, unchanged identity contracts, and reload coverage support compatibility without migration.
Evidence reviewed 9 items Introduced patch: The pinned introduction changes only the shared task runtime, its two test files, and session documentation. The projection covers creation, progress, finalization, and delivery-status writes without changing assignment or completion-custody checks.
Still needed on main: Fetched main still forwards task content directly into persistence at all four entry points. Its documented Incognito behavior keeps conversation state out of durable session storage; this patch closes the separate native-task persistence gap.
Durable boundary regression: The added regression uses real task/flow storage, checks both ordinary and Incognito records, reloads the task, and verifies that live activity disappears after reset. The captured PR body reports original-code failure and 108 passing targeted tests in 57.75 seconds; these tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

Native agent integrations send delegated task updates through OpenClaw's shared task runtime. That runtime persists task and flow records while completion delivery separately carries the full result back to the requesting session.

flowchart TD
  A[Native delegated task] --> B[Requester scoped runtime]
  B --> C{Incognito session?}
  C -->|Yes| D[Remove conversation content]
  C -->|No| E[Preserve task content]
  D --> F[Durable task and flow records]
  E --> F
  A --> G[Live activity and completion delivery]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +39, Tests +203, Docs +2. Total +244 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 44 5 +39
Tests 2 203 0 +203
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 249 5 +244

Review metrics

None.

Technical review

Best possible solution:

Keep privacy projection at the shared persistence boundary while preserving full transient results and existing lifecycle contracts.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: native producers supply conversation content to main's unfiltered task writers, which save it in task and flow records. The supplied regression targets that boundary; no runtime reproduction was executed here.

Is this the best way to solve the issue?

Yes. One shared projection covers both native integrations and both writer styles while leaving completion delivery and ownership enforcement intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0c7d77cd47ab.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused privacy repair for Incognito delegated-task persistence with limited subsystem scope.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Inspected coverage exercises the shared runtime against durable task/flow storage and separately checks live completion content; reported executions were not rerun here. Existing nullable storage fields, unchanged identity contracts, and reload coverage support compatibility without migration.

Evidence

What I checked:

  • Introduced patch: The pinned introduction changes only the shared task runtime, its two test files, and session documentation. The projection covers creation, progress, finalization, and delivery-status writes without changing assignment or completion-custody checks. (src/plugin-sdk/agent-harness-task-runtime.ts:85, 1eb725195cad)
  • Still needed on main: Fetched main still forwards task content directly into persistence at all four entry points. Its documented Incognito behavior keeps conversation state out of durable session storage; this patch closes the separate native-task persistence gap. (src/plugin-sdk/agent-harness-task-runtime.ts:215, 0c7d77cd47ab)
  • Durable boundary regression: The added regression uses real task/flow storage, checks both ordinary and Incognito records, reloads the task, and verifies that live activity disappears after reset. The captured PR body reports original-code failure and 108 passing targeted tests in 57.75 seconds; these tests were inspected, not executed during this read-only review. (src/plugin-sdk/agent-harness-task-runtime.persistence.test.ts:20, 1eb725195cad)
  • Compatibility and cancellation: Existing storage already accepts absent summaries and retains task identity and lifecycle metadata. The patch leaves ordinary inputs unchanged and preserves the exact cancellation marker. It changes future content projection without changing schema, row identity, or performing a historical-data scrub. (src/tasks/task-registry.store.kernel.ts:189, 1eb725195cad)
  • Native producer and live delivery: Codex completion persistence passes results through the changed runtime, but live delivery reads the original pending completion result independently. Copilot also uses the shared runtime. The PR explicitly claims native Codex mirror/completion compatibility, establishing the dependency-inspection signal. (extensions/codex/src/app-server/native-subagent-completion-delivery.ts:101, 1eb725195cad)
  • Dependency contract inspected: The dependency's protocol identifies ephemeral threads as non-durable, and its thread-start regression checks that they expose no rollout path. Repository ownership was verified through the source cache's origin URL. This supports the native boundary context, not a claim of new live execution. (codex-rs/app-server/tests/suite/v2/thread_start.rs:1082, be2951ea34f0)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-23T10:52:52.060Z sha d6e76015bd79b8ef03090b24ecba184d46981124 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the fix/incognito-task-content-20260923 branch from d6e7601 to 1eb7251 Compare September 23, 2026 11:05
@vincentkoc
vincentkoc merged commit a050a07 into main Sep 23, 2026
212 of 213 checks passed
@vincentkoc
vincentkoc deleted the fix/incognito-task-content-20260923 branch September 23, 2026 11:33
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
roboclaw-bot added a commit that referenced this pull request Sep 26, 2026
Backport #156446: a050a07
Selected backport #156937: 5b90a73

Project Incognito content at all four existing durable task writers while
retaining lifecycle, cancellation and live completion behavior. Page the
SQLite usage reader and separate navigation from selected payload bodies,
keeping checkpoint, branch and publication semantics.

The original real worker OOMs on the paired synthetic fixture; the repaired
worker completes the exact independent rollup under the unchanged 512MiB
heap limit. This bounds payload retention, not arbitrary navigation size.
38 targeted cases and scoped/composed gates pass; independent review is clean.

No assignment SDK rewrite, durable health namespace, Doctor feature,
schema, version or dependency change. Preserve the usage source's thanks
to @Conan-Scott for the report and allocation control.

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: jalehman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant