fix(#5241): add missing --file flag to ImportProfile openshell command - #5245
Conversation
ImportProfile passed the profile path as a bare positional argument to `openshell provider profile import`, but OpenShell requires `--file <FILE>`. This caused all URL-referenced profile imports to fail at sandbox startup. The sibling ImportProfiles already correctly uses `--from dir`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Site previewPreview: https://d6768d1d-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 2:45 PM UTC · Completed 2:52 PM UTC |
|
Looks good to me Labels: PR modifies internal/sandbox/ — sandbox component bug fix |
waynesun09
left a comment
There was a problem hiding this comment.
Ran 3 independent reviews (Claude x2, Grok). All clean, no findings that block this.
- Fix matches the exact error string from #5241 (`<--file |--from >`).
- No other `openshell` call site in the codebase has the same positional-arg-instead-of-flag bug (grepped all provider/profile invocations — create/update/delete all correctly use flags or documented positional signatures already).
- New test is a genuine regression guard, not trivially-passing — traced manually: pre-fix, the logged args would be `provider profile import /some/my-profile.yaml` with no `--file`, which would correctly fail the assertion.
- No injection surface added (argv form throughout, `--file` is a hardcoded literal) — and as a minor bonus, explicitly binding the path to `--file` is actually more robust than the old bare positional arg, which could have been misparsed if a path ever began with `-`.
- Test isolation confirmed safe: no `t.Parallel()` in this file, `t.Setenv` auto-restores PATH, and the fake script's `$3` check correctly targets only the `import` invocation, not the preceding `delete` call.
One important process note, not a code issue: merging this alone won't turn fullsend-ai/agents#211's CI green. Confirmed agents#211's functional-tests resolves FULLSEND_VERSION via `gh release view --repo fullsend-ai/fullsend` (floating "latest"), not a source build — and the current latest release (v0.31.0, published 2026-07-16) predates this fix. A new release tag needs to be cut after this merges before #211's CI will actually pick it up.
Approving.
|
🤖 Finished Retro · ✅ Success · Started 3:51 PM UTC · Completed 4:07 PM UTC |
Retro: PR #5245 — fix(#5241): add missing --file flag to ImportProfileTimeline
Total pipeline cost: ~$4.34 (triage + code + review). Rework: zero — correct fix on first try. What went well
Improvement opportunitiesTwo proposals filed — see linked issues below.
Proposals filed
|
Summary
--fileflag toImportProfilewhen invokingopenshell provider profile import. The profile path was passed as a bare positional argument, but OpenShell requires--file <FILE>or--from <FROM>.TestImportProfile_UsesFileFlagthat uses a fake openshell script to verify the--fileflag is present in the import command args.Related Issue
Closes #5241
Changes
internal/sandbox/sandbox.go: Add"--file"beforeprofilePathin theexec.CommandContextcall insideImportProfileinternal/sandbox/sandbox_test.go: AddTestImportProfile_UsesFileFlagtest that captures openshell args and asserts--fileis includedTesting
go test ./internal/sandbox/— all 60 tests passgo vet ./internal/sandbox/— cleanscan-secrets --staged— no leaks foundImportProfilesfunction already uses--from dircorrectly and is not affectedChecklist
🤖 Generated with Claude Code
Closes #5241
Post-script verification
agent/5241-fix-importprofile-file-flag)6a3bfb93a6275f984b2892798edae2dfdb93b56b..HEAD)