Skip to content

fix: require --uri on launch, drop the dead metadata upload (0.5.0) - #53

Merged
smypmsa merged 2 commits into
mainfrom
fix/launch-require-uri
Nov 24, 2026
Merged

smypmsa merged 2 commits into
mainfrom
fix/launch-require-uri

Conversation

@smypmsa

@smypmsa smypmsa commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

pump.fun removed its anonymous metadata upload (pump.fun/api/ipfs), and the new upload route needs a logged-in session, so launch without --uri could only fail. --uri is now required.

Fix:

  • launch requires --uri and rejects a blank one; --desc, --image and upload_metadata() are removed.
  • launch_token() takes uri in place of description / image_path.
  • Tests no longer mock the removed route; a new test checks launch without --uri exits as a usage error before anything runs.
  • README and version (0.5.0) updated.

Verification: uv run pytest tests/ passes; surfpool tests collect with the new signature. No mainnet launch was run: with --uri the transaction path is unchanged.

Makes --uri required for launch and rejects blank values in the CLI. Removes --desc, --image, and upload_metadata(). launch_token() now takes uri: str.

Transaction path: launch_token still builds and sends the create_v2 transaction. The diff changes only the URI source and removes the upload branch. Instruction construction, wallet handling, and keypair code are not changed in the diff.

Review points:

  • The blank-URI check exists only in the CLI command. launch_token does not validate uri.
  • The httpx call to pump.fun is removed.
  • Tests were not run by me. The PR reports uv run pytest tests/ passes.

pump.fun removed its anonymous upload route and the new one needs a
logged-in session, so launch without --uri could only fail. --uri is now
required; --desc, --image and the upload code are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The launch command and launch_token now require a caller-hosted metadata URI. The metadata upload helper and upload fallback were removed. Launch tests and documentation now use the URI-based flow, and the package version changed to 0.5.0.

Changes: URI-based token launch

Layer / File(s) Summary
Require and use a hosted metadata URI
src/pumpfun_cli/commands/launch.py, src/pumpfun_cli/core/launch.py, README.md, pyproject.toml, src/pumpfun_cli/__init__.py, tests/test_commands/*, tests/test_core/test_launch.py, tests/test_surfpool/*
The CLI rejects a missing or whitespace-only --uri, and launch_token receives the URI and uses it in the create instruction. The upload helper and upload fallback were removed. Tests and README instructions reflect the URI-based flow. The package version changed to 0.5.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • chainstacklabs/pumpfun-cli#14: Both PRs change the launch command options and launch_token signature, so the signature changes need to be reconciled.

Suggested labels: cli, core, tests

Merge Risk: Minimal · up to dfb6a · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 7

Check name Status Explanation
Title check Passed The title uses the conventional commit prefix "fix:" and summarizes the main change: making --uri required on launch and removing the metadata upload. It matches the changeset and the PR objectives. I…
Description check Passed The description covers the summary of the change, the reason (pump.fun removed the anonymous upload route), the affected layers implicitly (commands and core launch paths), and the test plan with comm…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
No Print() Calls Passed The check fails only if a changed Python file under src/ uses bare print() instead of render() or error(). The PR changes three Python files under src/: src/pumpfun_cli/init.py, src/pumpfun_cli/co…
Layer Separation Passed The "Layer separation" check fails only if a file in src/pumpfun_cli/commands/ imports directly from pumpfun_cli.protocol. Evidence: - A case-sensitive ripgrep search for "protocol" under src/pumpfun_…
Rpcclient Cleanup Passed The check warns when new RpcClient usage lacks a finally block that calls .close(). The PR introduces no new RpcClient construction in src/. Added src/ lines only cover the version bump, the required …
Full details: Title check

Explanation

The title uses the conventional commit prefix "fix:" and summarizes the main change: making --uri required on launch and removing the metadata upload. It matches the changeset and the PR objectives. It also includes the version bump, which is accurate.

Full details: Description check

Explanation

The description covers the summary of the change, the reason (pump.fun removed the anonymous upload route), the affected layers implicitly (commands and core launch paths), and the test plan with commands run. It explains that the transaction path is unchanged when --uri is supplied, which addresses the signing/transaction question. It does not explicitly fill the template's "Closes #" line or the "Layers touched" checklist, and the transaction-construction question is answered only by implication (no explicit Yes/No).

Full details: No Print() Calls

Explanation

The check fails only if a changed Python file under src/ uses bare print() instead of render() or error(). The PR changes three Python files under src/: src/pumpfun_cli/init.py, src/pumpfun_cli/commands/launch.py, and src/pumpfun_cli/core/launch.py. Searching the head revision of all three for print( found no matches. The diff under src/ also adds or removes no print( lines. The changed launch command uses error(...) from pumpfun_cli.output for its validation messages, which matches the required output helpers. The changed test files and README are outside src/ and are not in scope for this check. No print() violation was introduced.

Full details: Layer Separation

Explanation

The "Layer separation" check fails only if a file in src/pumpfun_cli/commands/ imports directly from pumpfun_cli.protocol. Evidence: - A case-sensitive ripgrep search for "protocol" under src/pumpfun_cli/commands at the reviewed head returned no matches. No command file imports from pumpfun_cli.protocol. - The full import listing for src/pumpfun_cli/commands at head shows only pumpfun_cli.core., pumpfun_cli.commands., pumpfun_cli.output, pumpfun_cli.group, and third-party modules (typer, solders, stdlib). - The PR changes files in commands/ only in launch.py. Its diff touches no import lines. It removes the --desc and --image options and changes the launch_token call. The import of core.launch.launch_token is unchanged. The PR adds no protocol import, so the check passes.

Full details: Rpcclient Cleanup

Explanation

The check warns when new RpcClient usage lacks a finally block that calls .close(). The PR introduces no new RpcClient construction in src/. Added src/ lines only cover the version bump, the required --uri option with its blank-value check, and the launch_token signature and docstring. The one production RpcClient in the changed launch path (src/pumpfun_cli/core/launch.py, line 99) predates this PR and is wrapped in try/finally with await client.close() at line 215. The PR removes the httpx AsyncClient used by the deleted upload_metadata helper, which is not RpcClient. Test-file RpcClient references are patch() mocks, not new client usage. The warning condition does not apply.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c3802fb and dfb6afe.

Files ignored due to path filters: 1

  • uv.lock is excluded by !**/*.lock, !uv.lock
Files selected for processing: 10

  • README.md
  • pyproject.toml
  • src/pumpfun_cli/__init__.py
  • src/pumpfun_cli/commands/launch.py
  • src/pumpfun_cli/core/launch.py
  • tests/test_commands/test_human_output.py
  • tests/test_core/test_launch.py
  • tests/test_surfpool/test_extras.py
  • tests/test_surfpool/test_launch.py
  • tests/test_surfpool/test_trade.py
Files with no reviewable changes: 2

  • tests/test_surfpool/test_extras.py
  • tests/test_surfpool/test_trade.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smypmsa
smypmsa merged commit 1e748b5 into main Nov 24, 2026
10 checks passed
@smypmsa
smypmsa deleted the fix/launch-require-uri branch November 24, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant