Repository navigation
fix(cli): don't invent a purchase link when the server withholds upgrade_url - #7031
Conversation
There was a problem hiding this comment.
Verdict: COMMENT (needs a fix) · 1 blocker · 0 important · 0 nits · e7d8784
The behaviour is right and fixes my #7016 reverse.ts:57 nit. A null from a recorded session now shows no link in the JSON, the refusal or the skill, and only an absent field falls back to the CLI-built link. I ran the two test files: 36/36 pass. With the base sources restored, the 4 null-case tests fail, so the tests catch the bug. tsc, oxlint and oxfmt are clean on the touched files.
The one blocker is the red Comments check ↓. It isn't a required check, but it is red at this head.
CI
Stacked on #7017, so CI doesn't run. Comments failed; Player perf, regression and preview-regression passed.
7f3fa93 to
ebd2b62
Compare
e66726c to
cdf6e04
Compare
The base branch was changed.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
cdf6e04 to
80cebc4
Compare
80cebc4 to
47ddded
Compare
d678e36 to
47ddded
Compare
…ade_url reverse/start answers upgrade_url: null when no plan can be bought right now. The CLI treated that like a missing field and built its own plans link, so a Free account under gate "block" was sent to a page where it can't buy. Now null means no link anywhere: the JSON prints upgrade_url: null and subscribe_command: null (billing subscribe would open that same plans page), the refusal says a plan can't be purchased right now instead of naming the subscribe command, and the skill runs nothing and passes on no link. Only an absent field (an older server) falls back to the plans page; a string is used as is. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 1 nit · 83323e4
I reviewed this head from scratch because the rebase changed the patch: main's #7046 moved Free to billing subscribe. Now a null link sets both upgrade_url and subscribe_command to null, and the block refusal names no command or URL. All 37 tests pass locally. With the base sources restored, the 5 null-case tests fail. Required CI is green. Not queued.
- nit: The PR body's test plan was written before the rebase. It says 4 null cases and 36 tests, and it quotes the old "Upgrade here … https://…" refusal. Its What section also doesn't mention
subscribe_command: null.
Scope
I read all 7 files. billing subscribe builds its own plans link (billing.ts:48) and never reads a string upgrade_url. That comes from #7046, not this PR.
HeyGen sends url: null when it can't sell to this account right now. The refusal now says so and carries no link, as reverse start does since #7031; a missing url (older server) still gets the plans or credits page.
HeyGen sends url: null when it can't sell to this account right now. The refusal now says so and carries no link, as reverse start does since #7031; a missing url (older server) still gets the plans or credits page.
… label) (heygen-com#7099) * feat(cli): a paywall refusal carries its page link in its own url field An agent hit the Pro paywall, found the link only inside the fix sentence, and handed the person a shell command instead of the page. The link now also comes as url. * fix(cli): auth status says hyperframes is the plan, not the HeyGen app's An agent read user.subscription.plan (the HeyGen app's pro) as the HyperFrames plan and ran past Free. With the HyperFrames plan read, billing_notice now names which is which. * fix(cli): a paywall refusal with url null names no purchase link HeyGen sends url: null when it can't sell to this account right now. The refusal now says so and carries no link, as reverse start does since heygen-com#7031; a missing url (older server) still gets the plans or credits page.
What
reverse startno longer makes up a purchase link when the server deliberately sendsupgrade_url: null.nullnow means no link anywhere: the JSON printsreverse.upgrade_url: nullandreverse.subscribe_command: null, and undergate: "block"the refusal says "Reverse is part of HyperFrames Pro, and a plan can't be purchased right now." with no command or URL in the message or thefix. Thereverse-any-videoskill (references/start.md) says to tell the person that plainly and give no link. The CLI builds its own plans link (feature=reverse&rs=<session>) only when the field is absent (an older server). A stringupgrade_urlis used as is, as before. (Rebased onto main after #7046, which points Free accounts atbilling subscribe: anulllink now withholds that command too.)Why
reverse.ts~L57):parseSessiondropped thenull, soreverseUpgradeUrlfell back to the CLI's plans page.{session_id, plan, gate, upgrade_url}and sendsupgrade_url: nullon purpose when purchases are closed to that user. With the block refusal from feat(cli): reverse start stops a Free account when the server blocks it #7017, the CLI would have refused a Free user and pointed them at a page where they can't buy.How
packages/cli/src/heygen/reverse.ts:ReverseSession.upgradeUrlisstring | null.parseSessionkeeps an explicitnull.reverseUpgradeUrlreturnsnullfor it and falls back topageUrl("plans", …)only when the field is missing.packages/cli/src/commands/reverse/start.ts: on Free,upgrade_urlandsubscribe_commandare bothnullwhen the link isnull(freeFields). The block refusal for anulllink says a plan can't be purchased right now, names nobilling subscribecommand, and itsfixis "Run reverse start again once this account is on Pro."docs/packages/cli.mdx), the skill reference (subscribe_command: null→ say a plan can't be bought, give no link, run nothing), andskills-manifest.json(regenerated hash) are updated to match.Test plan
heygen/reverse.test.ts:reads upgrade_url when it is a link | null | no field, andreverseUpgradeUrl is null when the server withholds the link.commands/reverse/start.test.tsruns the realreverseUpgradeUrl(onlystartReverseSessionandpageUrlare mocked). Record output:prints the upgrade link for Free: the server's link | … | no link when the server withholds it;names no subscribe command when the server withholds the link(JSON hasupgrade_url: null, subscribe_command: null). Block:stops a Free account the server blocks, with the subscribe command as the fix…(link present) andnames no link when the server blocks Free and withholds the link: no plan can be bought now(null; also checks the refusal has nobilling subscribe).…?feature=reverse&rs=<session>) and abilling subscribecommand, and the block refusal said "Reverse is part of HyperFrames Pro. Runnpx hyperframes billing subscribe --feature reverse --session <id>, then run reverse start again." After the fix, 2 files / 37 tests pass (Genesis's local run at head83323e4).tsc --noEmit, oxlint and oxfmt--checkonpackages/cliare clean;lint-skills, the skill-mirror check and the fallow audit pass on the changed files.— wanbi
🤖 Generated with Claude Code