Repository navigation
Conversation
Avoid repeating deep immutability inspection of admitted transcript payloads after generic memo rotation. Preserve writable SDK detachment and hydration sealing; extend the owner regression and initial-context benchmark.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The final performance evidence is now in the PR body: all 400 measured contexts match; initial-context thread CPU falls 89.4%, sampled allocation 95.9%, and pooled p95 wall time 88.6%. Focused mutation-isolation, SDK, browser, and prompt-prefix proof passes. The unchanged head is @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR reuses transcript ownership when preparing immutable context projections and extends the existing regression and benchmark. Example: Prepare context from a hydrated 1,700-message conversation containing tool-result evidence.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR removes redundant inspection through the existing ownership boundary, preserves mutation isolation, and has no actionable findings; the exact-head CI gate passes. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSession hydration seals transcript payloads; model-context preparation removes storage-only metadata, publishes isolated context, and retains writable SDK detachment. flowchart LR
A[Persisted transcript] --> B[Hydration and sealing]
B --> C[Owned payload roots]
C --> D[Pure context projection]
D --> E[Frozen model context]
B --> F[Writable SDK detachment]
Technical reviewBest possible solution: Consume the existing sealed-payload guarantee at the shared projection owner while retaining publication freezing and writable SDK detachment. Do we have a high-confidence way to reproduce the issue? Source shows that memo rotation makes the existing projection helper traverse sealed tool evidence before discarding it; the PR reports an exact-parent failing regression, but no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete fix: reuse the existing ownership fact in the shared helper, extend the existing regression, and preserve the established cloning and opaque-input boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 103e91ab0d51. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +12, Other +19. Total +32 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 21, 2026, 5:22 AM ET / 10:22 UTC. |
|
Merged via squash.
|
Preserve the initial-context benchmark added in #203040 alongside endpoint rewrite measurement. The endpoint production fix is unchanged. Integrated maintenance and codec tests pass; Codex autoreview has no actionable P0-P2 findings.
…3044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (#203026) fix(ci): shard capable compatibility UI targets (#203042) perf(agents): restore selected subagent payloads once (#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (#203040) refactor(hooks): separate event predicates from hook registry (#203017) fix(ci): align update export audits with their consumers (#203030) fix: keep cold baseline checks within the existing heap limit
* feat: open shared sessions in their source Control UI * feat: open shared sessions in their source Control UI OpenClaw-Publication: a3826b6b-5899-8ff2-a1b5-84961c64219f * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (#203026) fix(ci): shard capable compatibility UI targets (#203042) perf(agents): restore selected subagent payloads once (#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (#203040) refactor(hooks): separate event predicates from hook registry (#203017) fix(ci): align update export audits with their consumers (#203030) fix: keep cold baseline checks within the existing heap limit * fix(session-share): accept the runtime config snapshot in the source link resolver The stored-session link resolver took a mutable config, so the plugin's readonly runtime snapshot failed production and test typechecks. Accept the snapshot type. Document the real Open original setup: allow the link command on the receiver Gateway, set the source Control UI origin, reinstall the source node with all three commands, then approve the widened surface. Move the section ahead of Security boundary and add a troubleshooting entry. Assert through the Gateway catalog list that a provider-supplied link survives streamed and final rows, and drop the menu unit test the browser fixture covers. * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: refactor(test): remove duplicate token startup wait case (#203087) fix: keep Plugin SDK declarations within the build limit fix(ci): remove unused hook type exports (#203074) fix(test): exercise the sign-in callback path guard (#203075) refactor(tts): separate caption eligibility from text helpers (#203068) test: reuse worker preload options (#203058) refactor(test): share Bun native-policy test launcher (#203064) fix(cron): a chat-created automation's failure notice reaches that chat (#203056) refactor(test): remove duplicate claw origin rejection case (#203067) refactor(channels): move chunk-mode lookup to streaming readers (#203047) refactor: separate skill queries from workspace discovery (#203045) fix: resume new chat turns in retained tasks after a restart refactor: separate usage pricing preparation from formatting (#203043) fix: avoid repeated filesystem probes before agent turns (#203057) perf(agents): preserve sealed history during endpoint compaction (#203037) fix(test): give deferred identity fixtures read scope (#203053) refactor(test): remove redundant channel catalog facade (#203052) refactor(cli): isolate daemon port presentation (#203020) refactor(cron): isolate CLI input parsing (#203031) * chore(plugin-sdk): record the approved session-discussion surface growth Open original adds two exports to openclaw/plugin-sdk/session-discussion: the stored-session Control UI path resolver and the session path parser. Raise the public export and callable budgets by two for them. Use neutral fixtures for the rejected-origin and rejected-query URL tests so the fixtures do not resemble credentials; the same rejections are covered. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…law#203040) Avoid repeating deep immutability inspection of admitted transcript payloads after generic memo rotation. Preserve writable SDK detachment and hydration sealing; extend the owner regression and initial-context benchmark.
* feat: open shared sessions in their source Control UI * feat: open shared sessions in their source Control UI OpenClaw-Publication: a3826b6b-5899-8ff2-a1b5-84961c64219f * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: fix(ci): decouple boundary fixture from timing inventory (openclaw#203026) fix(ci): shard capable compatibility UI targets (openclaw#203042) perf(agents): restore selected subagent payloads once (openclaw#203039) fix: keep standalone context from completing QA tool steps perf(sessions): reuse sealed ownership for context projections (openclaw#203040) refactor(hooks): separate event predicates from hook registry (openclaw#203017) fix(ci): align update export audits with their consumers (openclaw#203030) fix: keep cold baseline checks within the existing heap limit * fix(session-share): accept the runtime config snapshot in the source link resolver The stored-session link resolver took a mutable config, so the plugin's readonly runtime snapshot failed production and test typechecks. Accept the snapshot type. Document the real Open original setup: allow the link command on the receiver Gateway, set the source Control UI origin, reinstall the source node with all three commands, then approve the widened surface. Move the section ahead of Security boundary and add a troubleshooting entry. Assert through the Gateway catalog list that a provider-supplied link survives streamed and final rows, and drop the menu unit test the browser fixture covers. * Merge remote-tracking branch 'origin/main' into land/open-original-203044 * origin/main: refactor(test): remove duplicate token startup wait case (openclaw#203087) fix: keep Plugin SDK declarations within the build limit fix(ci): remove unused hook type exports (openclaw#203074) fix(test): exercise the sign-in callback path guard (openclaw#203075) refactor(tts): separate caption eligibility from text helpers (openclaw#203068) test: reuse worker preload options (openclaw#203058) refactor(test): share Bun native-policy test launcher (openclaw#203064) fix(cron): a chat-created automation's failure notice reaches that chat (openclaw#203056) refactor(test): remove duplicate claw origin rejection case (openclaw#203067) refactor(channels): move chunk-mode lookup to streaming readers (openclaw#203047) refactor: separate skill queries from workspace discovery (openclaw#203045) fix: resume new chat turns in retained tasks after a restart refactor: separate usage pricing preparation from formatting (openclaw#203043) fix: avoid repeated filesystem probes before agent turns (openclaw#203057) perf(agents): preserve sealed history during endpoint compaction (openclaw#203037) fix(test): give deferred identity fixtures read scope (openclaw#203053) refactor(test): remove redundant channel catalog facade (openclaw#203052) refactor(cli): isolate daemon port presentation (openclaw#203020) refactor(cron): isolate CLI input parsing (openclaw#203031) * chore(plugin-sdk): record the approved session-discussion surface growth Open original adds two exports to openclaw/plugin-sdk/session-discussion: the stored-session Control UI path resolver and the session path parser. Raise the public export and callable budgets by two for them. Use neutral fixtures for the rejected-origin and rejected-query URL tests so the fixtures do not resemble credentials; the same rejections are covered. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Preparing model context from a long conversation can re-inspect an entire already-sealed transcript message, including tool evidence that the projection immediately removes. The transcript owner retains the immutability fact after the generic freezer memo rotates, but the projection helper did not consume it.
Related: #202547, #202136, #200888, #199480.
User Impact
Less CPU and allocation during initial-context preparation. Model-context bytes, hydration isolation, writable SDK behavior, and persistence remain unchanged. No configuration, schema, migration, or new cache.
Why This Change Was Made
The existing pure-projection helper now checks transcript ownership before generic deep inspection. Mutable and opaque SDK graphs keep their existing validation and detachment, and projected results still receive normal freezing. Hydration sealing and the publication clone remain necessary; this removes the redundant source inspection at its owner.
Production delta is +1 line: an existing-owner import and a condition substitution. The regression extends the existing memo-rotation fixture. The existing compaction benchmark gains an initial-context-only arm and verifies that baseline source replacement actually loaded before measurement.
Evidence
The regression fails on exact parent
4c7701017b653fec558f078ed1878059ebe5de39at the unwanted inspection of sealed history, and passes with this change. It checks identical projected output, shared mutation rejection, and retained-context isolation after writable SDK edits. 248 focused source tests pass, plus one Chromium transcript-entry test and ten mocked-Gateway chat messaging E2E tests. Isolated Codex autoreview through P2 is clean.All 400 measured outputs have the same complete context hash. Initial-context thread CPU improves 89.4%, sampled allocation 95.9%, and pooled p95 wall time 88.6%. No sample was discarded and no tail exception was needed.
Each cell pools 50 operations across five processes; allocation runs are separate from timing. Before/after wall ranges are 56.060–64.288 / 4.886–7.616 ms. Process-mean CPU ranges are 58.074–59.467 / 6.084–6.398 ms. A/A CPU differs 1.35% and allocation 0.44%. Node 26.12.1, macOS arm64, 32 physical cores, 512 GiB RAM. Local test/typecheck/dead-export work finished before this campaign; light Git/publication/native PR workflow activity overlapped. Host load is recorded per process.
Acceptance declared before measurement: persisted synthetic 1,700-message / 21,158,679-byte fixture; one warmup and ten operations per process; five counterbalanced A/A and five A/B process pairs for timing, with separate collected-inclusive allocation sampling. Require identical complete context bytes, lower initial-context thread CPU and allocation, and no >20% pooled p95 wall regression. Report all samples and spread. This measures the initial-context owner after real hydration, excluding SQL, transport, provider inference, and workspace discovery.
Baseline adds
--owner-file /isolated/base-immutable-data.ts, extracted from the exact parent. Allocation runs add--allocation.pnpm check:changedcompleted with two test-only narrowing errors, subsequently corrected and verified by the affected typecheck/regression, plus an inherited dead-export failure. All other stages passed. The same three unused exports reproduce on the clean exact parent with the same frozen dependency graph:exposeGlobalPackageThroughRelease,resolveGitReleaseCheckout, andwriteGitUpdateResultFixture. Introducing commitb229b2664537d/ #200578 added the first two exports and removed the final consumers of the third. This is an attributed main regression, not a passing full-check claim; no updater repair is bundled. Final benchmark script typecheck, lint, format, and baseline-loaded smoke pass. The focused source run took 132.68 s including compilation; two additional SDK consumer tests took 61.46 s including compilation. The changed regression itself is subsecond.