Repository navigation
feat(cli): use dedicated HyperFrames OAuth clients - #6687
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 271 (base branch 271), smooth 142 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 2 blocker · 1 important · 0 nits · head ee7b111
- blocker: media-use setup instructions still send users to the HeyGen CLI login.
skills/media-use/SKILL.md:34tells agents to sign in withheygen auth login --oauth, and says that session carries the free allowance. After this PR,media-use resolvegives the Go helper an empty temporaryHEYGEN_CONFIG_DIR, so a HeyGen CLI login has no effect and resolve keeps reporting not authenticated. The code already sayshyperframes auth login(HEYGEN_AUTH_COMMAND). The direct recipes there and inreferences/operations.md(heygen video-agent create,heygen video create,voice clone,lipsync, ...) still run under the separate HeyGen CLI login, which bills HeyGen, not the HyperFrames subscription. State that, or route those calls through the same wrapper. The same stale "shared~/.heygen" claim is inskills/hyperframes-cli/references/cloud.md:19,33("sign in with one and the other picks up the session"),skills/media-use/audio/references/{requirements,tts,bgm}.md,commands/auth/status.ts:268-269,commands/auth/status-guidance.ts:61,83, andmedia-use/lib/telemetry.mjs:123, which still reads the~/.heygenuser block for the distinct id.
CI triage and scope
- Branch-caused:
Tests on windows-latest: engine-clifailed on both runs (40736704157, 40737616482), in the PR's newmedia-environment.test.ts:28:expected 438 to be 384. See the inline comment. - Not branch-caused:
Producer: unit testsrenderOrchestrator.stall.test.tsfailed withexpected [] to deeply equal [2]. The PR touches nothing inpackages/producer, and the job passed on the second CI run (40737616513). The cancelledregressionandCIruns belong to the superseded first trigger. The secondregressionrun passed. - Checked: the env/host/client/store selection all goes through
HYPERFRAMES_ENV. The refresh and revoke binding is asserted against the stored client and token endpoint. Expired or foreign OAuth no longer falls back to the saved API key, in the resolver or inheygen.mjs. Undermedia-use, an expired login runs anonymously, and the Go helper cannot reach~/.heygen. I checkedheygen-cli's file resolver: API key beats OAuth, its skew is 60 s, and it does not readHEYGEN_ACCESS_TOKEN. EveryrefreshTokenscaller passes the stored refresh token. - Pre-existing, not gating:
HEYGEN_API_KEY/HYPERFRAMES_API_KEYin the environment, and a project.envfor the standalone audio scripts, still outrank the stored HyperFrames OAuth and bill the API wallet. This is documented, and logout warns about it. - Live sign-in and billing were not exercised.
ee7b111 to
42ac7bf
Compare
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 42ac7bf
All three findings from ee7b111 are fixed:
- The Windows mode assertions are guarded.
- The helper now refreshes when the token has less than 10 min left (the
--waitwindow). - The skill, status and telemetry text now point at the isolated
~/.hyperframesstore, and directheygenrecipes are labelled as using HeyGen/API billing.
auth status no longer shows HeyGen balances as the HF balance. Required CI is green at this head, including Tests on windows-latest. The cancelled Windows render verification and PR captures runs belong to a superseded duplicate trigger. The first engine-cli job stalled in checkBrowser.test.ts and was cancelled; the second run passed. The merge gate stays as stated: backend #61702 deployed, plus dev E2E. Approval covers this SHA only.
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 169f297
The delta from 42ac7bf is test-only (status-user.test.ts). The temp prefix now always contains 99, and the billing assertions are scoped to the rendered Wallet: row. The negative OAuth check isn't vacuous: it uses the same unindented label value rendering as the API-key case, which passes. Required CI is green at this head, including the flake gate on both CI runs and Tests on windows-latest. The one cancelled PR captures run is a superseded duplicate; its twin passed. Approval covers this SHA only.
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head f468051
Since 169f297, this head merges main 1c3fcf4 and changes two files.
- Merge resolution: checked with
git show --remerge-diff. Main's HyperFrames user-ID and traits behavior is kept, and bothtelemetry.mjscopies (they are identical) read the isolated~/.hyperframes[/dev]store. - Main code: #6703's new
signedInUser.tsreads throughcredentialPath(), so it follows the selected environment as well. No production read ofHEYGEN_CONFIG_DIRor~/.heygenremains, apart from the temporary helper directory inmedia-environment.ts. 3f0098ffailures: both came from the merge and are fixed here:signedInUser.test.tsused the old HeyGen directory, and the edit-accuracy filter lackedauth/{config,errors}.ts.- CI: required checks are green on this head, including both Windows runs. The cancelled first CI run was superseded by its duplicate, which passed.
This approval is a code verdict only. The release hold, backend rollout and production client correction gates still apply. Approval covers this SHA only.
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 752f530
Since f468051, this head has two normal main merges (fa97f9d, then 5d437d5). In both, the only conflict was the generated skills-manifest.json, regenerated from the merged sources (checked with --remerge-diff). Main's incoming auth-related change is a one-line publish.test.ts assertion and doesn't interact with the OAuth fixtures. No production read of ~/.heygen / HEYGEN_CONFIG_DIR was reintroduced, apart from the temporary helper directory. Required CI is green at this head: both CI runs and both Windows runs passed. The cancelled PR captures run is a superseded duplicate.
Code verdict only. The release hold, public backend rollout and production audience correction gates still apply. Approval covers this SHA only.
What
Use dedicated public HyperFrames CLI clients, consistent dev/production routing, and isolated HyperFrames credentials so verified CLI work can select HF billing.
Why
The existing CLI shares the HeyGen CLI registration and credential store. Its work can therefore select the HeyGen billing product, and another CLI can overwrite its login.
Related work
Backend classification: heygen-com/experiment-framework#61702. Deploy it to the public API and voice services before merging/releasing this CLI switch. Registration branding alone does not select billing. The OAuth Client Manager changes, EF #61657 and hg.dev #1795, are merged and deployed.
How
Zg3LF4FCLoeJoGs2YqMtZ17g; dev client9QoaiwCZov9O0cAkC4OZbR4p. Both are registered with no secret. The dev device resource is verified ashttps://api2.dev.heygen.com; the corresponding production correction is still pending.HYPERFRAMES_ENV=devselects matching OAuth/API/publish hosts and a separate credential directory. Refresh/revoke stay bound to the issuing client and token endpoint. Migration requires login again; expired OAuth cannot silently choose a saved API key.Test plan
402 hf_subscription_required, unchanged alternate wallets and full reservation/token cleanup. It intentionally stopped before workflow submission.402 hf_subscription_required; temporary native Pro -> observedhf_plan_unlimitedwith no free/HF usage debit; removing Pro -> 402 again. All reservations refunded, token revoked, owned plan ended and stack stopped. This intentionally stopped before upload/render/workflow/vendor work. The runner exited nonzero on a refund row-ID comparison; independent read-only verification confirmed balances and complete cleanup.Current integration validation
Current head:
752f5308009fbf1af008d422201ca5d25c1b952f. Mergedmainat5d437d5eecd65f05daa4ff451ebb85b71f88fdb9normally, without rewriting history. The only content conflict was the generated skills manifest; regenerated it from merged sources. Main's audio-probe documentation correction and unrelated source changes remain intact. The branch retains its isolated OAuth guidance and client-bound fixtures. No authored OAuth logic or function/comment changed during conflict resolution.Manifest freshness, 21 telemetry/parity/filter tests, CLI typecheck and every applicable commit hook passed, including Fallow with no new issues. Independent self-review found no additional issue. The preceding merge head
5910b193also passed 65 focused CLI tests and actual hosted Test/CLI/support/Build/Typecheck and Windows render runs; that evidence is historical for this new head. Fresh hosted CI and exact-head Genesis approval are required. No live fixtures or consent were repeated.Merge hold
James explicitly requested keeping this PR unmerged until the normal Thursday October 29, 2026 release in America/New_York. Auto-merge is off and the PR is not queued. After that release, actual public deployment of the billing backend to all three services and the independently authorized production audience correction remain required before landing. Code approval, midnight, a canary rollout, and device-stack frontend merges do not clear these gates.