Skip to content

refactor(agents): privatize state reset seams - #108285

Merged
steipete merged 2 commits into
mainfrom
codex/burn-dead-exports-agents-state-seams
Jul 15, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/burn-dead-exports-agents-state-seams

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Seven agent test-only reset/helper exports remained grandfathered in the dead-export baseline. They were not production API, but tests imported them directly from runtime modules.

Part of #105595.

Why This Change Was Made

The runtime helpers are now module-private. Tests reach them through dedicated *.test-support.ts modules backed by test-environment-only handles. Runtime behavior and state ownership stay unchanged.

Scope:

  • bash process registry reset
  • deferred context-engine maintenance abort/reset helpers
  • model discovery cache reset
  • embedded attempt session-file owner reset
  • media-generation duplicate-guard reset
  • tool-policy warning-cache reset

User Impact

No user-visible behavior change. Production module surfaces shrink; test isolation remains covered through explicit test-support boundaries.

Evidence

  • Dead-export baseline: 163 -> 156 lines (+0/-7); zero additions or cascades.
  • Final Testbox tbx_01kxjtpx9sx2vpt8n4zbbnran1, Actions run 29413974308: regeneration byte-stable, exact Knip 156, 29 focused suites / 852 tests green.
  • Earlier exact source proof, Testbox tbx_01kxjsya3rbjf5vwxwk1h5tcht, Actions run 29413164064: targeted oxfmt, type-aware oxlint, tsgo:core, and full core/extensions/root test types green.
  • Final rebased branch autoreview: clean, zero findings, confidence 0.95.
  • Hosted CI wait skipped per maintainer direction; direct landing requested.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling labels Jul 15, 2026
@steipete
steipete merged commit 855659a into main Jul 15, 2026
38 of 40 checks passed
@steipete
steipete deleted the codex/burn-dead-exports-agents-state-seams branch July 15, 2026 12:09
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jul 15, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 16, 2026
* refactor(agents): privatize state reset seams

* chore(deadcode): shrink agents state seam baseline
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* refactor(agents): privatize state reset seams

* chore(deadcode): shrink agents state seam baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant