fix(ci): stop exporting internal session helper#106904
Conversation
There was a problem hiding this comment.
💡 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: { |
There was a problem hiding this comment.
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 👍 / 👎.
a6896b6 to
c3b7757
Compare
|
Land-ready proof for exact head
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. |
What Problem This Solves
Current production-mode Knip reports
createEmbeddedAgentSessionWithResourceLoaderas an unused export. The only external consumer was a test of the helper itself.Why This Change Was Made
prepareEmbeddedAttemptAgentSessionproduction pathUser 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
tbx_01kxey1c6xrbmh26xwwdtn3zccattempt-session.test.ts: 2/2 tests passed