Skip to content

refactor(skills): remove the private upload store factory - #175287

Merged
steipete merged 1 commit into
mainfrom
deslop/z19-45-upload-store-owner-20261015
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z19-45-upload-store-owner-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skill uploads keep a private alternate-store factory and runtime test publication even though production creates only the default store.

User Impact

No user-visible change or migration. Upload authorization, validation, staging, installation and cleanup keep their existing owners and behavior.

Why This Change Was Made

Make the existing default store the direct singleton object and infer its internal type. Remove the private constructor options, test-only duration normalization and Symbol publication. Existing fixtures select the real database and temporary-directory owners through module-boundary spies; they exercise the same singleton, worker operations and actual production durations.

All four operations still capture worker authority before enqueue/await. Preserve the module-global queue, idempotency, capacity, validation, exact lease ownership, heartbeat/callback settlement, cleanup retry, archive permissions, physical-store identity and actual install/Gateway authority checks. Keep the separate install-store override outside this cut. No schema, durability, retention, permission, config, CLI, protocol, public SDK, dependency or standalone Phase E memory changes.

Formatted delta:37 net production lines removed,25 test/support lines removed, one exact private-publication inventory row and one orphaned assertion allowance removed;64 overall removed. Moved/dedented operation bodies are not counted as savings. This is a bounded owner slice of the private test-seam family, not its exhaustion.

Best-effort tradeoffs accepted

No production guard or lifecycle guarantee is removed. Private test-only custom durations and locations disappear from production; fixtures observe/invoke the real30-second heartbeat and assert the real15-minute lease. Explicit options from other context callers still delegate unchanged. The existing lease-renewal algorithm is preserved; open #173986 supplies a separate confirmed-lease-loss fix that must survive integration, including its extra fixtures.

Introducing #74430 is active upload functionality, #108325 private-test-seam internalization and #108346 active SQLite ownership—not dormant foundations. Their current descriptions and complete affected owners/callers/fixtures were inspected.

Evidence

  • All four fresh source hashes and20 unique patch contexts matched before application; all four candidate hashes matched afterward. Preserve unrelated inventory drift from main. Retired factory/options/Symbol references are absent from the affected source and inventory.
  • Formatting passed3.207s. Canonical single-file assertion parser confirmed zero casts/zero allowance in5.221s; the baseline only shrinks by the exact orphaned row.
  • Targeted owner/two changed suites/Gateway upload-policy/install-policy types passed158.288s. Fresh independent P0–P2 review published scoped-clean (0.97) after complete final-source verification. Author simplification retained only the private factory/options/publication cut and its fixture migration.
  • Focused six-suite canonical one-worker runtime was INCOMPLETE, with no testcase verdict. The worker-artifact cache miss launched actual compiler16607/run-cache-0; only that positively owned compiler received TERM and managed runner12103 received INT. The durable attempt ended code1 after204.781s; all seven tracked PIDs ended. No artifact bypass, timeout change, retry or skip; this is not a product failure, PASS or demonstrated load cause. Focused syntax lint passed80.623s. The mandatory suppression check completed normally: four cases passed, one failed on unchanged backup-restore preserve-caught-error count1→2 and native-bridge allowance drift95vs94. A prior serial clean-main replay at a05b8f6 reproduced both exact signatures (152.768s); the named sources/test have no diff. No allowance is changed. Exact-head hosted CI must supply missing runtime and broad architecture/type-aware lint/package proof under the shared-host budget.
  • All execution uses isolated task-owned HOME/OpenClaw/XDG/TMP state. No suppression, ignore, timeout, retry, skip or baseline is expanded.

Release-note context: internal uploaded-skill store ownership cleanup, no user-visible behavior change.

@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@steipete
steipete marked this pull request as ready for review October 17, 2026 07:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T07:21:57.860432Z 247e971 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.

@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. labels Oct 17, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head landing evidence for247e971bc94e5f8dc52dbdd57d0d4a5c47e213e1.

CI39013212480 completed successfully. Complete paginated check enumeration:195 checks,68 successful,126 skipped,1 neutral CodeQL aggregate; zero failing, cancelled, queued or running checks. Dependency review, security-sensitive review and openclaw/ci-gate statuses are all successful. The live PR head matches, is MERGEABLE, and has no requested or submitted reviews.

Fresh independent P0–P2 review published scoped-clean0.97. Targeted types, syntax lint, formatting and exact shrink-only assertion proof passed. Local runtime was incomplete after a worker compiler cache miss; exact-head hosted CI now supplies that runtime/broad proof. The local suppression check's four passes/one unchanged allowlist-drift failure remains disclosed in the PR; no baseline expansion or CI exception is used. Lease/queue/authorization/settlement behavior and Phase E are unchanged.

No CI rerun, rebase or green-seeking push. The campaign's previously reconciled native capacity failures and standing exact-head fallback authority remain recorded in the lane ledger; no active or uncertain native merge operation exists for this PR. Merge only this exact reviewed head.

@steipete
steipete merged commit b4337d6 into main Oct 17, 2026
198 checks passed
@steipete
steipete deleted the deslop/z19-45-upload-store-owner-20261015 branch October 17, 2026 07:36
steipete added a commit that referenced this pull request Oct 17, 2026
* refactor(control-ui): give sidebar menus Solid ownership

* refactor(ui): simplify sidebar menu dependencies

* fix(ui): dismiss sidebar filter after viewer reconciliation commits

* fix(ui): publish sidebar status-filter transitions at the owner

* test(ui): use owned sidebar menu fixtures for rail actions

* fix(ui): retain pending menu work across provider replacement

* test(runtime): remove low-value tests (batch d190) (#174897)

* test(auto-reply): deslop x7338 tests

* test(auto-reply): deslop x7338 tests

* test(auto-reply): deslop x7338 tests

* test(state): deslop x7340 tests

* test(state): deslop x7340 tests

* test(state): deslop x7340 tests

* test(auth-profiles): deslop x7341 tests

* test(auth-profiles): deslop x7341 tests

* test(auth-profiles): deslop x7341 tests

* test(memory-wiki): deslop x7343 tests

* test(memory-wiki): deslop x7343 tests

* test(plugins): deslop x7339 tests

* test(plugins): further deslop x7339 tests

* test(plugins): further consolidate x7339 test fixtures

* test(ai): deslop x7335 tests

* test(ai): deslop x7335 tests

* test(ai): deslop x7335 tests

* test(imessage): deslop x7337 tests

* test(imessage): deslop x7337 tests

* test(agents): deslop x7336 tests

* test(agents): deslop x7336 tests

* test(agents): deslop x7336 tests

* test(codex): deslop x7334 tests

* test(codex): deslop x7334 tests

* test(plugins): deslop x7346 tests

* test(plugins): deslop x7346 tests

* test(plugins): deslop x7346 tests

* test(gateway): deslop x7348 tests

* test(gateway): deslop x7348 tests

* test(gateway): deslop x7348 tests

* test(memory-wiki): avoid shadowing prune fixture

* test: preserve current contracts in cleanup replay

* test: retain coverage and narrow unstable cleanup

* test(auth): withdraw failing OAuth fixture consolidation

Restore the complete main OAuth manager suite after hosted CI exposed a changed failure boundary in the consolidated root fixture. Preserve the original invalid_grant, owner cleanup, and recovery-reload assertions. No production changes; runtime verification stays in PR CI under the campaign CI-only directive.

* test(process): isolate synthetic scope reaping

The scope settlement fixture mocked process killing and termination but let
exec-spawn start the real Linux reaper for synthetic PID 424242. Fake-clock
restoration could strand SIGCHLD work in the shared worker; the subsequent
reaper test then failed when that inherited listener retired.

Mock the missing native cleanup boundary beside the existing termination
mocks. Exercise the existing uncertain-group case with Linux semantics and
assert that it preserves the exact SIGCHLD listener inventory. Keep every
original scope/custody assertion and all dedicated reaper tests unchanged.

Before: the strengthened producer case fails with an unexpected onExit
listener (14.41s wrapper). After: producer and reaper files pass 35/35 via
pnpm test <files> --maxWorkers=1 (57.29s wrapper, 45.57s Vitest).
Full owning process config: 857 pass, 60 existing platform skips across
92 files; 160.31s Vitest after the required 137.4s runtime build.
Targeted services test types (12.6s), lint, boundary lint, formatting,
git diff --check, and independent P0-P2 autoreview pass.

No production changes, assertion weakening, retries, added skips, timeout
changes, or CI dispatches/reruns.

* fix(ui): reload open session menu work after reconnect

* fix(ai): recover DeepSeek DSML tool calls when routed through OpenRouter (#175058)

* fix(ai): recover DeepSeek DSML tool calls when routed through OpenRouter

DeepSeek models sometimes emit tool calls as DSML markup in the reply
text. The recoverer was gated on thinkingFormat === "deepseek", which
only the native direct route produces; every OpenRouter route gets
thinkingFormat "openrouter", so a DeepSeek model reached through
OpenRouter leaked the raw markup as reply text and the tool call never
ran. Enable the recoverer when the model id matches the DeepSeek family,
mirroring the gemma recoverer, without changing request-side compat.

* fix(ai): make native tool calls authoritative over recovered DSML calls

When a DeepSeek response carries both DSML markup in the text channel and
a native tool_calls entry, both execution paths would run: the recovered
DSML call executed first and the native call executed again, producing a
duplicate tool invocation. Mirror the gemma recoverer's contract - native
tool calls own mixed streams - in three steps:

- a native tool-call delta flushes the recoverer with recovery disabled,
  so buffered markup is handed back as plain text instead of a call
- the final flush only authorizes recovery when no native delta arrived
- recovered blocks are recorded and dropped from the output whenever a
  native delta owns the response

Addresses the P1 finding raised in the review of #175058.

* fix(ai): restore typed recovery-part contract on DSML flush

ClawSweeper review on 6e4f32f flagged the unannotated flush return:
the plain-text branch widened kind to string, so appendRecoveredParts
rejected the union at openai-completions-stream.ts:348. Annotate
flush(allowRecovery = true): TextToolCallRecoveryPart[] to match the
gemma recoverer contract.

Also type the native-ownership filter set as Set<ToolCall> and narrow
the content-block predicate; Set<ToolCallBlock>.has() rejected the
TextContent | ThinkingContent | ToolCall union elements.

Verified: tsgo core clean, tsgo:test:packages + extension-declarations
pass, 59/59 tests across openai-completions-dsml.recovery and
openai-completions-stream, oxfmt/oxlint clean.

* fix(ai): own routed DSML recovery in model compatibility

Recover and filter DeepSeek DSML across OpenAI-compatible routes without changing OpenRouter thinking requests. Keep native calls authoritative at terminal finalization, remove the redundant flush API, and cover markup leakage and call ordering. Fixes #174909.

Co-authored-by: Linux2010 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Linux2010 <[email protected]>

* refactor(skills): use the concrete upload store singleton (#175287)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…law#175213)

* refactor(control-ui): give sidebar menus Solid ownership

* refactor(ui): simplify sidebar menu dependencies

* fix(ui): dismiss sidebar filter after viewer reconciliation commits

* fix(ui): publish sidebar status-filter transitions at the owner

* test(ui): use owned sidebar menu fixtures for rail actions

* fix(ui): retain pending menu work across provider replacement

* test(runtime): remove low-value tests (batch d190) (openclaw#174897)

* test(auto-reply): deslop x7338 tests

* test(auto-reply): deslop x7338 tests

* test(auto-reply): deslop x7338 tests

* test(state): deslop x7340 tests

* test(state): deslop x7340 tests

* test(state): deslop x7340 tests

* test(auth-profiles): deslop x7341 tests

* test(auth-profiles): deslop x7341 tests

* test(auth-profiles): deslop x7341 tests

* test(memory-wiki): deslop x7343 tests

* test(memory-wiki): deslop x7343 tests

* test(plugins): deslop x7339 tests

* test(plugins): further deslop x7339 tests

* test(plugins): further consolidate x7339 test fixtures

* test(ai): deslop x7335 tests

* test(ai): deslop x7335 tests

* test(ai): deslop x7335 tests

* test(imessage): deslop x7337 tests

* test(imessage): deslop x7337 tests

* test(agents): deslop x7336 tests

* test(agents): deslop x7336 tests

* test(agents): deslop x7336 tests

* test(codex): deslop x7334 tests

* test(codex): deslop x7334 tests

* test(plugins): deslop x7346 tests

* test(plugins): deslop x7346 tests

* test(plugins): deslop x7346 tests

* test(gateway): deslop x7348 tests

* test(gateway): deslop x7348 tests

* test(gateway): deslop x7348 tests

* test(memory-wiki): avoid shadowing prune fixture

* test: preserve current contracts in cleanup replay

* test: retain coverage and narrow unstable cleanup

* test(auth): withdraw failing OAuth fixture consolidation

Restore the complete main OAuth manager suite after hosted CI exposed a changed failure boundary in the consolidated root fixture. Preserve the original invalid_grant, owner cleanup, and recovery-reload assertions. No production changes; runtime verification stays in PR CI under the campaign CI-only directive.

* test(process): isolate synthetic scope reaping

The scope settlement fixture mocked process killing and termination but let
exec-spawn start the real Linux reaper for synthetic PID 424242. Fake-clock
restoration could strand SIGCHLD work in the shared worker; the subsequent
reaper test then failed when that inherited listener retired.

Mock the missing native cleanup boundary beside the existing termination
mocks. Exercise the existing uncertain-group case with Linux semantics and
assert that it preserves the exact SIGCHLD listener inventory. Keep every
original scope/custody assertion and all dedicated reaper tests unchanged.

Before: the strengthened producer case fails with an unexpected onExit
listener (14.41s wrapper). After: producer and reaper files pass 35/35 via
pnpm test <files> --maxWorkers=1 (57.29s wrapper, 45.57s Vitest).
Full owning process config: 857 pass, 60 existing platform skips across
92 files; 160.31s Vitest after the required 137.4s runtime build.
Targeted services test types (12.6s), lint, boundary lint, formatting,
git diff --check, and independent P0-P2 autoreview pass.

No production changes, assertion weakening, retries, added skips, timeout
changes, or CI dispatches/reruns.

* fix(ui): reload open session menu work after reconnect

* fix(ai): recover DeepSeek DSML tool calls when routed through OpenRouter (openclaw#175058)

* fix(ai): recover DeepSeek DSML tool calls when routed through OpenRouter

DeepSeek models sometimes emit tool calls as DSML markup in the reply
text. The recoverer was gated on thinkingFormat === "deepseek", which
only the native direct route produces; every OpenRouter route gets
thinkingFormat "openrouter", so a DeepSeek model reached through
OpenRouter leaked the raw markup as reply text and the tool call never
ran. Enable the recoverer when the model id matches the DeepSeek family,
mirroring the gemma recoverer, without changing request-side compat.

* fix(ai): make native tool calls authoritative over recovered DSML calls

When a DeepSeek response carries both DSML markup in the text channel and
a native tool_calls entry, both execution paths would run: the recovered
DSML call executed first and the native call executed again, producing a
duplicate tool invocation. Mirror the gemma recoverer's contract - native
tool calls own mixed streams - in three steps:

- a native tool-call delta flushes the recoverer with recovery disabled,
  so buffered markup is handed back as plain text instead of a call
- the final flush only authorizes recovery when no native delta arrived
- recovered blocks are recorded and dropped from the output whenever a
  native delta owns the response

Addresses the P1 finding raised in the review of openclaw#175058.

* fix(ai): restore typed recovery-part contract on DSML flush

ClawSweeper review on 6e4f32f flagged the unannotated flush return:
the plain-text branch widened kind to string, so appendRecoveredParts
rejected the union at openai-completions-stream.ts:348. Annotate
flush(allowRecovery = true): TextToolCallRecoveryPart[] to match the
gemma recoverer contract.

Also type the native-ownership filter set as Set<ToolCall> and narrow
the content-block predicate; Set<ToolCallBlock>.has() rejected the
TextContent | ThinkingContent | ToolCall union elements.

Verified: tsgo core clean, tsgo:test:packages + extension-declarations
pass, 59/59 tests across openai-completions-dsml.recovery and
openai-completions-stream, oxfmt/oxlint clean.

* fix(ai): own routed DSML recovery in model compatibility

Recover and filter DeepSeek DSML across OpenAI-compatible routes without changing OpenRouter thinking requests. Keep native calls authoritative at terminal finalization, remove the redundant flush API, and cover markup leakage and call ordering. Fixes openclaw#174909.

Co-authored-by: Linux2010 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Linux2010 <[email protected]>

* refactor(skills): use the concrete upload store singleton (openclaw#175287)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant