refactor(tests): shared binary build + runVideoCmd consolidation (0.6.1)#7
Merged
Conversation
Three pieces of integration-test infra hygiene that /simplify reviewers flagged across the 0.4.x / 0.5.x / 0.6.0 PRs but kept getting deferred. Bundled into a focused patch release. 1. Shared binary build via sync.Once + TestMain (tests/integration/ cli_smoke_test.go). 15+ callers of build(t) now share a single compile per `go test` run instead of each rebuilding. 2. runVideoCmd signature changed from (stdout, combined, exitCode) to (stdout, stderr, exitCode). Callers that want the combined string compute `stdout + stderr` explicitly. The 3 existing callers in video_flow_test.go and the 4 hand-rollers (create_credits, create_engine, create_mode, kb_prune) all migrated to use this single helper. Removes ~80 lines of duplicated exec.Command / env / ExitError boilerplate. 3. .gitignore covers *.pdf and *.docx so local smoke-test files (real-backend manual testing) don't sit as untracked commit-bait. test.pdf was already ignored; broader catch-all subsumes it. No behavior change for end users. Internal test refactor.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A 0.6.1 patch consolidating three integration-test infra fixes that prior reviewers flagged but kept getting deferred. Internal refactor; no behavior change for users.
Changes
Shared binary build (
tests/integration/cli_smoke_test.go).build(t)now caches the compiledvibeknowviasync.Once+ a packageTestMainthat cleans up the temp dir on exit. 15+ callers share a singlego buildpergo testrun instead of each rebuilding. Cold-cache CI gets a meaningful speedup; hot-cache developer runs see modest fork-overhead reduction.runVideoCmdsignature change from(stdout, combined, exitCode)to(stdout, stderr, exitCode). Callsites that want a combined view dostdout + stderrthemselves. The 3 existing callers invideo_flow_test.goplus 4 hand-rolledexec.Command(bin, ...)blocks (create_credits_test,create_engine_test,create_mode_test,kb_prune_test) migrated to this single helper. Net: ~80 lines of duplicated env-setup + ExitError-unwrap boilerplate gone..gitignorecovers*.pdf/*.docxso local smoke-test files (the*.docx/*.pdfartifacts I dropped into the repo root during real-backend smoke) don't appear as untracked commit candidates. The pre-existingtest.pdfignore is subsumed by the broader catch-all.Test plan
go test ./...green (all integration tests pass with the new helper signature)go build ./...cleangit statusafter the change shows onlydocs/untracked (no*.docx/*.pdffiles surfacing)What's NOT in this PR
VIBEKNOW_LANG=en) across integration tests — would require a broader test-environment audit; separate concern.runVideoCmdrename torunCLI— the name is misleading now that non-video tests use it, but the rename is mechanical churn separate from this consolidation.Commits
2fd1392refactor(tests): shared binary build + runVideoCmd consolidation (0.6.1)