Skip to content

refactor(models): simplify prepared owner access - #130683

Merged
steipete merged 1 commit into
mainfrom
codex/prepared-owner-access
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/prepared-owner-access

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Maintainer-requested model architecture cleanup: model resolution and thinking metadata reads do unnecessary discovery work even when the caller already supplies stores or a published generation already answers the lookup. The prepared owner lifecycle also repeats replacement-wait and publication plumbing.

Why This Change Was Made

Reuse prepared facts before loading the manifest. Fill only missing discovery stores, retaining the injected auth/registry pair and generation boundary. The internal empty-store constructor now uses the in-memory APIs directly; both exist in the current implementation and stable v2026.7.1-2, so its runtime feature-detection fallback has no supported target.

Replacement races return to the existing loop-top wait/rebind owner. Pending publication coalescing, forced supersession, and timed-out-but-still-settling builds retain their distinct decisions. Remove the unreachable exact-versus-full branch and the unused private auth-materialization reader injection. Single-owner and batch publication remain separate because their atomicity and recovery contracts differ.

User Impact

No public API, config, defaults, provider metadata, storage, or auth behavior change. The same model and thinking results require less duplicate work. Production LOC: +41/-93 (net -52); tests: +46/-3 (net +43).

Evidence

  • Baseline: 152 owner/catalog/lifecycle tests and 12 embedded model-resolution tests passed before edits.
  • Failed-before proof: the published-thinking case still called manifest discovery; all four injected-store combinations constructed stores whose results were discarded. The same cases pass after the refactor and verify returned store identity and auth binding.
  • After: 168 focused tests in 12 files pass, covering owner selection, replacement/activation, leases, auth materialization, config stamps, thinking, harness catalog, generation scope, skip-discovery, and resolution consistency.
  • Independent Codex autoreview of the complete patch is clean.
  • Full 15-phase build passed, including all plugin artifacts, SDK declaration/export checks and the Control UI bundle. Four actual CLI catalog views (default, all, local, provider-filtered) match the pre-refactor baseline exactly under isolated HOME/state/config, without credentials.
  • Full changed-file gate passed, including formatting, core and core-test typechecks, lint, dead exports, import cycles and ownership/storage guards. Exact-head CI is green on d888768.

The lifecycle suite covers replacement during lookup/activation, owner rebinding, workspace retention and timed-out builds. There is no new promise-depth-dependent test for the instant after standalone publication and before its awaiting caller resumes: the changed branch synchronously returns to the already-tested loop-top gate without intervening work. No authenticated inference claim is made for these local owner tests.

@steipete steipete self-assigned this Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 04:13
@steipete
steipete merged commit f9dd6ed into main Aug 27, 2026
286 checks passed
@steipete
steipete deleted the codex/prepared-owner-access branch August 27, 2026 04:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 27, 2026
…-retirement-v13

* origin/main: (243 commits)
  fix: preserve Gateway error reasons in text logs (#130645)
  refactor(video): deduplicate generation contracts (#130635)
  fix(agents): preserve direct-message sender identity (#124548)
  fix(agents): preserve silent reply after settled tools (#130675)
  fix(talk): preserve replacement speech when an old utterance is canceled (#130687)
  fix(browser): preserve literal names and formatter-owned snapshot refs (#130599)
  fix(auth): reset only the profile replaced by a successful login (#124014)
  fix: bind session creation to admitted Gateway (#130686)
  refactor(qa-lab): reuse model reference splitter (#130317)
  docs(gateway): clarify independent HTTP endpoint switches (#130690)
  fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428)
  refactor(lmstudio): remove unreachable catalog merge (#130689)
  fix(crabbox): restore cloud machine CPU and RAM (#130684)
  fix(secrets): compare proxy bearer tokens directly (#127054)
  fix(matrix): show recovery key availability in text status (#128051)
  fix(ios): restore approval settings navigation and remove duplicate shell state (#130651)
  refactor(agents): use fixed tool-loop defaults directly (#130681)
  refactor(qa-lab): share process tree metric reader (#130419)
  refactor(models): simplify prepared owner access (#130683)
  fix(parallels): main install and update smoke cannot complete (#130658)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant