Skip to content

fix(ci): stop exporting internal session helper#106904

Merged
steipete merged 1 commit into
mainfrom
fix/ci-unused-session-helper-export
Jul 13, 2026
Merged

fix(ci): stop exporting internal session helper#106904
steipete merged 1 commit into
mainfrom
fix/ci-unused-session-helper-export

Conversation

@steipete

@steipete steipete commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Current production-mode Knip reports createEmbeddedAgentSessionWithResourceLoader as an unused export. The only external consumer was a test of the helper itself.

Why This Change Was Made

  • keep the embedded session factory bridge module-private
  • preserve resource-loader wiring coverage through the retained prepareEmbeddedAttemptAgentSession production path
  • remove the helper-only test instead of grandfathering the export

User Impact

None. Runtime session creation and explicit resource-loader wiring stay unchanged. This only shrinks an internal module surface and restores the dead-export ratchet.

Evidence

  • Testbox tbx_01kxey1c6xrbmh26xwwdtn3zcc
  • production dead-export regeneration byte-stable at 1,231 entries
  • focused attempt-session.test.ts: 2/2 tests passed
  • targeted format and lint passed
  • core production and core test types passed
  • fresh autoreview clean, 0.98

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jul 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6896b618e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


/** Invokes the supplied session factory with the prepared embedded-agent session options. */
export async function createEmbeddedAgentSessionWithResourceLoader<Result>(params: {
async function createEmbeddedAgentSessionWithResourceLoader<Result>(params: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the test before hiding this helper

When the focused runner tests include src/agents/embedded-agent-runner/run/attempt.spawn-workspace.resource-loader.test.ts, Vitest still imports createEmbeddedAgentSessionWithResourceLoader as a named export from this module. Removing the export here means that test file fails during module loading before it can run its resource-loader assertion, so this CI fix trades the deadcode gate for a broken test surface. Please either keep the helper exported until the test is rewritten or move the coverage to a public production helper.

Useful? React with 👍 / 👎.

@vincentkoc vincentkoc self-assigned this Jul 13, 2026
@steipete
steipete force-pushed the fix/ci-unused-session-helper-export branch from a6896b6 to c3b7757 Compare July 13, 2026 23:52
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head c3b7757eb80:

  • Testbox: tbx_01kxey1c6xrbmh26xwwdtn3zcc
  • pnpm deadcode:exports:update followed by a byte-stable baseline check: 1,231 entries
  • pnpm deadcode:exports
  • pnpm test src/agents/embedded-agent-runner/run/attempt-session.test.ts — 2/2 passed
  • targeted oxfmt and run-oxlint.mjs
  • pnpm tsgo:core
  • pnpm tsgo:core:test
  • fresh autoreview clean, 0.98

Known gap: hosted CI was not awaited, per maintainer instruction. The original one-file head was replaced because it left the direct helper test importing a now-private symbol; this head migrates that assertion through the retained production preparation path.

@steipete
steipete merged commit 48817f6 into main Jul 13, 2026
45 of 48 checks passed
@steipete
steipete deleted the fix/ci-unused-session-helper-export branch July 13, 2026 23:53
wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 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: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants