Repository navigation
feat(skills): re-land reverse any video on the HyperFrames plan, with clearer credit wording - #6833
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…t of retries An out-of-credits refusal named what the step needs, and an agent read that as the shortfall. It now says the number is the step's total. After its last try, an agent told the person what was spent and what another try would cost. The HeyGen reference now says not to.
An avatar's credits came from its old API price, about five times what the plan charges, so --max-credits refused calls that fit and a top-up asked for too much. They now use the Avatar IV photo row plus the general avatar video row, 950 credits a minute.
cc5460d to
bc2b661
Compare
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at bc2b6618f37f288468fc8ace5673d48c4e71d853 (rebased onto main; all three commits are patch-identical to cc5460d88 by git range-diff).
Need: yes · Size: ok · Reuse: EF's HF price rows and scene bucketing · Simpler: price IV seconds without the general admission row · Structure: fine
Risk: medium — this estimate controls credit-limit refusal and top-up guidance.
The refusal now explicitly names the step's total (v3.ts:100), and the retry instruction avoids reporting spend or the next attempt's cost (heygen.md:19).
Pre-existing, partially fixed — the general row does not bill every Avatar IV second (packages/cli/src/heygen/pricing.ts:89). On EF master ebdc4a6db82a, admission checks one second of both rows, but settlement subtracts raw IV duration from the general bucket:
avatar_video_hf_charge.py:30–44: the two one-second works are admission, not a duration charge.api_video.py:164–171: IV scene IDs are excluded from photo/video buckets.video.py:1635–1637: general seconds are the residual after IV and other buckets. The workflow separately charges IV, then passes its already-deducted flag (workflow, general dispatch).- The 800/min photo-IV row prices IV speech; the 150/min general row describes a scene without an avatar.
950/min is too high for all-IV speech. An extracted-production-bucketing witness with 15 IV seconds in a 15-second draft gives 0 general seconds and 200 credits; adding 2 seconds of non-IV padding gives 205, not 238. The actual CLI priceOf still gives 238 for 30 words and checkLimit(..., 220) refuses, although that conditional 200-credit all-IV case fits. This is a rate/bucketing counterexample, not a live claim that every 30-word script lasts exactly 15 seconds. This does not mean the backend charges 950/min.
Concrete fix: use seconds * HF_AVATAR_IV_PHOTO_PER_S for the IV portion, remove the unconditional general-per-second addition, and update the avatar test to pin 200 plus acceptance at a 220-credit cap. If estimating known padding, add only its residual seconds at 150/min. That aligns the audited standard photo-IV rate; the USD estimate can stay unchanged.
Nit: add a positive concept pin for the new last-retry/no-spend instruction; the existing core-skill checks do not assert that sentence's concept.
No existing reviews or inline findings were present on #6833 at intake or the fresh pre-post read; this verifies the avatar-estimate follow-up Genesis raised on #6754. The old 4,830/min estimate already overestimated more severely, so this is a continuing issue improved by the PR, not a new backend charge or a new blocking review.
Evidence: bun run --cwd packages/cli test --config review.vitest.config.ts --no-cache over generate.test.ts + v3.test.ts: 33 passed, using borrowed dependencies and a scratch config aliasing only FFmpeg discovery to system binaries (the stock config first failed collection on an unavailable @hyperframes/parsers/slideshow export). node --test scripts/check-core-skills.test.mjs: 6 passed; skills manifest --check: in sync. Independent adversarial review and root replay agree on the bucket result. Root witness commands/artifacts: python3 review-artifacts/6833/bucket-probe.py and bun review-artifacts/6833/price-probe.ts in the reviewer workspace. EF witness executes extracted production bucketing/residual code with lightweight scene DTOs; no live generation, wallet debit, or J4/J5 agent replay was performed.
Verdict: COMMENT
Reasoning: The wording changes read correctly and the estimate is substantially improved, but the requested EF-source check disproves the additive 950/min assumption. Posting the concrete remaining correction as requested rather than issuing a blocking review on the continuing overestimate.
— hf-review
| return at( | ||
| Math.ceil(seconds * AVATAR_IV_PER_MIN) / 60, | ||
| `avatar video, about ${seconds} s from ${words} words at $4.83 a minute`, | ||
| seconds * (HF_AVATAR_IV_PHOTO_PER_S + HF_AVATAR_GENERAL_PER_S), |
There was a problem hiding this comment.
Pre-existing overestimate, partially fixed: the 150/min general row is admission plus residual non-IV/padding work, not an additional charge on every photo-IV second. EF master subtracts IV seconds from general duration (movio/common/service/video.py:1635–1637). Standard all-IV 15s is 200 credits, while this estimate is 238 and refuses cap220. Use only the IV rate here; price known padding separately. Update the test to 200 and assert cap220 accepts. The old estimate was worse; this is advisory correction of the remaining discrepancy.
| seconds * (HF_AVATAR_IV_PHOTO_PER_S + HF_AVATAR_GENERAL_PER_S), | |
| seconds * HF_AVATAR_IV_PHOTO_PER_S, |
The general avatar row is only checked at admission and billed on seconds left after Avatar IV, so adding it to every second made a 15 s script plan at 238 instead of 200 and a 220 limit refuse a call that fits.
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at 07815fc196658ee0de1343674989ba5c9b9f1b87, delta from my COMMENT review 5713199757 at bc2b6618f.
Need: yes · Size: ok · Reuse: EF's Avatar IV and residual general billing rows · Simpler: use the IV rate for estimated IV seconds · Structure: fine
Risk: medium — the local estimate influences credit-limit decisions.
The prior rate finding is fixed: the avatar estimate now uses only 800 credits/minute; the authored test pins 200 for 30 words at the assumed 15 seconds and accepts a 220 limit. This is a duration assumption, not a live timing measurement.
Pre-existing broader follow-up — --max-credits is an estimate guard, not an enforced spending maximum. The CLI checks checkLimit locally (commands/media-use/generate.ts:153). It passes the estimate, not the cap, to generate; the avatar POST body (heygen/generate.ts:156–173) has no spending limit. v3.call sends that body and auth/idempotency headers; the estimate is used for refusal wording only. EF's avatar admission checks one second of each billing row because synthesized speech duration is not known yet (movio/api_service/app/service/avatar_video_hf_charge.py:30–44, master source re-read). Wallet availability enforcement is separate from the person's CLI limit.
Consequently, cap 200 accepts estimate 200 even if the eventual draft has 15 IV seconds plus 2 residual seconds and settles at 205. The PR body accurately discloses this. That is acceptable for this rate correction as an approximate estimate, not as proof that a 200-credit spending limit is respected. Lowering the estimate does newly admit cap-200 requests that the previous 238 estimate rejected. I accept that changed admission behavior for this rate correction because 238 was not a justified upper bound either: speech duration was already estimated from words and there was already no server cap. Known residual padding should be included when available to improve accuracy; even that would not guarantee a maximum while speech duration is unknown. The broader fix should label avatar budgeting as approximate in the CLI help and skill (which currently say “make nothing” above the limit / “never go past it”), or refuse strictly capped avatar generation until a server quote/reservation or enforced budget is available. This needs coordinated budgeting design rather than restoring the incorrect additive rate.
Evidence: the two focused authored avatar-pricing and cap tests pass using borrowed dependencies and a scratch config aliasing FFmpeg discovery only. A broader run yielded 32 passed / 1 environment failure: the unchanged motion-mask test reaches an unavailable @hyperframes/engine/wsl-host export in borrowed dependencies. Independent adversarial source review confirms the cap transport and calibration above. No live generation, settlement, J4/J5 agent replay or backend cap guarantee is claimed. The earlier wording fixes are unchanged.
Verdict: APPROVE
Reasoning: The requested rate/test correction is implemented. The remaining inability to guarantee a strict maximum is a pre-existing estimation/transport limitation, explicitly recorded here as a follow-up rather than a blocker on correcting the rate.
— hf-review
…#6840) * revert: feat(skills): reverse any video (heygen-com#6754) Keep the reverse-any-video skill and its CLI billing commands out of main until web subscriptions are live (/pricing and /account/plan return 404 today). Re-land together with heygen-com#6833 once those pages ship. This reverts commit cb2389c. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(scripts): allow the heygen-com#6754 revert deletions Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Edit accuracy: accurate 271 (base branch 271), smooth 101 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head 75c1ce0d
- blocker: the body has no
fails without the fix:line, and this PR carries three fixes (the credits link, the "in total" wording, the avatar estimate). The tests already exist. Withplan.ts/pricing.ts/v3.tsrestored to #6754's versions, these three fail and pass here: "links the web app for HYPERFRAMES_ENV and tells the page the buyer came from the CLI" (plan.test.ts), "names what an out-of-credits step needs, from the call's own price when HeyGen does not say" (v3.test.ts), "prices an avatar on the plan's avatar rows, not its API price" (generate.test.ts). Naming them on that line clears this. - Merge hold:
https://hyperframes.studio/pricing(and?from=cli) answers 404 on production right now;/plananswers 200. That 404 is why #6840 reverted this, so I'll approve only once/pricinganswers on production, even with the body fixed. An approval clears the gate and the merge loop would merge it.
Scope
I checked the "main + #6754 + fixes" claim: applying the reverse of #6840 to the merge-base gives the same 95 files, and only 14 differ from this head. Six of those are comment-only measure trims and one is the manifest regen; I read the rest (plan.ts, pricing.ts, v3.ts, heygen.md, tests). I trusted the #6754 body (already reviewed and merged). @jrusso1020's avatar-row finding is resolved at 07815fc and unchanged since. src/heygen passes: 37 tests.
There was a problem hiding this comment.
Verdict: COMMENT (merge hold) — 1 resolved, 0 open, 0 new · 75c1ce0 (body only). No blockers remain, but hyperframes.studio/pricing still answers 404 on production, so I am holding the approval: on this PR an approval triggers the merge loop. I will approve when /pricing answers on production and CI passes.
There was a problem hiding this comment.
Verdict: APPROVE — 1 resolved, 0 open, 0 new · 75c1ce0. Merge hold lifted: hyperframes.studio/pricing (with and without ?from=cli) and /plan answer 200 on production; CI green at this head.
What
This re-lands #6754 (reverse any video on the HyperFrames plan, reverted in #6840 until the web plan pages were live) together with its follow-up fixes:
media-use generatewith--planpricing and--max-credits, measure, diff and analyze, the HyperFrames plan inauth status, andbilling subscribe/billing top-up, as in feat(skills): reverse any video on the HyperFrames plan #6754;/plan), which is live; the old default (/account/plan) does not exist.Why
billing subscribeopened/pricingandbilling top-upopened/account/plan, and both answered 404./pricingand/plannow exist on the web app, so the CLI's two links lead somewhere:/pricing?from=clisells Pro and then says to go back to the terminal, and/planshows the plan and its credits.--max-credits 500refused a call that fits andbilling top-up --neededasked for too much.How
mainis merged in. The merge keeps feat(skills): reverse any video on the HyperFrames plan #6754's files where the revert deleted them, so the branch ismainplus feat(skills): reverse any video on the HyperFrames plan #6754 plus the fixes below; no other file differs frommain.this step needs about N in total.media-use/references/heygen.mdtells the agent to stop and ask after its last try without saying what was spent or what another try costs.pageUrl("credits")defaults to<web>/plan;HYPERFRAMES_CREDITS_URLstill overrides it. The test pins the production and dev links.Doc comments kept to four lines
Re-landing #6754 makes its files new code against
main, so the comment limit (four lines, 120 characters) now applies to them. The comments inmeasure/diff.ts,drawn.ts,events.ts,face.ts,media.tsandperson.tswere tightened; the constant groups indiff.tsnow carry their notes beside the constants they describe. What moved here:drawn.ts: wrong tracking, slant, or a doubled letter also leave ink unmatched.placeClips: a clip's own start is where HeyGen's shot begins; with no ledger window, it comes from lining the clip's sound (the original's voice it was made from) up with the original's.carriedText: the clip is judged alone, against the original over the same window.shotFraming: boxes are shares of a frameaspectwide per unit high; a stray detection can be a photo or a hand.faceFit: the clip element fills the canvas with object-fit: cover;tcounts from each side's window start.Test plan
fails without the fix: with
packages/cli/src/heygen/plan.ts,pricing.tsandv3.tsrestored to #6754's versions,src/heygenfails 3 of 37, one per fix: "links the web app for HYPERFRAMES_ENV and tells the page the buyer came from the CLI" (plan.test.ts, the credits link), "names what an out-of-credits step needs, from the call's own price when HeyGen does not say" (v3.test.ts, the "in total" wording) and "prices an avatar on the plan's avatar rows, not its API price" (generate.test.ts, the avatar estimate). At this head all 37 pass.src/heygenandsrc/measurepass (99), with an avatar price pin and both credits links pinned.check-core-skillspasses./pricing?from=cliand reruns; a Pro account out of credits gets the top-up link to/plan.Merges only once
https://hyperframes.studio/pricinganswers on production.