Repository navigation
refactor(tune): consolidate shared scoring utilities - #1513
Merged
Merged
Conversation
lusoris
marked this pull request as ready for review
September 22, 2026 23:40
lusoris
force-pushed
the
codex/dedupe-domain-batch
branch
from
September 23, 2026 04:50
a507eb8 to
8f81c23
Compare
6 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
Consolidates the Go tuning stack onto canonical shared model-argument, backend-selection,
and sorted-registry helpers, removing three duplicate-function groups. It also makes a
missing score JSON result fail with exit status 65 instead of being silently accepted,
and cleans every touched file to the repository's HISS profile without adding
suppressions. The dedupe baseline moves from 9 groups / 926 functions to 6 groups / 930
functions; the remaining groups are listed explicitly below.
Type
feat— new featurefix— bug fixperf— performance improvementrefactor— no behavior changedocs— documentation onlytest— test-onlybuild/ci— tooling / infraport— cherry-pick from upstream Netflix/vmafsycl/cuda/simd— backend-specificChecklist
make format && make lintis green locally.meson test -C build./cross-backend-diffand the worst ULP is <= 2..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md).!orBREAKING CHANGE:and the migration path is documented below.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt— do not editdocs/adr/README.mddirectly (regenerated byscripts/docs/concat-adr-index.sh; see ADR-0221).This is a Go-only change: no C/C++, SIMD/GPU, feature-extractor, public libvmaf, or ADR
surface is touched. The focused Go tests, vet, governance audit, container build, and full
pre-push hook suite are green; the unrelated Meson and whole-tree Make gates were not
rerun for this batch.
Bug-status hygiene (ADR-0165)
no state delta: mechanical consolidation plus a directly covered missing-result exit-status correction; no tracked bug changes state.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Cross-backend numerical results
Not applicable: no scoring kernels, golden assertions, models, or backend arithmetic changed.
Performance (if
perforfeat)Not applicable.
Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note —pkg/corpus/AGENTS.mdnow identifiespkg/scorebackendas the sole backend detector.changelog.d/changed/go-tuning-domain-dedupe.mdplus the rendered Unreleased block.docs/rebase-notes.md.Reproducer
Additional evidence: the full pre-push suite passed, including Govulncheck, scoped mypy,
strict MkDocs, secret scanning, and governance checks. A fresh dev-MCP image build compiled
all seven Go commands, and the explicit Go
vmafx-tune corpus --helpruntime smoke passed.Known follow-ups
praetorctl dedupe scan .is expected to remain non-zero for the six groups outside thisbatch, so the dedupe-cadence post-commit check remains red until they are handled:
provideMetrics:cmd/vmafx-controller/main.go:260andcmd/vmafx-server/main.go:214.DeepCopyInto:api/vmafx/v1/zz_generated_deepcopy.go:25and:101.handleReadyz:cmd/vmafx-controller/http_server.go:114andcmd/vmafx-server/http_server.go:167.handleHealthz:cmd/vmafx-controller/http_server.go:102andcmd/vmafx-server/http_server.go:155.cmd/vmafx-controller/http_server.go:189,cmd/vmafx-server/http_server.go:262, andcmd/vmafx-server/rest_adapter.go:110.provideScorer:cmd/vmafx-controller/main.go:232andcmd/vmafx-server/main.go:184.Residuals observed while validating, deliberately not folded into this batch:
libonnxruntime_providers_cuda.so; the inference probe fallsback to CPU and passes.
true/falsemacros hideC keywords.
OPEN.mdbecause that fileis absent in this worktree; this does not affect the passing commit or pre-push gates.
Breaking changes / migration
None.
pkg/corpusretains deprecated compatibility wrappers while callers move topkg/scorebackend, and model argument formatting preserves the existing CLI forms.Merge with master, 2026-09-23
Master's zero-warning pass (#1518) landed most of this consolidation
independently while this branch sat as a draft, down to adding
pkg/model/default.goon both sides. Master's spelling wins wherever the twoare equivalent, so the merged tree stays identical to what master just gated on:
pkg/corpus/score.go,pkg/scorecli,pkg/tune/executor,pkg/bisect/score_yuv.go,pkg/fast/pipeline.goandpkg/modeltakemaster's helper names, signatures and deferred-cleanup shape.
pkg/corpus/backend.gokeeps this branch's deeper move: the backendvocabulary, probe and strict-selection policy live in
pkg/scorebackendandpkg/corpusretains deprecation shims. Master had only aliased the errortype, so this is the part of the PR that still adds something.
pkg/codecadapterkeeps this branch's per-adapter constructors rather thanmaster's three grouped literals; both satisfy the size limit.
cmd/vmafx-tune/cmd/corpus.gokeeps master's sharedmarkCommandFlagsRequiredand gains back the output and scoring registrarsthis branch split out, renamed to master's
register*convention.TestCorpusFlagSurfacecaught the omission on the first attempt — the--output,--vmaf-bin,--score-backendand nine other flags had gonemissing — and passes now.
go build ./...,go vetandCGO_ENABLED=0 go test ./pkg/... ./cmd/...areclean apart from the pre-existing cgo-gated
cmd/vmafx-mcp,cmd/vmafx-nodeandcmd/vmafx-ort-runnerbuild failures, which reproduceunchanged on master.
Generated files were regenerated with their scripts rather than hand-resolved.