Skip to content

docs(skills): reverse tops up once for the run's total and inits with --video - #7048

Merged
miguel-heygen merged 4 commits into
mainfrom
docs/reverse-top-up-once
Nov 3, 2026
Merged

miguel-heygen merged 4 commits into
mainfrom
docs/reverse-top-up-once

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What

When reverse runs out of credits mid-run, the skill now waits until every launched step has answered, adds up what each refused step needs, and asks the person once with billing top-up --needed <total>. It then relaunches every refused step.

Also: the skill now builds the project with npx hyperframes init <project> --video <video> --keep-original --skip-transcribe and keeps the video out of that folder until then.

Why

init refuses a folder that already holds other files, so a video put in the project folder first made init stop with "Directory already exists and is not empty". init --video copies the video in untouched under its own name, and --skip-transcribe avoids a speech-model download the rebuild does not need.

The skill launches every shot at once. When the balance cannot cover them, several refuse together, and the skill told the agent to ask for the refused step's own amount, so a run with nine refusals asked for one shot's credits nine times over instead of the sum.

Testing

fails without the fix: scripts/check-core-skills.test.mjs > "reverse builds the project with init --video and asks to top up once for the run's total"

It pins both changes in start.md and SKILL.md: the init <project> --video <video> --keep-original --skip-transcribe command, the "add up what each refused step needs, and ask once for that total" wording, and the old "copy the video into the project" line gone. On the devbox: 8 passed in the file, 3 runs in a row; with main's two skill files 1 fails. SKILL.md stays under its 5120 B budget (5109 B). skills-manifest.json regenerated (reverse-any-video fe326730ec89a06b to 20cf059946029bbb).

Size

A paragraph of skill text, its test and its manifest hash; it has no other carrier.

@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: REQUEST CHANGES · 1 blocker · 0 important · 1 nit · head de752d49

The summed amount itself is correct. Each refusal prints the step's full cost ("needs N in total", packages/cli/src/heygen/v3.ts:99), and billing top-up waits until credits >= needed (packages/cli/src/commands/billing.ts:38). So --needed <sum> is the right balance to relaunch all refused shots.

  • blocker: This fixes a real defect (nine refusals asked nine times for one shot's amount), but the body has no fails without the fix: line. Its claim that "no unit test can carry it" is also wrong: scripts/check-core-skills.test.mjs already pins skill wording (it runs in test:scripts). Add a pin there and name it on a fails without the fix: line. For example, assert that reverse-any-video/references/start.md matches /add up what each refused step\s+needs, and ask once for that total/ and does not match /--needed 180\n/. That fails on main.
  • nit: start.md:61: if any refusal printed no amount ("needs more", with no --needed in its command), there is nothing to sum. Say to run plain billing top-up in that case.
ScopeRead the full diff (2 files). Checked the refusal text, billing wait semantics and the existing skill-text tests. CI was still running at review time (CI run cancelled, CodeQL in progress); this verdict doesn't depend on it.

@miguel-heygen miguel-heygen changed the title docs(skills): reverse asks to top up once for the run's total docs(skills): reverse tops up once for the run's total and inits with --video 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: REQUEST CHANGES — 0 resolved, 1 open, 0 new · de752d49 → 3247141a

The open blocker now covers both fixes. The body still has no fails without the fix: line and still says "no unit test can carry it". The init --video change also fixes a refusal ("Directory already exists and is not empty"). scripts/check-core-skills.test.mjs can pin both, for example by matching init <project> --video <video> and ask once for that total in reverse-any-video/references/start.md. The init flags and the hyperframes.json exemption check out (init.ts:281, 736–758).

@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: APPROVE — 1 resolved, 1 open (nit), 0 new · 3247141a → 958b272c

Resolved: the fails without the fix: test. I ran it: it passes at this head and fails with main's reverse-any-video files. check-core-skills.mjs also passes, and SKILL.md is 5109 B.

@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: APPROVE — 1 resolved, 0 open, 0 new · 958b272c → e62adb1f

Resolved: a refusal that prints no amount now falls back to plain billing top-up, which waits for any rise in the balance (billing.ts:38). All 8 tests in check-core-skills.test.mjs pass at this head, and the named test still fails with main's skill files.

@miguel-heygen
miguel-heygen force-pushed the docs/reverse-top-up-once branch from e62adb1 to ae19827 Compare November 3, 2026 02:57
@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 05ddddb Nov 3, 2026
68 checks passed
@miguel-heygen
miguel-heygen deleted the docs/reverse-top-up-once branch November 3, 2026 03:30
@jrusso1020 jrusso1020 mentioned this pull request Nov 3, 2026
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.

1 participant