Repository navigation
Makefile: device-control goals keep a release-built pkg/plxnative - #991
Merged
Merged
Conversation
`tools/tv-session.sh` closes the app with `make -C $REPO FLAVOR=... kill`, and tests/run.py runs `make kill`, `run` and `run-stream`, none of them with an ARM_PROFILE. After a `make ARM_PROFILE=release` build that is a different configuration from the stamp (`+profile:tvdev` against none), and because these goals were not in SIDE_EFFECT_FREE the Makefile's parse-time reset deleted pkg/plxnative, the staged FFmpeg libraries and the header sentinel, and rewrote pkg/.build-config. `kill` builds nothing; the next `tv-session.sh up` then died on "no pkg/plxnative -- run make". Seen twice in one day. Add the goals that only drive the television to SIDE_EFFECT_FREE: kill, run, run-stream, verify-deploy, uninstall, fetch-profile, softfloat-probe. Each has `tv-lock-require` as its only prerequisite and an ssh/scp recipe. `deploy` and `install` stay out: they build and ship. ci/test_arm_profile.py gets the regression test. It seeds a scratch tree with a real `ARM_PROFILE=release` stamp and release outputs, then parses each goal with `make -n` (the reset runs at parse time, so a dry run reaches it and no recipe runs) and asserts nothing was deleted and the stamp is byte-identical. `clean` is the control that must still reset it. The scratch tree has real pkg/ and vendor/ directories so the reset can never delete the checkout's own files. docs/agent-reference.md said a bare `make run` after `make SYMBOLS=1 deploy` deletes the binary; it now names `make deploy`, which does. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 24, 2026
## What broke #981 (65e976b) added `rust-modules/gfx/src/shaders/fs_ramp.frag`, whose line-8 comment spells the dev-trigger name `plxnative-hwcnt`. `glsl!` embeds a shader source whole (`concat!(include_str!(..), "\0")`, comments included; nothing strips them), so the name was compiled into the binary. The Nightly workflow's `make ipk` step then failed `ci/check-package.py`'s packaged-binary scan: `the com.beb.plxnative.nightly package carries no dev-trigger surface ... (found plxnative-hwcnt)` (seen on PR #991's "ARM build + gates / build + verify" job). #981's only other `plxnative-hwcnt` is a plain `//` comment in `gfx.rs`, which is not compiled in. ## The fix - `fs_ramp.frag`: line 8 now reads `(HWCNT, 2026-10-24)` instead of naming the trigger. A comment only, so the compiled program is unchanged. - New test `gfx::tests::no_shader_source_names_a_dev_trigger` reads EVERY file under `rust-modules/gfx/src/shaders/` (it lists the directory, so a new shader is covered by being added; that is the only `shaders/` directory in the tree) and fails on any `plxnative-`. The scan matches the dev-trigger catalog's names (`dev.rs` `DIAG` + `devtrig.rs` `CONTROLLED`, minus the release-legitimate allowlist); the test matches the whole prefix, a superset that nothing in a shader needs, and the failure message says why. ## Red / green Red, before the reword (`make test-crate C=plx_gfx T=no_shader_source_names_a_dev_trigger`): ``` test gfx::tests::no_shader_source_names_a_dev_trigger ... FAILED .../rust-modules/gfx/src/shaders/fs_ramp.frag:8: // arithmetic words (`plxnative-hwcnt`, 2026-10-24) where one `mix` is 1-1.5: the three uniform test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 163 filtered out; finished in 0.00s ``` Green, after: ``` test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 163 filtered out; finished in 0.00s ``` Whole crate (`make test-crate C=plx_gfx`): `test result: ok. 164 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out`. `make check-nodef` passes. Full `make check` is left to CI. No linked issue. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`make test-crate C=plx_gfx` after a `make ARM_PROFILE=release` build deleted pkg/plxnative and rewrote pkg/.build-config to `features:+profile:tvdev+tel:...` (2026-10-24). The goal builds and runs one crate's lib tests in rust-modules/target-fast and never produces or reads pkg/plxnative; `test-hostsim` and `check-nodef` had been listed in SIDE_EFFECT_FREE and it was missed. The list now follows a rule instead of a memory of which goals were reported: a goal is listed when it builds, reads and ships nothing the stamp describes (pkg/plxnative, the ARM library, anything staged under pkg/), judged from the recipe and its prerequisites. Added, host-only: test-fast, test-crate, lint, check-cargo-lint, check-cargo-unit-hostsim, check-localization, check-c-unit, check-python-harness, notices, notices-verify, setup-rust, setup-env, disk-watch, disk-watch-uninstall, fixtures, fixtures-quick, fixtures-pipeline, demo-library, sim-token, sim-macos-token, sim-clean, sim-macos-clean, and tv-lock-require beside the TV-control goals. print-subs-font-files, print-rust-toolchain, print-rust-codegen and print-cargo-env were queries that QUERY_GOALS never listed, so `make -s print-rust-toolchain` reset a release build as readily as a compile did; they join it. Left out, each for a reason the Makefile comment now gives: deploy/install/ipk/symbols*/libass/ sentry-native build or ship the binary; the host simulators, check-ass, check-ffmpeg and macapp stage host libraries into pkg/; the ARM probes write pkg/; telemetry-local writes pkg/telemetry.local.json, an input of the stamp; `check` is a mix (ci/test_disk_preflight.py runs `make -n` of the ARM library and pkg/plxnative-storage at the checkout's root, and check-cargo-unit-default grades pkg/plxnative-storage when it exists), so check, check-unlocked, check-python, check-python-rest, check-cargo and check-cargo-unit-default stay stamping rather than move the reset into a nested make. ci/test_arm_profile.py: the scratch-tree scaffolding moves into a ScratchTree base; a sibling class runs every host-only goal under `make -n` against a seeded release stamp and asserts nothing was deleted and the stamp is byte-identical. A second test pins the goals that must stay OUT of the list, one reason each, so the list cannot grow past the rule unnoticed. `clean` remains the control. docs/agent-reference.md named five TV-control goals as the whole exempt set; it now states the rule. Co-Authored-By: Claude Sonnet 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.
What
Adds the goals that only drive the television to
SIDE_EFFECT_FREEin theMakefile:kill,run,run-stream,verify-deploy,uninstall,fetch-profile,softfloat-probe. Each hastv-lock-requireas its one prerequisite and an ssh/scp recipe, so none builds or ships anything.deploy,install,testandallare deliberately not added: they build the binary, so they must stamp.Why (the observed failure, twice in one day)
make ARM_PROFILE=releasebuildspkg/plxnativeand writes the stamppkg/.build-config.tools/tv-session.shthen closes the app withmake -C "$REPO" FLAVOR="$FLAVOR" kill(relaunch()and thedownpath), andtests/run.pyrunsmake kill/run/run-stream. None of them pass anARM_PROFILE, soRUST_CFGgains+profile:tvdev, differs from the release stamp, and (because the goal is not inSIDE_EFFECT_FREE) the parse-time reset runs:rm -f pkg/plxnative pkg/plxnative-storage .../avformat.h pkg/lib*-plx.so.* pkg/.ffabi-okand the stamp is rewritten to the tvdev configuration.killbuilds nothing, yet the nexttv-session.sh updied onno pkg/plxnative -- run make.Test (red, then green)
ci/test_arm_profile.py(already amake checkgate) getsDeviceControlGoalsKeepTheBuild. It builds a scratch tree (symlinks to the checkout'sMakefile/ci//tools/, but REALpkg/andvendor/directories, so the reset can never delete the checkout's own binary or FFmpeg header sentinel), seeds it with a realmake ARM_PROFILE=releasestamp plus release outputs, then parses each goal withmake -nand a documentation-range placeholderTV. The reset runs at parse time, so a dry run reaches it and no recipe (no ssh) ever runs. It asserts every planted file survives and the stamp is byte-identical.cleanis the control that must still reset;print-appidis the already-exempt goal that must pass.Before the Makefile change:
After:
ci/test_tv_session.py(44 tests),ci/test_build_bench.py(44),ci/test_tv_ssh.py(24) andci/test_deploy_manifest.py(5) also pass.make checkwas not run locally (the machine is congested); CI gates it.Notes
deployinvokesverify-deployas a sub-make, so that sub-make can no longer delete the binary it was just asked to check.docs/agent-reference.mdsaid a baremake runaftermake SYMBOLS=1 deploydeletespkg/plxnative; that is no longer true, so the sentence now namesmake deploy.make mali-irq-sample(tests/run.py'sMaliIrqSampler,tools/profile-graphics) andmake plxnative-stackwalk(tools/plxnative-sample). They build standalone ARM helpers intopkg/(not the app), so they are not "builds nothing"; whether they should join the list is a separate call.make build-benchwas not run: this adds goals to a parse-time list and changes no build rule, dependency or flag, so it cannot move a build time.Extended to every host-only goal (f3b1d40). The same trap hit
make test-crate C=plx_gfxon 2026-10-24: it deleted a release-builtpkg/plxnativeand rewrote the stamp to+profile:tvdev, though it only builds and runs one crate's lib tests inrust-modules/target-fast. The Makefile comment aboveSIDE_EFFECT_FREEnow states the rule: a goal is listed when it builds, reads and ships nothing the stamp describes (notpkg/plxnative, not the ARM library, nothing staged underpkg/), whether it only drives the TV (above) or is host-only. Added:test-fast,test-crate,lint,check-cargo-lint,check-cargo-unit-hostsim,check-localization,check-c-unit,check-python-harness,notices,notices-verify,setup-rust,setup-env,disk-watch,disk-watch-uninstall,fixtures,fixtures-quick,fixtures-pipeline,demo-library,sim-token,sim-macos-token,sim-clean,sim-macos-clean,tv-lock-require, and fourprint-*queriesQUERY_GOALSnever listed (print-subs-font-files,print-rust-toolchain,print-rust-codegen,print-cargo-env). Left out on purpose:check,check-unlocked,check-python,check-python-restandcheck-cargo(mixes: a step re-runsmakeon$(RUST_LIB)/pkg/plxnative-storagegoals, and every$(MAKE)re-parses with the reset),check-cargo-unit-default(readspkg/plxnative-storage), the build/ship goals and thepkg/-staging host builds.ci/test_arm_profile.pygainsHostOnlyGoalsKeepTheBuild(each added goal keeps a seeded release stamp undermake -n, red fortest-cratebefore the Makefile change and green after, plus a pinned list of goals that must stay out) anddocs/agent-reference.mdstates the rule.make checkon f3b1d40: all 106 steps ok, includingci/test_arm_profile.py.No linked issue.
🤖 Generated with Claude Code