Skip to content

refactor(openshell): trim internal exports - #107291

Merged
steipete merged 1 commit into
mainfrom
codex/burn-dead-exports-openshell
Jul 14, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/burn-dead-exports-openshell

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The shrink-only production Knip baseline grandfathered eleven internal exports under extensions/openshell. Nine had no production, public entrypoint, runtime API, plugin SDK, dynamic, string, or lazy consumer.

Why This Change Was Made

Privatize the nine safely migratable helpers and remove redundant SSH helper/type re-exports. Retarget behavior coverage through the backend factory, exec spec, upload flow, generated SSH session config, and canonical sandbox SDK. Keep the two exported shell-script constants because their symlink/path-safety assertions require direct script execution and lack an equivalent retained production seam.

User Impact

No sandbox CLI, config, plugin, or runtime behavior changes. Production source is net 8 lines smaller. On the latest base, the dead-export baseline shrinks from 837 to 828 and OpenShell shrinks from eleven entries to two retained seams.

Evidence

  • Testbox tbx_01kxftp0mc2xvz7kr5r6js9nc9: production Knip update/exact check, format, type-aware lint, extension types, and 54/55 OpenShell tests passed. The sole failure was a corrected test expectation (/workspace versus the actual configured /sandbox remote root).
  • Allowed narrow local wrapper rerun after Testbox reacquisition failed: both changed suites passed, 40/40 tests.
  • Latest-main regeneration was byte-stable at exactly 828 entries.
  • Fresh autoreview found one Windows-only test portability issue; the POSIX fixtures were guarded. Follow-up autoreview clean at 0.94.
  • Diff metrics: production source +6/-14, tests +96/-129, baseline +0/-9.

Known proof gap: Testbox reacquisition failed twice after the initial runner cleanup, so the corrected assertion used the repo's narrow local wrapper. Hosted CI was intentionally not awaited under the maintainer's direct-land instruction.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 6ec9f048ec96efbffb6d494c4bc74230a3892da7:

  • Testbox tbx_01kxftp0mc2xvz7kr5r6js9nc9: exact production Knip at 822 on its then-current base, format, type-aware lint, extension types, and 54/55 OpenShell tests passed. The only failure was a test-only remote-root expectation corrected from /workspace to /sandbox.
  • After runner reacquisition failed twice, the allowed narrow local wrapper passed both changed suites, 40/40 tests.
  • Latest-main rebase preserved the patch exactly. Baseline regeneration is byte-stable at 828 entries: current base 837→828, OpenShell 11→2.
  • Fresh autoreview found and resolved a Windows POSIX-fixture issue; final autoreview clean 0.94.

Known gap: the corrected assertion did not get a second Testbox lease because reacquisition failed. Hosted CI intentionally not awaited under the maintainer's direct-land instruction.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts extensions: openshell size: M maintainer Maintainer-authored PR labels Jul 14, 2026
@steipete
steipete merged commit 2444cc2 into main Jul 14, 2026
49 of 56 checks passed
@steipete
steipete deleted the codex/burn-dead-exports-openshell branch July 14, 2026 08:20

@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: 6ec9f048ec

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

"upload",
"--no-git-ignore",
backend.runtimeId,
expect.stringMatching(/\/seed\.txt$/),

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.

P2 Badge Use a path-neutral matcher for the upload source path

When this extension test suite is run on Windows, uploadPathToRemote builds the uploaded local path with path.join(...), so the mocked CLI sees a ...\seed.txt source path. This POSIX-only regex only accepts /seed.txt, making the new test fail even though the backend behavior is correct; assert with path.basename(...) or a separator-neutral pattern instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: openshell maintainer Maintainer-authored PR scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant