Repository navigation
refactor(media): land post-transcode validation via sdk.LandArtifact (G-8/G-9) - #4
Conversation
…(G-8/G-9) Bump sdk to v0.2026254.439 (the LandArtifact host leg landed in sdk#249, tag of sdk#249) and route the write-then-validate tail through the ONE shared call every artifact-producing plugin uses: VerbVerdict now runs the exit/stdout/stderr matchers only (artifact=false) and the artifact validators (artifact_min_bytes etc.) ALWAYS run via sdk.LandArtifact(ctx, nil, "", out, &val) on the existing host path. The source-frame artifact_not_uniform check keeps its RDD-3 pre-encode binding on the MJPEG source. go mod tidy also pulls spec v0.2026250.2036 (MVS requirement of the new sdk).
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff = go.mod/go.sum/provider.go, all accounted for in body); no secrets/exfiltration; dependency bumps are to the org's own Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff = go.mod/go.sum/provider.go, all accounted for in body); no secrets/exfiltration; dependency bumps are to the org's own Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — action-review. |
Summary
Migrate plugin-media's artifact handling to the shared
sdk.LandArtifactwrite-then-validate tail (approved plan G-8/G-9).github.com/opencharly/sdkto v0.2026254.439 (the tag of sdk#249, which landed theLandArtifacthost leg).go mod tidyalso resolves spec to v0.2026250.2036 (MVS requirement of the new sdk — same PR, build-consistent).sdk.VerbVerdictnow runs the shared exit/stdout/stderr matchers only (artifact=false); the artifact validators no longer run inside the verdict pipeline.sdk.LandArtifact(ctx, nil, "", out, &val)call every artifact-producing plugin uses — host leg (nil executor + blank venue path): nothing is pulled or written,sdk.RunArtifactValidatorsALWAYS runs on the existing host path (artifact_min_bytes / min_dimensions / min_cast_events / contains_text). Validator failure returns the sametranscode: transcode: <err>wire shape as before.runTranscode) is unchanged; the source-frameartifact_not_uniformcheck (RDD-3, pre-encode on the MJPEG) keeps its plugin-local binding and stays stripped from the copy handed to the shared validators.RunArtifactValidatorscall existed in the plugin (validation rode insideVerbVerdict'sartifact=trueleg); that leg is what this removes.How tested
Host: ffmpeg/ffprobe present (
/usr/bin/ffmpeg,ffmpeg version n9.0.1), so every ffmpeg-dependent test RAN live — none skipped.go test -vkey results (live ffmpeg execution, PASS — zero SKIP):TestTranscodeToMp4— PASS (real MJPEG → ffmpeg → valid MP4, ffprobe-verified; artifact_min_bytes=100 passes through the new LandArtifact tail)TestTranscodeSharedMatcherSelfEvaluation/artifact_min_bytes_failure— PASS (fails viasdk.LandArtifact→RunArtifactValidators, message names "min_bytes")TestTranscodeSharedMatcherSelfEvaluation(exit_status equal/mismatch, stderr matchers) — PASS (matchers-only VerbVerdict)TestTranscodeUniformSourceFailsHonestly— PASS (source-frame not-uniform still fails honestly)TestTranscodeOddHeightSource,TestTranscodeSourceResolution,TestTranscodeDefaultOutputPath— PASSFull output of
go test -v ./...: 29 tests/subtests PASS,ok github.com/opencharly/plugin-media/candy/plugin-media 0.403s.Rulebook compliance
sdk.LandArtifact→sdk.RunArtifactValidators. The transcode plugin is a host-side producer and calls the same tail as venue-side producers.feat/land-artifactoff currentorigin/main(eb1ec55); no force-push, no main push; commit verified withgit show --stat+ cleangit status.Change classification
go build ./...+go test ./...passed on the final committed tree, with live ffmpeg exercising the changed path.fully tested and validated(go suite passed on the committed tree with live execution).Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)