Skip to content

fix(s3): mv create-bucket override + configure picker credentials-file (Codex findings)#47

Merged
hi-lei merged 2 commits into
mainfrom
fix/s3-wizard-codex-findings
Jun 2, 2026
Merged

fix(s3): mv create-bucket override + configure picker credentials-file (Codex findings)#47
hi-lei merged 2 commits into
mainfrom
fix/s3-wizard-codex-findings

Conversation

@hi-lei
Copy link
Copy Markdown
Collaborator

@hi-lei hi-lei commented Jun 2, 2026

Fixes from the Codex review of the merged S3 wizard work (#46).

mv — wrong destination bucket (High)

In verda s3 mv, choosing "+ Create new bucket…", typing a name, then pressing Esc back and picking an existing bucket still created and moved to the typed name. The new-bucket step's Resetter was a no-op, so a stale st.newDstBucket survived the skip and overrode the chosen bucket in finalizeMove.

Fix: the new-bucket step's Resetter now clears st.newDstBucket. (Unlike the profile wizard — where the no-op is correct because the name shares the bound variable — here the name lives in its own field, so clearing it is right.)

configure — picker ignored --credentials-file (Medium)

The profile picker listed profiles from the default/env credentials file while the save honored --credentials-file, so existing profiles in the explicit file weren't shown. The picker's Loader now resolves opts.CredentialsFile.

docs (Low)

The README claimed read commands accept --profile; only configure/show define a local one. Corrected to --auth.profile / VERDA_PROFILE / verda auth use for the read commands.

Also

  • Codified the wizard-engine pattern in .ai/skills/new-command.md (replacing the stale hand-rolled-loop guidance), incl. the Resetter/ShouldSkip gotcha and the "+ Create new…" sentinel pattern.

Tests

TestMoveStepNewDestBucket_ResetterClears, TestBuildMoveFlow_BackOutOfCreateBucket (drives the full back-navigation via BackResult()), TestFinalizeMove_CreatesNewBucket, TestConfigureProfilePicker_HonorsCredentialsFile.

make build / make test / make lint (incl. CI's golangci-lint v2.5.0) all pass.

🤖 Generated with Claude Code

hi-lei and others added 2 commits June 2, 2026 10:24
…ntials-file

Two Codex-review findings in the wizard work:

- mv (High): picking an existing destination bucket after backing out of
  "+ Create new bucket…" still created and moved to the typed name. The
  new-bucket step's Resetter was a no-op, so a stale st.newDstBucket survived the
  skip and overrode the chosen bucket in finalizeMove. The Resetter now clears
  st.newDstBucket — correct here because (unlike the profile wizard) the name
  lives in its own field, not the one the dest-bucket Select writes.
- configure (Medium): the profile picker listed profiles from the default/env
  credentials file, ignoring --credentials-file, while the save honored it. The
  picker's Loader now resolves opts.CredentialsFile.
- docs: the README claimed read commands take --profile; only configure/show
  have a local one — others use --auth.profile / VERDA_PROFILE / `auth use`.

Tests: TestMoveStepNewDestBucket_ResetterClears,
TestBuildMoveFlow_BackOutOfCreateBucket (end-to-end back-navigation),
TestFinalizeMove_CreatesNewBucket, TestConfigureProfilePicker_HonorsCredentialsFile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the stale hand-rolled index-loop guidance (mv no longer uses it) with
the shared wizard-engine pattern: Flow + NewEngine, dynamic Loaders, the
Resetter/ShouldSkip gotcha, the "+ Create new…" sentinel pattern, and testing
flows with WithTestResults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hi-lei hi-lei merged commit c91b704 into main Jun 2, 2026
12 checks passed
@hi-lei hi-lei deleted the fix/s3-wizard-codex-findings branch June 2, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant