Skip to content

chore(cmd): remove hand-written video commands (PRINFRA-121) - #21

Closed
somanshreddy wants to merge 1 commit into
graphite-base/21from
04-01-chore_cmd_remove_dead_handwritten_video_commands
Closed

somanshreddy wants to merge 1 commit into
graphite-base/21from
04-01-chore_cmd_remove_dead_handwritten_video_commands

Conversation

@somanshreddy

@somanshreddy somanshreddy commented Apr 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Deletes the hand-written video.go and video_list.go that were the M0 walking skeleton. These are now replaced by the generated gen/video.go wired in PR #20.

The test file video_list_test.go is kept — it still exercises the video list command, just through the generated path now.

Testing

All tests pass. No behavioral change — same commands, same flags, same output.

Files

  • cmd/heygen/video.go — deleted
  • cmd/heygen/video_list.go — deleted

somanshreddy commented Apr 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@somanshreddy somanshreddy changed the title chore(cmd): remove dead handwritten video commands chore(cmd): remove hand-written video commands (PRINFRA-121) Apr 1, 2026
@linear

linear Bot commented Apr 1, 2026

Copy link
Copy Markdown
PRINFRA-121 CLI M1: OpenAPI codegen pipeline

Build the code generation pipeline that reads openapi/external-api.json and produces CommandSpec structs.

Scope

  • Go program in codegen/ using text/template
  • Parse OpenAPI spec, filter to v3 endpoints only
  • Generate CommandSpec data structs in gen/ (zero logic)
  • overrides.yaml for:
    • Positional arg promotion (prompt, text, file)
    • Command group naming (video-translations → translate, webhooks/endpoints → webhook)
    • Help examples per command
  • make generate SPEC=... target
  • Nested path collapsing (e.g., /webhooks/endpoints/{id}/rotate-secret → webhook rotate-secret)
  • Golden file tests for codegen output stability
  • Generate all ~30 commands, wire into Cobra at startup

Mapping Rules

  • OpenAPI tag → command group
  • POST → create, GET (list) → list, GET (by id) → get, DELETE → delete, PATCH → update
  • Path params → positional args, query params → flags, body fields → flags
  • overrides.yaml exceptions for positional promotion and group naming

Acceptance Criteria

  • make generate produces compilable CommandSpec files for all v3 endpoints
  • Adding a new endpoint to spec + re-running codegen produces new command
  • Generated help text includes descriptions and examples
  • Golden file tests pass
  • Override validation: make generate fails if overrides reference non-existent endpoints

@somanshreddy
somanshreddy force-pushed the 04-01-chore_cmd_remove_dead_handwritten_video_commands branch from e001111 to 2d90beb Compare April 1, 2026 22:10
@somanshreddy
somanshreddy force-pushed the 04-01-feat_cmd_cut_over_root_to_generated_commands branch from 11cade8 to 3dc0ee5 Compare April 1, 2026 22:10
@somanshreddy
somanshreddy marked this pull request as ready for review April 1, 2026 22:16
@somanshreddy
somanshreddy changed the base branch from 04-01-feat_cmd_cut_over_root_to_generated_commands to graphite-base/21 April 1, 2026 22:33
@somanshreddy

Copy link
Copy Markdown
Collaborator Author

Superseded by PR #20. The dead handwritten video-command cleanup was moved down into the root cutover PR to fix its CI failure, so this branch is now empty.

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