Repository navigation
feat(cli): reverse start stops a Free account when the server blocks it - #7017
Conversation
af17f4f to
049331b
Compare
There was a problem hiding this comment.
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.
d011c34 to
333dd6c
Compare
WaterrrForever
left a comment
There was a problem hiding this comment.
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.
333dd6c to
7f3fa93
Compare
There was a problem hiding this comment.
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.
The base branch was changed.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 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>
7f3fa93 to
ebd2b62
Compare
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.npx hyperframes reverse start: when/v1/hyperframes/reverse/startanswersgate: "block"andplan: "free", the command saves the session, then exits non-zero. The message and thefixboth carry the upgrade link that credits the purchase to this run: the server'supgrade_url, else the plans page withfeature=reverse&rs=<session>.gate: "record", a Pro account or anunknownplan underblock, not signed in, network errors, a 404 from an older server, or a malformed answer never block.reverse-any-videoskill:SKILL.mdsays "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 runreverse startagain 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, defaultrecord). 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
POST /v1/hyperframes/reverse/start(with thegateswitch) andreverse_session_idon renders. Deploy EF first.How
packages/cli/src/commands/reverse/start.ts:refusal(session)returns aFixonly forgate === "block" && plan === "free"; it is thrown insiderunMeasure, 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
commands/reverse/start.test.ts— Free + block stops with the server's link as message andfixand still saves the session; block without a link builds thefeature=reverse&rs=plans link; Pro + block, unknown + block and Free + record go on.main, so on this stacked head the touched suites were run locally (targeted): 8 files, 146 tests passed;tsc --noEmitonpackages/cliclean; fallow audit clean.Ready for review — please don't add to the merge queue.
— wanbi
🤖 Generated with Claude Code