Skip to content

feat(cli): reverse start stops a Free account when the server blocks it - #7017

Merged
Vitozhu04 merged 1 commit into
mainfrom
wanbi/cli-reverse-start-block
Nov 2, 2026
Merged

Vitozhu04 merged 1 commit into
mainfrom
wanbi/cli-reverse-start-block

Conversation

@Vitozhu04

@Vitozhu04 Vitozhu04 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What

Reverse funnel telemetry, CLI side, part 2 of 2 (adds the block branch). Stacked on #7016 (base = wanbi/cli-reverse-start-record); review that one first.

  • In npx hyperframes reverse start: when /v1/hyperframes/reverse/start answers gate: "block" and plan: "free", the command saves the session, then exits non-zero. The message and the fix both carry the upgrade link that credits the purchase to this run: the server's upgrade_url, else the plans page with feature=reverse&rs=<session>.
  • Everything else is unchanged: gate: "record", a Pro account or an unknown plan under block, not signed in, network errors, a 404 from an older server, or a malformed answer never block.
  • reverse-any-video skill: SKILL.md says "if it refuses, pass on its upgrade link and stop"; references/start.md ("Signed in on Free") says to give that exact link, stop, and run reverse start again once they are on Pro.

Why

Whether reverse is Pro-only (block) or just recorded is not decided yet, so the server owns the switch (gate, default record). With this PR the CLI obeys either answer, and flipping A/B needs no CLI release. The session is saved before the block so a run resumed after upgrading carries the same id (start → paid → started again).

Related work

How

packages/cli/src/commands/reverse/start.ts: refusal(session) returns a Fix only for gate === "block" && plan === "free"; it is thrown inside runMeasure, so the output is the usual measure error shape {ok: false, error, fix} and the exit code is 1. Docs (docs/packages/cli.mdx) and the command description say when it stops.

Test plan

  • Unit tests added/updated (targeted only): commands/reverse/start.test.ts — Free + block stops with the server's link as message and fix and still saves the session; block without a link builds the feature=reverse&rs= plans link; Pro + block, unknown + block and Free + record go on.
  • CI's test workflow runs only for PRs into main, so on this stacked head the touched suites were run locally (targeted): 8 files, 146 tests passed; tsc --noEmit on packages/cli clean; fallow audit clean.
  • Manual testing performed — not against a real server: the EF route is not deployed yet.
  • Documentation updated
  • Comments follow CONTRIBUTING.md "Comments"

Ready for review — please don't add to the merge queue.

— wanbi

🤖 Generated with Claude Code

@Vitozhu04 Vitozhu04 closed this Nov 2, 2026
@Vitozhu04
Vitozhu04 force-pushed the wanbi/cli-reverse-start-block branch from af17f4f to 049331b Compare November 2, 2026 14:01
@Vitozhu04 Vitozhu04 reopened this Nov 2, 2026

@heygengenesis heygengenesis 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.

Verdict: COMMENT (draft) · 0 blocker · 1 important · 0 nits · d011c34

CI runs only for PRs into main, so this stacked head has no test run; locally the touched suites pass (5 files, 117 tests) and tsc is clean on the touched files. The past_due-reads-as-free issue on EF #63633 (reverse_session.py:35) lands here: under block, a Pro payer in dunning would be refused.

WaterrrForever
WaterrrForever previously approved these changes Nov 2, 2026

@WaterrrForever WaterrrForever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. On a block gate the session is saved first and the run then exits 1 with the attributed upgrade link. unknown never blocks, and neither does an unrecorded start. Tests pass locally. Same version line as #7016: 0.9.4 shipped today without reverse start, so drop the "0.9.4+" from SKILL.md.

@Vitozhu04
Vitozhu04 force-pushed the wanbi/cli-reverse-start-block branch from 333dd6c to 7f3fa93 Compare November 2, 2026 15:35
@Vitozhu04
Vitozhu04 marked this pull request as ready for review November 2, 2026 15:36

@heygengenesis heygengenesis 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.

Verdict: COMMENT · 0 blocker · 0 important · 0 nits · d011c34 → 7f3fa93

The earlier finding is fixed: the refusal and its fix both carry feature=reverse&rs=<session>. unknown and Pro never block, and the session is saved before the exit. CI doesn't run on this stacked head. Locally, the 7 test files this PR touches pass (132 tests), and oxlint, oxfmt and tsc are clean on the touched files. The withheld-link nit on #7016 (reverse.ts:57) carries into this refusal.

Base automatically changed from wanbi/cli-reverse-start-record to main November 2, 2026 17:04
@Vitozhu04
Vitozhu04 dismissed WaterrrForever’s stale review November 2, 2026 17:04

The base branch was changed.

@mintlify

mintlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 2, 2026, 5:13 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

When /v1/hyperframes/reverse/start answers gate "block" for plan "free", `reverse start`
saves the session, then exits non-zero. The error and its `fix` carry the upgrade link that
credits the purchase to this run: the server's `upgrade_url`, else the plans page with
`feature=reverse&rs=<session>`. Pro, unknown plans, `record`, and every error still go on.
The reverse-any-video skill tells the agent to pass that exact link on and stop.

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

@WaterrrForever WaterrrForever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-stamping at ebd2b62. The rebase only drops the commits #7016's squash already landed: range-diff against the approved 7f3fa93 is identical. CI is green.

@Vitozhu04
Vitozhu04 added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 7da583e Nov 2, 2026
72 checks passed
@Vitozhu04
Vitozhu04 deleted the wanbi/cli-reverse-start-block branch November 2, 2026 17:45

This branch was successfully deployed

1 active deployment
staging - docs — ebd2b629 Deployed Nov 2, 2026 by mintlify[bot]
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.

2 participants