Repository navigation
fix: preserve native prompt provenance through database aliases - #166787
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 October 7, 2026, 9:15 PM ET / October 8, 2026, 01:15 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch preserves Codex fork provenance across database aliases, keeps catalog continuation data cloneable, corrects hosted-search eligibility, and synchronizes an existing startup fixture. Example: A user forks a sender-attributed Codex turn whose database is reached through a directory alias.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: the producer defects remain on current main, and no actionable introduced defect was found. The documented broader release-validation incident remains outside this PR’s fix claim. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherOpenClaw’s Codex plugin connects local conversations to native Codex threads. Transcript annotations, catalog continuation results, and search-policy decisions supply the evidence and configuration needed to continue or fork those conversations. flowchart TD
A[User continues or forks a conversation] --> B[Codex plugin]
B --> C[Transcript admission and database identity]
B --> D[Catalog continuation binding]
B --> E[Search policy owner]
C --> F[Verified native turn boundary]
D --> G[Stored upstream link and scoped callback]
E --> H[Native thread search configuration]
Technical reviewBest possible solution: Keep physical database identity, plugin callback lifetime, and search permission decisions with their existing owners while investigating the broader release incident separately. Do we have a high-confidence way to reproduce the issue? Yes: current source exposes the lexical-alias rejection and executable wrapping of continuation data, and the PR supplies targeted failing-before regressions. This review did not execute them. Is this the best way to solve the issue? Yes: the patch repairs the producing owners, reuses physical database identity and shared search policy, and preserves existing public contracts rather than adding downstream workarounds. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 89b6b48f8c48. Provenance checked
TestingProof path: in-process harness. Added test files: 6. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +51, Tests +255. Total +306 across 12 files. View PR surface stats
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 HistoryReview history (5 earlier review cycles)
|
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
499ade6 to
523262d
Compare
|
@clawsweeper re-review Review-only refresh for head 523262d. Preserved the newly added native hosted-search policy repair, rebased onto main 5fa9edb (including the unrelated Workboard generated-assets CI fix from #166786), and made the existing provenance alias fixture use a junction on Windows. Range-diff confirms the three original patches were preserved; git diff --check and the Linux alias-fixture smoke passed. Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/37704961759. Please review the added policy behavior in addition to the two repairs already rated platinum hermit. Do not merge; this request is preparation for human review only. |
|
🦞👀 Re-review progress:
|
Separate persistent hosted availability from the current native surface; keep policy and memory restrictions enforced. Prove the real unrestricted/restricted/unrestricted binding flow. Co-authored-by: RomneyDa <[email protected]>
…/fix-ci-for-pull-request-166787
Complete authenticated live proofTested exact PR head Result: 3 passed, 1 skipped; process exit 0. The previously missing authenticated chain passed in full:
The existing live test and its assertions were unchanged. The complete file ran in its original order, not a bypassed helper or an isolated replacement fixture. Steering and the general authenticated harness flow also passed; the sole skip was the disabled-harness opt-in sentinel. Execution identity
Sanitized successful phase output (native model identifiers omitted): This closes the complete-authenticated-replay evidence gap identified by ClawSweeper on this head. It does not establish the root cause or repair of the original frozen-candidate Linux FRV |
…claw#166787) * fix: preserve native prompt provenance through database aliases Co-authored-by: RomneyDa <[email protected]> * fix: preserve catalog continuation data through instance binding Co-authored-by: RomneyDa <[email protected]> * test(codex): use a junction for Windows database aliases Co-authored-by: RomneyDa <[email protected]> * fix: preserve native hosted search policy without a managed provider Co-authored-by: RomneyDa <[email protected]> * fix(codex): preserve hosted search bindings across restricted turns Separate persistent hosted availability from the current native surface; keep policy and memory restrictions enforced. Prove the real unrestricted/restricted/unrestricted binding flow. Co-authored-by: RomneyDa <[email protected]> * fix(test): join startup maintenance before plugin reload assertions * refactor(codex): keep search-policy coverage within source line caps --------- Co-authored-by: RomneyDa <[email protected]> Co-authored-by: roboclaw-bot <[email protected]>
Latest authenticated live proof
Complete flow passed on exact PR head
e889bcfc834e11e8bf57cdf8ccd2d4f5303fc08c: 3 passed, 1 skipped. Native catalog continuation → supervised source turn → warm canonical fork and child turn → Gateway restart → cold descendant fork and turn all passed with unchanged assertions, real API-key authentication, and native Codex 0.160.0. Native Linux x64 Testbox; freshly rebuilt image; canonical case 31.573 s, complete Vitest 151.34 s. Execution identity and sanitized evidence.This supersedes the older partial-live-replay limitations recorded below. The original frozen-candidate Linux FRV
drift-mismatchroot cause and fix remain unproven; passing this flow is not an original-incident repair claim. The release candidate and active FRV were untouched. No new code was added for this proof. The PR was independently merged during proof preparation; this run tests the PR head, not a separate replay of the squash commit or newer main.What Problem This Solves
Fixes issues where supervised Codex message forks lose verified native provenance through database aliases, catalog continuations lose their upstream link, or a forked native session encounters a search-policy mismatch when no managed search provider is configured.
User Impact
Supervised message forks retain verified native turn identity through database aliases. Catalog continuation payloads remain worker-cloneable while their declared completion callback retains instance and consumer lifetime. Boundary-integrity checks remain unchanged; no configuration or schema changes.
Why This Change Was Made
The admission owner records a canonical database locator, while the harness may retain a lexical alias. Comparing strings silently declines the annotation capability. Use the existing physical database identity owner instead, retaining recorder ownership, session incarnation, active-writer, anchored-row, and live-authority checks.
Scope: these are independently evidenced producer repairs, ready for review on their own merits. They were discovered while investigating the stable FRV supervised-fork rejection, but are not claimed to resolve that broader Linux incident. The frozen release candidate is not changed by this PR.
Evidence
mirrorIdentity. Instrumentation isolated/tmpversus/private/tmplocators for the same database.pnpm test extensions/codex/src/app-server/run-attempt.fork-provenance.test.ts --maxWorkers=1: 60.23 s command wall, 12.016 s test time. Hosted CI seconds not yet measured. No new sleeps, polls, process boots, or serial configuration.rust-v0.160.0(79b1b666f2e8551f8abbbca34957227f67f3f553) was personally inspected:beforeTurnIdis exclusive, turn identities come from native turn events, and injected history is not equivalent to native turn history.drift-mismatch, "The local history has no verified boundary in this Codex thread." The job retained no native transcript diagnostic artifact, so its exact local row/native identities are not recoverable from that log alone.DataCloneError, followed by a local fork rejection because model selection was locked. This separate producer failure must be resolved before the same entry point can supply live boundary evidence. No passing retry is being counted as a fix.Iteration: catalog continuation producer
The current-main factory registration introduced after the frozen candidate wraps the complete catalog continuation result as executable. Its nested
upstream.refand marker become Proxies, so the session writer worker rejects them withDataCloneError; continuation reports success but the upstream link is absent. The subsequent fork falls through to the correctly locked local-history path. The repair declares onlyafterConversationBoundexecutable and preserves data values by reference, including the native-gated catalog adapter.Checks
Original implementation validation: full build, core and extension-test type graphs passed. The original
check:changedattempt stopped at an unchanged unused export inscripts/publish-model-catalog.mts(readRecommendedModels); no suppression was added.Review-readiness refresh: the old hosted CI run failed in the unrelated Workboard generated-asset check and cancelled remaining lanes. PR #166786 fixed that on
main; this branch is rebased onto5fa9edbad09902107a2ac64d7d7d7ae08b58a416, including that fix. Fresh exact-head CI failed on an inherited plugin-lifecycle admission-contention fixture; build/type lanes were cancelled, and the aggregate gate failed as a consequence. The corrected head is10634ef3710071c91eb54075a739102e9a5eaf85; its final CI run is terminal with an inherited startup-error fixture failure and cancellation fallout, as detailed below.ClawSweeper revision 4: platinum hermit, no findings, no before-merge requests. Revision 4 reviewed
523262df8fdeat 2026-10-08 00:02 UTC: no code/security findings, before-merge requests, or rank-up moves. The final accepted-finding repair at10634ef371007has separate fresh AutoReview and red→green boundary proof; no current-head ClawSweeper publication is claimed.Iteration: native hosted search policy
Preserves the author's subsequent
499ade6fcec7repair during the rebase. Native hosted search no longer inherits a false denial merely because no managed search provider materialized aweb_searchtool. The existing policy owner supplies persistent permission separately from current-turn permission; runtime allowlists, sender/profile policy, plugin exclusions, unsupported providers, and memory-flush suppression remain enforced. Existing search-policy tests were moved into a focused suite and extended rather than duplicated.Review preparation
git diff --checkpassed; native Node Linux directory-alias fixture smoke passed. Windows execution was not run locally.rust-v0.160.0,codex-rs/core/src/thread_rollout_truncation.rs:214–256,codex-rs/app-server/src/request_processors/thread_processor.rs:4930–4945,codex-rs/core/src/tools/hosted_spec.rs:14–43, andcodex-rs/core/src/config/mod.rs:3085–3129.Review preparation and CI session
Accepted finding: temporary search restriction
The author’s added hosted-search repair (
499ade6fcec7, authored/committed by @RomneyDa) correctly enabled hosted search without a managed provider, but reused this turn’s native-surface decision as persistent availability. A latertoolsAllow: ["message"]turn therefore classified the restriction as permanent and replaced the normal binding. The correction reuses the existing search-plan owner without transient inputs for persistent eligibility; current-turn search still requires the current native plan, policy authorization, and the memory-flush veto. No permission or configuration contract is widened.523262df8fdewith persistentfalseinstead oftrue; 14 siblings pass. The strengthened existing lifecycle test also fails on pre-fix code because the restricted thread incorrectly receives a persistent configuration fingerprint.pnpm test extensions/codex/src/app-server/dynamic-tool-build.web-search.test.ts extensions/codex/src/app-server/thread-lifecycle.binding.test.ts --maxWorkers=1 -t 'projects search tools|limits memory flush tools|uses a transient Codex thread when runtime toolsAllow|persists config-denied search'. 33.69s command wall; policy suite 15.03s, lifecycle selection 12.72s; strengthened lifecycle case 4.500s. No new sleep, polling, process fixture, or test-runner configuration. Hosted CI seconds for this revision are not yet measured.Inherited CI evidence and follow-up
Previous failed job tested GitHub merge commit
c75e245d8950959b2eac6ff4d486124cf7b1c21b, combining feature523262df8fdewith maina1ca0cd615f4ce9c5b486829e1ecadad5493e8c5. Its second explicitplugins.reloadwas refused before mutation entry because the lifecycle lease was held. The timeout recovery assertions had already passed. The fixture and relevant admission/reload owners are byte-identical between that main target and the feature head; this scenario does not invoke the changed catalog continuation factory.A one-run baseline on that exact main target, with the original eight-file selection, 2 workers, forks, and
isolate:false, yielded 128 passed / 2 failed, 107.053s wall. The exact timeout case passed, but the sibling startup-error case independently received the same lease-admission refusal. This demonstrates pre-existing admission contention, not an exact reproduction or repair of the hosted failure. Baseline Node was 26.8.2 versus hosted 24.19.0. A separate baseline reader test observed changing pending-provider metadata.Follow-up: capture the lease holder/acquisition/release and config-watcher observations before changing fixture control. No speculative production lease fix, mutation retry, larger wait, or assertion weakening was applied to the inherited CI cases. Kept separate under the requester’s allowance to hold unrelated main failures.
Final review disposition
Ready for maintainer review; held on unrelated CI, not merged. At 2026-10-08 00:28 UTC, GitHub reports head
10634ef3710071c91eb54075a739102e9a5eaf85open, non-draft, and conflict-free (MERGEABLE), but the merge gate remainsBLOCKED. Latest published ClawSweeper rating is platinum hermit 4/6, with no findings on the preceding reviewed head; the final correction has fresh clean independent review and 17 passing focused tests.Final CI run 37707134363, attempt 1, tested merge
937d8abde6afac24696f0d76b375259111b04fe1against mainc2e7494562a5567e85155d81cc37fbb5064f6f64on Node 24.19.0. All 74 jobs ended: 36 success, 25 skipped, 11 cancelled, 2 failure. The sole independent failure was startup-error fixture lease admission,src/gateway/server-plugins.startup-error.test.ts:229, “keeps module-load startup errors diagnostic while healthy plugins reload and disable”: activation was preempted by the same admission-busy refusal observed on the main baseline. The 8-file suite recorded 129 passed / 1 failed; the second failed job is the aggregate gate. Build/lint/type cancellation is not claimed as passing proof.The original timeout case passes in this run, but main independently added startup-maintenance synchronization to that fixture in
1cb7db99a5fd0; this PR did not fix it. The startup-error fixture and relevant mutation/lease/reload/service owners are unchanged from the baseline to the final main target. Baseline evidence still has the previously stated Node-version and sibling-case limitations. No exact final-main/Node-24 reproduction or causal lease-holder identification is claimed.CI repair (2026-10-07)
The hosted startup-error fixture raced deferred post-ready plugin-registry maintenance, independently of the PR's provenance/search changes.
server.startupSettledjoins mandatory sidecars, not that maintenance lifetime. A temporary lease trace reproduced the same admission refusal in the sibling entry-open case and identifiedrunGatewayPostReadyStartupMaintenanceas the competing lease owner between explicit reload RPCs. The original eight-file local replay passed both startup-error cases; that passing replay is not treated as a fix.The fixture now observes the real maintenance promise and awaits its settlement before issuing plugin mutations. The observer returns the unchanged production promise and is restored through test cleanup. All activation-failure, rollback, diagnostic, and retained-runtime assertions remain unchanged; no mutation retry, larger timeout, assertion weakening, or production lease change. Incorporated tested-main
c2e7494562a5567e85155d81cc37fbb5064f6f64, including the existing sibling cleanup-fixture maintenance join.The changed-check gate also exposed original PR line-cap growth. Both strengthened search-policy cases now live in a registered sibling test module under the same binding suite's setup/cleanup, without another Vitest worker or duplicated coverage. Dynamic-tool construction reuses its existing normalized plugin-exclusion helper instead of repeating that policy.
node scripts/run-vitest.mjs src/gateway/server-plugins.startup-error.test.ts --maxWorkers=1: 66.99s command wall / 62.03s Vitest, approximately 31s test time. This existing file exercises real Gateway startup, filesystem plugin loading, activation rollback, and healthy-plugin disable; no new Gateway boot or wall-clock wait was added.git diff --check, targeted fixture lint, formatting, and line-cap ratchet pass. Search-policy/lifecycle focused proof, complete changed checks, standalone stability runs, and original-shard replays are in progress.Plugin first is retiring,server-plugin-reload.memory.test-support.ts:192) was not observed in the cited hosted run; no repair of that separate failure is claimed.e889bcfc834e11e8bf57cdf8ccd2d4f5303fc08c. Required hosted CI is pending; PR remains open and not merged.