Repository navigation
fix(tasks): keep Incognito task content out of durable records - #156446
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 7:12 AM ET / 11:12 UTC (Revision 2). ClawSweeper reviewWhat this changesRedacts 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 Review scores
Verification
How this fits togetherNative 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +39, Tests +203, Docs +2. Total +244 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
d6e7601 to
1eb7251
Compare
|
Merged via squash.
|
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]>
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
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.