Repository navigation
The playback build/package matrix: PLAYBACK_BACKENDS selects both, uri, feed or none (P7) - #1276
Merged
Merged
Conversation
…iants and the backend-removal drill record The tree is integ/uri-first's (bd398bd) exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r scope, check-nodef none, stamp decode, LIBS_REAL line ref) doc-claim-auditor on origin/main...carve/p7, findings 2-5 and 7: - Makefile SRCS comment: src/starfish.c is not built without a Feed backend. - Makefile gc-sections comment and ci/check-elf.sh: the Starfish interposer is a Feed build's export; a uri build has none and check-elf's uri mode asserts it absent. - Makefile check-nodef comment and docs/agent-reference.md: PLAYBACK_BACKENDS=none checks the bare no-backend set, not a single-backend set. - docs/distribution.md: the RELEASE stamp assertion decodes the stamp, it no longer greps it. - docs/hud-plugins.md: LIBS_REAL line number dropped (the matrix moved it). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…-11-08) and restate its headroom text doc-claim-auditor finding 1: the measured/measured_on/headroom fields described a 17,000,000 -> 20,000,000 lineage and a 402 KB growth over main that this diff does not land on (main's limit is 18,750,000, and plx_play_uri is already on main). Measured on this tree: `make ARM_PROFILE=release ipk FLAVOR=debug` stages a stripped 17,570,496-byte binary, the same size as origin/main's own build. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…=uri, feed, none) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…; host-lint timeout for the new step; the drill record names where its commits live A recipe-level refusal ran after the parse-time stamp reset, so a mistyped `make PLAYBACK_BACKENDS=none ipk` deleted the last real build's binary and staged libraries before refusing. test_no_backend_cannot_produce_a_television_binary now asserts the stamp and the reset paths survive pkg/plxnative, ipk and deploy; it failed before the move and passes after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ightly ids PLAYBACK_BACKENDS ?= both also reads the environment, so a leftover export could turn make FLAVOR=stable RELEASE=1 ipk into a stable package with no Feed backend. test_a_user_facing_flavour_ships_both_backends failed before the guard and passes after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
The URI and Feed backends are already two crates (
plx_play_uri,plx_play_feed, #1274 and #1275). This PR makes the build able tosay which of them a binary contains, and records the drill that proved each one can be deleted. It changes no shipping behaviour:
the default is
both, andbothbuilds the binarymainbuilds (Behaviour, below).PLAYBACK_BACKENDS=both(default) |uri|feed|none(Makefile). One word, anything else is a parse-time error.It selects four things together, and keys the Cargo target directory so one value never reuses another's objects
(
make -s [RELEASE=1] PLAYBACK_BACKENDS=<v> print-playback-configprints them):RELEASE=1)bothplay-uri,play-feedsrc/starfish.c-lplayerAPIs -lpf-1.0target/target-releaseuriplay-urisrc/starfish.ctarget-uri/target-release-urifeedplay-feed-lplayerAPIs -lpf-1.0target-feed/target-release-feednonesrc/starfish.ctarget-none/target-release-noneThe dev set (
devtools,devtriggers,threadcheck) is added whenRELEASEis unset, and every build now passes--no-default-featureswith the backends named explicitly, so the stamp (
pkg/.build-config) carries the feature list.noneis not a television package:the Makefile refuses it at parse time, before the stamp reset, for every goal except
check-nodef,cleanand the side-effect-freequeries (
A television package requires a URI or feed playback backend; ..., make exit 2), so a refusedmake PLAYBACK_BACKENDS=none ipkleaves the previous build's stamp and outputs alone.make check-nodef PLAYBACK_BACKENDS=nonetype-checks the bare no-backend set.make check-nodefpasses the selected set.The stable and nightly ids ship both backends.
release-guardrefusesFLAVOR=stable|nightlywith anyPLAYBACK_BACKENDSotherthan
both, so a single-backend binary can only ever be a dev (debug) build.ELF gate.
ci/check-elf.sh [binary [both|feed|uri]](the mode defaults to$PLAYBACK_BACKENDS, elseboth).urimode failsif the Feed interposer (
callbackFunctionHook) is in.dynsymor in a relocation, or iflibplayerAPIs/libpfstay inDT_NEEDED, and gradesDT_NEEDEDagainst the newci/expected-dt-needed-uri.txt(13 entries:ci/expected-dt-needed.txt's 15without
libpf-1.0.so.1andlibplayerAPIs.so.1).bothandfeedare graded againstci/expected-dt-needed.txt.Package stamp.
ci/check-package.pydecodespkg/.build-configagainst the Makefile's own flag strings for every backend thematrix builds (
--print-build-config), andbuild-package.ymlasserts the release build's stamp decodes asrelease. The grep thatstood there (
--no-default-features) passed for a dev build too once every stamp carried that flag.Host tests.
ci/test_sim_backend.py(new; inci/check-python-steps.txt, so amake checkstep) holds the simulator's backendfeatures;
ci/test_arm_profile.py,ci/test_check_elf.pyandci/test_managed_targets.pygain the matrix cases, andci/test_gen_notices.pypins that--verify-graphresolves the ARM graph with the Makefile's shipping feature set (asked ofmake print-playback-config) instead of a bare--no-default-features.CI type-checks every value; it builds and packages only
both. A new step in the host-checks job runsmake check-nodefwithPLAYBACK_BACKENDS=uri,feedandnone, so acfg(feature = ...)slip that breaks a single-backend build fails the PR. The ARM link andELF gate of a variant stay local (
ci/check-elf.shis still called bare, modeboth, atci.ymlandbuild-package.yml); the otherworkflow changes are the stamp decode in
build-package.ymlandhost-lint'stimeout-minutes10 -> 20 for the three extratype-checks (to be re-measured from this PR's first CI timing). The variant links are in Verification and the drill record below.
The removal drill, recorded.
docs/measurements/backend-removal-drill-2026-11-06.md: two disposable worktrees from869ff76e2,one deleting
rust-modules/play-feed/(nofeed, URI survives, 52 files,128bc3282) and one deletingrust-modules/play-uri/(
nouri, Feed survives, 26 files,d17fe5b9d), each edited only in registrations (manifests, lockfile, layer table, Makefile, CI andtool lists, ledgers). Both survivors passed the whole sequence: zero diff in the shared crates (except the R-W5 dev-dependency lines),
cargo treefree of the deleted crate,check-nodef, the lib tests (1,218 and 1,196 passed),check-module-layers,check-deps,the simulator targets, a
RELEASE=1 ... ipkthat passescheck-package.py/check-packaged-elf.py(20,174,614 and 20,541,048bytes), and
PLAYBACK_BACKENDS=nonerefusing. The doc also lists what failed or was left over.docs/uri-first-migration.md(new) is the staged-migration note that record belongs to.
Budget:
binary_bytes18,750,000 -> 20,000,000 (ci/build-budgets.json; the owner approved the raise for this series). Measured onthis tree with
ARM_PROFILE=release: the CI cross-build job's artifact (make ipk FLAVOR=debug, stripped, both backends plus the devfeatures) is 17,570,496 bytes, the shipping
RELEASE=1binary 16,091,088 bytes. Both are the same size as the correspondingorigin/mainbuilds (the raise buys headroom for the work after P7; the measured binary does not exceedmain's 18,750,000). Thefile's
measured/measured_on/headroomnow say 17,570,496 / 2026-11-08 / 14%;main's 17,041,608 predates The URI backend returns asplx_play_uri: installed in the shipping binary, never selected, dev triggers back (P5) #1275.The rest.
ci/rust_toolchain.py(the Makefile's flag strings per backend),ci/mkmacapp.py,rust-modules/{README.md,Cargo.toml, media/Cargo.toml}and the.gitignorelines for the per-backend target dirs,AGENTS.md,docs/agent-reference.md,docs/uri-mode.md,.agents/skills/ui-sim/SKILL.md,.agents/agents/fw-compat-reviewer.md(now namesci/expected-dt-needed-uri.txtandPLAYBACK_BACKENDS/PLAYBACK_HAS_FEED), and the matrix prose. The audit round (below) toucheddocs/distribution.mdanddocs/hud-plugins.md.Behaviour
The shipping binary is byte-identical in content to
main's. Both built here withmake ARM_PROFILE=release RELEASE=1(themainside from a detachedorigin/mainworktree,3ae2ebfbb, with this checkout's stagedvendor/cloned in):origin/main3ae2ebfpkg/plxnativee7c77cd5...72a371d8ab8a0...9a4bstrip --strip-unneeded, asmake ipkstages)fee0c739...0cadab42cf8c...a468pkg/.build-configfeatures:--no-default-features --features play-uri,play-feed+tel:98c4b7d37a4cThe sha256 differ because
build.rsembeds the short commit (PLX_BUILD_SHA, About screen): once per binary as a string andonce as eight characters inlined by LTO into a
movw/movtpair, plus the sha1--build-idthat hashes the file. With those tworeplaced by
#(the build id zeroed), the two files are identical byte for byte, unstripped and stripped.The default dev shape: same code, a different stamp spelling.
make ARM_PROFILE=release+make ARM_PROFILE=release ipk FLAVOR=debugstages a stripped binary of 17,570,496 B on both sides (
24,651,840/24,652,564B unstripped). Their stamps differ on purpose:mainwritesfeatures:+tel:98c4b7d37a4c(cargo's default features), this branch writesfeatures:--no-default-features --features play-uri,play-feed,devtools,devtriggers,threadcheck+tel:98c4b7d37a4c(the same set, named explicitly). That spelling isnot inert:
--no-default-featuresremoves thefeature = "default"cfg from the application crate, so its symbol hashes change andLTO lays out
.text16 bytes smaller (file hashes differ, section sizes differ by.text-0x10,.ARM.exidx-0x30,.symtab/.strtab).To prove that is the whole difference,
main's tree was rebuilt with the explicit flags (make RUST_FEATFLAGS="--no-default-features --features play-uri,play-feed,devtools,devtriggers,threadcheck" ipk): its stamp is identical to this branch's, and its binary differsfrom this branch's in 10 bytes, all of them the inlined build-sha immediates above (
ebfb3ae2vs82b01b01, the two commits' hexcharacters), plus the build id. No code differs.
Nothing selects URI at runtime, unchanged from P5. The URI driver is installed on a normal boot and is never offered a source:
the production qualifier answers
Unknown, the evidence certifies no control, andBackendPolicy::choose()opens only aQualifiedoffer. This PR adds no call into that chain;
rust-modules/srcand the player crates are untouched, and the shipping binary above isthe proof.
A
uribinary links neitherlibplayerAPIsnorlibpf, has nosrc/starfish.cand exports no Starfish interposer; it is a buildmatrix result, not a shippable configuration (nothing in the product selects it). A
feedbinary equalsbothminus the URI driver.Content size (non-whitespace characters of the changed paths,
origin/main-> branch)Git reports 31 files changed (4 added, 27 modified; +1,255/-179 lines). The new docs are 29k of the 58k.
ci.yml,build-package.yml)No Rust source changes; no C source changes.
Last of the series
With this PR,
mainholds the whole URI-first integration branch; nothing of it is left to carve. The files the older layout hadunder
rust-modules/media/src/(the Feed's demuxer pieces and the three URI-probe files) were already removed by the earlier PRs.Verification
Run on the committed tree (
git status --shortempty before and after each gate):make checkon the head,4a4e362ac: 127 steps, all ok (309 s wall; the same ona53530023, 670 s wall); 43 libtesttest result:lines, every oneok., 25,462 passed,0 failed, 198 ignored (several crates run under more than one feature configuration, so the sum counts some tests twice; the lines are per
crate, never one total). Among them:
plx_play_uri203,plx_playback_contract40,plx_platform402,plx_play_feed300,plx_media1927 (84 ignored),plxnative-modules1236, hostsimplx_media2194 (84 ignored) and the application's hostsim suite 1419;tests/test_harness.py722 tests OK. The same 43 lines onc4a4c6330, before the audit round (127 steps, 1333 s wall under load).make check-nodef PLAYBACK_BACKENDS=both|uri|feed|none: all four rc 0 (urichecks onlyplx_play_uri,feedonlyplx_play_feed,noneneither).
bash ci/check-deps.sh: all gates green.ci/check-module-layers.py: 18 layers, 1,805 modules, green.ARM links,
ARM_PROFILE=release, on1b0182b02(the later commit changes onlyci/build-budgets.jsontext), each followed bybash ci/check-elf.shand
python3 ci/check-build-budgets.py --binary <stripped binary>; every assertion of every ELF run passes (hook export or its absence inuri,exitinterposer, 0 CP15 barriers, soft-float and libm,DT_NEEDED, storage helper 6 entries, no build-host paths):DT_NEEDED(graded against)RELEASE=1bothplay-uri,play-feedexpected-dt-needed.txt)ipk FLAVOR=debug)play-uri,play-feed,devtools,devtriggers,threadcheckexpected-dt-needed.txt)uriplay-uri,devtools,devtriggers,threadcheckexpected-dt-needed-uri.txt)feedplay-feed,devtools,devtriggers,threadcheckexpected-dt-needed.txt)RELEASE=1uriplay-uriexpected-dt-needed-uri.txt)RELEASE=1feedplay-feedexpected-dt-needed.txt)nonecheck-nodefonlyThe budget is graded on the stripped binary against 20,000,000. The
ipk FLAVOR=debugpackage of the dev shape also passescheck-package.pyandcheck-packaged-elf.py("PASS actual IPK: 8 ELF files").doc-claim-auditoronorigin/main...carve/p7: 7 findings, the six that are prose fixed in1b0182b02/a53530023(theSRCScomment, the Starfish-interposer sentences in the Makefile and
ci/check-elf.sh, thecheck-nodefnonesentence in the Makefile anddocs/agent-reference.md,docs/distribution.md's stamp assertion,docs/hud-plugins.md'sLIBS_REALline number, and thebinary_bytesbaseline text); the seventh was the first commit's subject ("its CI variants"), which the CI step above now makes true. The two new docs were checked against the tree (cargo treeruns, commit stats, linenumbers,
print-playback-config, DT_NEEDED counts) with no contradiction found.pr-revieweronorigin/main...carve/p7(one round), fixed test-first:PLAYBACK_BACKENDS=nonewas refused in a recipe after thestamp reset had already run, so a refused
ipkwiped the previous build's stamp (ci/test_arm_profile.py:: test_no_backend_cannot_produce_a_television_binarynow asserts the stamp andRESET_PATHSsurvivepkg/plxnative,ipkanddeploy;it failed before
2576f309eand passes after); CI type-checked no single-backend set (d33601ec7); nothing stopped a stable or nightlybuild with one backend (
test_a_user_facing_flavour_ships_both_backends, 4 failures before4a4e362ac, green after); the drill recordnow says its commits live on
integ/uri-first.fw-compat-reviewer: PASS. The shippingbothELF is unchanged and graded by CI as before; auribinary's 13-entryDT_NEEDEDis astrict subset of the shipping set. Follow-up it names: CI grades only the
bothELF, so auripackage, if one ever ships, needs itsown CI
check-elf.sh urigate first (todayrelease-guardrefuses one for the stable and nightly ids).TV: not run, and not needed: no source in a shipped crate changed and the shipping binary is unchanged.
build-bench
make build-bench ARGS="--runs 3 --only noop,leaf,machine,platform,gfx,net,ui,plex,telemetry,data,session,media,appkit,screens,app,hub,tests,arm,sizes", baseorigin/main3ae2ebf, head 4a4e362, one after the other on the same Mac (M4, 10 cores).Both runs warned that the host was loaded (load above the core count in several runs), so these timings are noisy. The head's
medians are higher in most rows, and the ranges overlap in most of them. Neither side measured a cause for the gap. What the two runs agree on is the shape:
every scenario rebuilt the same units out of 189, the unit suite passed the same 12,444 (0 failed, 99 ignored), and the ARM archive is 122.0 MiB
on both sides. The host test build's flags are not touched by this PR (
RUST_FEATFLAGSis the ARM build's). The dev ARM build nownames its default feature set explicitly; that explicit spelling is the stamp difference described under Behaviour. Both sides flag the
no-op row as recompiling the app crate, so that predates this PR.
Related: #1064
🤖 Generated with Claude Code