Skip to content

Remove dead code, unused tools and duplicate CI builds (-623) - #371

Merged
DjDeveloperr merged 8 commits into
mainfrom
deadweight/boot-sweep
Nov 21, 2026
Merged

DjDeveloperr merged 8 commits into
mainfrom
deadweight/boot-sweep

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

aura carries code, tools and CI jobs that nothing uses any more: functions with no caller, preprocessor switches that no build defines, two host tools that were replaced, CI steps that repeat another job's build, and README and udev text left over from the rebrand.

Change

Six independent commits, one per removal set, each reviewable on its own, plus a one-line clang-format fix for the second one. Net: -623 lines (20 insertions, 643 deletions, 22 files).

commit change net
865c078 Remove four exported functions that nothing calls -71
72d2961 Remove two compile-time switches that no build sets -20
54498b1 proxyclient: remove the unused cdc_reconnect module -363
ed3123c tools: remove the superseded package_j700.py -145
bb26b03 ci: drop the builds another job already runs -24
70cc97e README, udev: drop leftovers from the rebrand +1
7f6d670 afk: drop the blank line the AFK_TRACE removal left -1

None of this changes what an image does at runtime. The C changes remove uncalled or compiled-out code, and the images keep their sizes.

Testing

  • Clean builds of main 5c70a29 and of each C commit in five configurations: dev, RELEASE=1 CHAINLOADING=1 (Stage 1), +ESP_STAGE2=1, SECBOOT=enforce SECBOOT_FLAVOUR=secure, and SPTM_VIRT=1 SPTM_VIRT_ESP=1 AURACTL=1. All link, aura.bin sizes are unchanged, and the warning lists match main's exactly. The stacked head was built on a second host (system clang and Rust, BUILDSTD=1, the way the Fedora CI job builds) in the same five configurations: all link, and the sizes and warning lists match main's.
  • pytest tests/python: main gives 746 passed, 2 failed, 27 skipped. The 2 failures are test_loadobjs.py, where the build host's nm lists two symbols that share an address in the other order. Each commit shows the same 2 failures and drops only the tests of what it removes. The stacked head gives 736 passed with the same 2 failures: 746 minus the 9 cdc_reconnect tests and the 1 package_j700 test.

Still to run

This PR's CI, which also checks the CI commit: clang-macos must link Stage 1 and the ESP Stage 2, and esp-stage2-size must report the vital size. No hardware row is needed because no removed code was reachable at runtime.

865c078 Remove four exported functions that nothing calls (-71)

Problem

Four exported functions have no caller left:

function added why it is unused now
rtkit_quiesce_ap() (src/rtkit.c) f1118f8 (ewb, ANS AP quiesce before the Stage 1 hand-over) its only caller went away in adf5580, when post-M4 ANS moved to power-off after use and start from off
uartproxy_wait_dockchannel() (src/uartproxy.c) bf75ce3 its caller went away in 75665c7; uartproxy_wait_stage1() covers the DockChannel window
secboot_flavour() (src/secboot.c) f82845c never called; the flavour name is still published in the DT from flavour_name
stage1_proxy_action_needs_cleanup() (src/stage1_proxy.c) Stage 1 proxy window only the host test called it; main.c checks the payload action itself

Change

Remove the four functions and their prototypes, plus the test lines that called them or checked their source. rtkit_quiesce_ap_power() stays because the shutdown path uses it. The ordering test in test_stage1_proxy.py, which checks that CDC cleanup comes before a native hand-off, also stays. Net: -71 lines.

Testing

  • Clean builds on main 5c70a29 and on this branch in five configurations: dev, RELEASE=1 CHAINLOADING=1 (Stage 1), +ESP_STAGE2=1, SECBOOT=enforce SECBOOT_FLAVOUR=secure, and SPTM_VIRT=1 SPTM_VIRT_ESP=1 AURACTL=1. All link, image sizes are unchanged, and the warning lists match main's exactly in each configuration.
  • pytest tests/python: 746 passed, 2 failed, 27 skipped, the same as main (the 2 failures are test_loadobjs.py, where the buildbox's nm lists two symbols that share an address in the other order). The removed lines were assertions inside existing tests, so the test count is unchanged.

Still to run

No hardware row: none of these functions could be reached at runtime before the change.

Evidence
$ git grep -nw 'rtkit_quiesce_ap\|secboot_flavour\|uartproxy_wait_dockchannel\|stage1_proxy_action_needs_cleanup'   # main
src/rtkit.c:976  src/rtkit.h:29          (definition, prototype)
src/secboot.c:363  src/secboot.h:70
src/uartproxy.c:92  src/uartproxy.h:44   tests/python/test_wdt_boot_window.py:149 (reads the source text)
src/stage1_proxy.c:49  src/stage1_proxy.h:42  tests/python/test_stage1_proxy.py:27,28,47,85
$ git log --format='%h %s' -S 'rtkit_quiesce_ap(' | head -2
adf55805 nvme: power a post-M4 ANS off after use, and start it from off
f1118f85 nvme: quiesce ANS AP power before stage 1 hands the session on
  • No Rust or proxyclient caller: the proxy op tables don't name them.
  • None of the 90-odd open aura PRs references these symbols (checked each PR diff).
  • Build matrix, warning diff and pytest logs: traces/boot/20261120-deadweight-boot/ on the lab S500.
config main aura.bin bytes branch aura.bin bytes rc warnings main / branch
dev 3866624 3866624 0 12 / 12
Stage 1 release 1638400 1638400 0 12 / 12
ESP Stage 2 release 3997696 3997696 0 12 / 12
secure flavour, enforce 1507328 1507328 0 13 / 13
SPTM-virt ESP 3735552 3735552 0 12 / 12
72d2961 Remove two compile-time switches that no build sets (-20)

Problem

Two preprocessor switches are never defined by any build:

  • ESP_BOOT_HOST in src/sptm_virt_esp.c (62f365b) swaps the includes for esp_boot_host.h, a host harness under tests/esp_boot_host that was never committed on any branch. Setting it can only break the build.
  • AFK_TRACE in src/afk.c and src/dcp_iboot.c (841cbef) wraps four message hexdumps. No Makefile option, CI job, doc, test, kit or release build defines it.

Change

Remove both switches and the code under them. Net: -20 lines.

Testing

  • Clean builds of main 5c70a29 and this branch in the same five configurations as the rest of this series (dev, Stage 1 release, ESP Stage 2 release, secure flavour with enforce, SPTM-virt ESP). All link, sizes are unchanged, and the warning lists match main's exactly.
  • pytest tests/python: 746 passed, 2 failed, 27 skipped, the same as main (the 2 failures are test_loadobjs.py, where the buildbox's nm lists two symbols that share an address in the other order).

Still to run

No hardware row: the removed code was compiled out of every image.

Evidence
$ git log --all --oneline -S esp_boot_host
62f365b8 sptm_virt: boot macOS from the ESP on T6050, with no host (SPTM_VIRT_ESP)   # the only commit; no esp_boot_host.h anywhere
$ git grep -n 'AFK_TRACE'
src/afk.c:767,920,1080  src/dcp_iboot.c:216   (only the #ifdefs)
$ git log --all --oneline -S AFK_TRACE
841cbef6 display: Add guarded T8152 USB-C DisplayPort bring-up

None of the open aura PRs references either switch. Logs: traces/boot/20261120-deadweight-boot/ on the lab S500.

54498b1 proxyclient: remove the unused cdc_reconnect module (-363)

Problem

proxyclient/aura/cdc_reconnect.py has never had a caller. It was added for the J700 tether in 7d3464a, and proxyclient/aura/boot_cdc.py (bf80900) took over that job: boot_j813.py and boot_j873.py use it, and docs/cdc-boot.md documents it. The unused module also defaults to a USB-C controller reset (flags=0x6), which boot_cdc.py refuses on purpose.

Change

Remove proxyclient/aura/cdc_reconnect.py and its test, tests/python/test_cdc_reconnect.py. Net: -363 lines.

Testing

  • pytest tests/python on the branch: 737 passed, 2 failed, 27 skipped. main gives 746 passed with the same 2 failures (test_loadobjs.py, where the buildbox's nm lists two symbols that share an address in the other order). The 9 missing passes are the removed module's own tests.
  • No C file changes, so the aura images are unaffected.

Still to run

Nothing. This is host-side Python with no hardware path.

Evidence: no callers
$ git grep -n 'cdc_reconnect\|transition_to_cdc'      # on main 5c70a298
proxyclient/aura/cdc_reconnect.py:63:  ...
proxyclient/aura/cdc_reconnect.py:210: def transition_to_cdc(...)
tests/python/test_cdc_reconnect.py:...  (its own test only)
  • gh search code --owner aurora-silicon cdc_reconnect finds only these two files.
  • No open aura PR diff references cdc_reconnect or transition_to_cdc. Rename Asahi properties to aurora and m1n1 to aura #313 changes a comment line in both files; that hunk goes away with the files.
  • aurora-ctl's tests/test_hw_cdc.py and contrib/probes/j700-cdc-qualify.py import m1n1.cdc_reconnect from a separately pinned m1n1 checkout (resident/m1n1-clean-full5), not from this tree. They don't change.
  • History: added in 7d3464a (2026-09-28). git log -S transition_to_cdc shows no commit that ever called it outside its test.

Evidence directory (build and test logs): traces/boot/20261120-deadweight-boot/ on the lab S500.

ed3123c tools: remove the superseded package_j700.py (-145)

Problem

tools/package_j700.py packaged the first J700 builds. d6bd1c4 removed the documentation steps that used it, and since 405eb2f tools/package_release.py has been the only packager: release.yml and docs/RELEASING.md call it. Nothing calls package_j700.py except its own test. The rebrand turned one of its checks into a comparison against {"aura", "aura"}, a sign that nobody runs it.

Change

Remove tools/package_j700.py and tests/python/test_package_j700.py. Net: -145 lines.

Testing

  • pytest tests/python on the branch: 745 passed, 2 failed, 27 skipped. main gives 746 passed with the same 2 failures (test_loadobjs.py, where the buildbox's nm lists two symbols that share an address in the other order). The one missing pass is the removed test.
  • No C changes; images unaffected.

Still to run

Nothing. Host-side tool only.

Evidence: no callers
$ git grep -n package_j700        # main 5c70a298
tests/python/test_package_j700.py (its own test only)
  • gh search code --owner aurora-silicon package_j700: only the test file in this repo.
  • aurora-ctl (host dev tree) and the lab kits under kits/aura, kits/test: no reference.
  • No open aura PR touches either file.
  • History: 6554e14 / ff93cb0 (2026-09-29) added and documented it; d6bd1c4 (2026-10-10) dropped the doc steps; 405eb2f (2026-10-13) added package_release.py, used by release.yml.
bb26b03 ci: drop the builds another job already runs (-24)

Problem

Two CI jobs build things another job already builds:

  • build.yml's stage1-clang job (macOS clang) runs the same Stage 1 link as the clang-macos job in stage1-size.yml, which also checks the room left. Its only unique build is the ESP Stage 2 link with macOS clang.
  • The first step of esp-stage2-size.yml, labelled "plain stage 2", builds RELEASE=1 CHAINLOADING=1 without ESP_STAGE2, which is a Stage 1. The next step's make clean discards it, and stage1-size.yml's fedora job already builds the same thing.

esp-stage2-size.yml also passes SPTM_VIRT_GUARDED=1, which no Makefile on any branch has ever read.

Change

  • Move the macOS-clang ESP Stage 2 link into clang-macos. Remove stage1-clang, which saves one macOS runner per push and PR.
  • Remove the misnamed Stage 1 step from esp-stage2-size.yml and fix its header comment.
  • Drop SPTM_VIRT_GUARDED=1.

Net: -24 lines.

Testing

  • All three workflow files parse as YAML. Both build.yml and stage1-size.yml run on push and pull_request to main, so moving the step keeps the same triggers.
  • The commands themselves are unchanged. The ESP Stage 2 link is the exact gmake line from stage1-clang, run after the Stage 1 room check.
  • This PR's own CI run is the end-to-end check.

Still to run

Watch this PR's CI: clang-macos must link both images, and esp-stage2-size must report the vital size.

Evidence
$ git log --all --oneline -S SPTM_VIRT_GUARDED -- Makefile
(no output: never a Makefile variable)
$ git grep -n SPTM_VIRT_GUARDED
.github/workflows/esp-stage2-size.yml:50

#246 (macos-hv-install, draft) also writes SPTM_VIRT_GUARDED=1 into a JSON of build flags; it has no effect there either.

stage1-clang dates from 2026-11-06. clang-macos (tools/stage1_size.sh, 2026-11-13) has covered its Stage 1 link since then and also enforces the headroom floor.

70cc97e README, udev: drop leftovers from the rebrand (+1)

Problem

The rebrand to aura (bf03ba9) left some text behind:

  • udev/80-aura.rules adds each symlink twice (SYMLINK+="aura", SYMLINK+="aura"), because the old alias was renamed onto the new name.
  • The README says the original device aliases are kept and calls the aura package name "inherited". Neither is true since bf03ba9.
  • It says Mach-O boot-object support "will be reviewed separately". That support was merged in 11852c7 and is documented in docs/macho-boot-object.md.
  • It says Rust crate licences are in "their vendor directories". The tree has no rust/vendor; cargo fetches the crates.

Change

Keep one symlink per rule and correct the three README passages. Net: +1 line.

Testing

Text only. udevadm verify isn't available on the build host, but the rules keep the same syntax with one assignment fewer.

Still to run

Nothing.

Assisted-by: LLM (Claude:Opus 5.5)

- rtkit_quiesce_ap(): its only caller, the ANS hand-over quiesce,
  went away in adf5580 ("nvme: power a post-M4 ANS off after use,
  and start it from off"). rtkit_quiesce_ap_power() stays; the
  shutdown path still uses it.
- uartproxy_wait_dockchannel(): its caller was dropped in 75665c7
  ("boot: replace Neo build profiles with runtime USB selection");
  uartproxy_wait_stage1() covers the DockChannel window.
- secboot_flavour(): added with the Stage 1 flavours (f82845c) but
  never called. The flavour name is still published in the DT.
- stage1_proxy_action_needs_cleanup(): only the host test called it.
  main.c checks the payload action itself, and the ordering test in
  test_stage1_proxy.py still guards the CDC cleanup before a native
  handoff.

Drop the matching test lines.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
- ESP_BOOT_HOST (sptm_virt_esp.c, from 62f365b) swaps in
  "esp_boot_host.h" for a host test harness under tests/esp_boot_host.
  That harness was never committed on any branch, so the switch can
  only break the build.
- AFK_TRACE (afk.c, dcp_iboot.c, from 841cbef) wraps four AFK and
  DCP iBoot message hexdumps. No Makefile option, CI job, doc, test or
  release build defines it.

The images built without either switch are unchanged in behaviour.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
cdc_reconnect.py (added in 7d3464a for the J700 tether) never gained a
caller: nothing in proxyclient/, tools/ or tests/ imports it apart from
its own test. boot_cdc.py (bf80900) does the same job, is what
boot_j813.py and boot_j873.py use, and is the path docs/cdc-boot.md
documents. The unused copy also defaults to a USB-C controller reset
(flags 0x6) that boot_cdc.py refuses on purpose.

Remove the module and its test.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
package_j700.py packaged the first J700 builds. d6bd1c4 dropped the
documentation steps that used it, and tools/package_release.py
(405eb2f) has been the only packager since: release.yml and
docs/RELEASING.md call package_release.py, and nothing else calls
package_j700.py apart from its own test. The rebrand left one of its
checks comparing against {"aura", "aura"}, which shows nobody runs it.

Remove the script and its test.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
- build.yml's stage1-clang job (macOS clang) runs the same Stage 1
  link that stage1-size.yml's clang-macos job runs, and clang-macos
  also checks the room left. Move the one build only stage1-clang had,
  the ESP Stage 2 link with macOS clang, into clang-macos and remove
  stage1-clang. This saves a macOS runner per push.
- esp-stage2-size.yml's first step, labelled "plain stage 2", builds
  RELEASE=1 CHAINLOADING=1 without ESP_STAGE2, which is Stage 1; the
  next step's make clean throws it away and stage1-size.yml's fedora
  job already builds it with the same toolchain. Remove the step.
- SPTM_VIRT_GUARDED=1 is passed to make in esp-stage2-size.yml, but
  no Makefile has ever read it. Drop it.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
- udev/80-aura.rules adds each symlink twice (SYMLINK+="aura",
  SYMLINK+="aura"): the rebrand in bf03ba9 renamed the old alias onto
  the new name. Keep one of each.
- The README still says the original device aliases are kept and calls
  the aura package name inherited; bf03ba9 dropped the aliases and
  renamed the package.
- It says Mach-O boot-object support "will be reviewed separately";
  that support was merged in 11852c7 and has its own doc.
- It points to Rust crate licences "in their vendor directories"; the
  tree has no rust/vendor, cargo fetches the crates.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
clang-format wants one blank line where the removed #ifdef block was.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide RyanTheTide changed the title Remove dead code, unused tools and duplicate CI builds (-622) Remove dead code, unused tools and duplicate CI builds (-623) Nov 19, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7f6d670 and checked the claims against main, not just the PR text.

  • I test-merged it onto current main (afc8ec1): the merge is clean. In the merged tree, git grep -w for rtkit_quiesce_ap, secboot_flavour, uartproxy_wait_dockchannel, stage1_proxy_action_needs_cleanup, AFK_TRACE, ESP_BOOT_HOST, cdc_reconnect, package_j700 and SPTM_VIRT_GUARDED finds nothing. None of the other open aura PRs' diffs use any of them.
  • The dropped esp-stage2-size step really is a Stage 1 build: $COMMON is RELEASE=1 CHAINLOADING=1 without ESP_STAGE2. The macOS-clang ESP Stage 2 link moves into clang-macos unchanged, and that job is green on this head.
  • Nit: the new header comment in .github/workflows/esp-stage2-size.yml:5 runs past 100 columns.

Hardware gate: not needed. Every C hunk removes uncalled or compiled-out code, and the rest is CI, a host tool, the README and udev. Main has moved in .github/workflows/ since 5c70a29, so I'm updating the branch and will merge once CI is green on the new head.

Assisted-by: Claude Opus 5.5

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers. I only checked what Dj's review didn't cover, and found nothing removed that is still used.

  • No other workflow or proof job depends on what this removes. No workflow in the tree uses workflow_run or needs: on stage1-clang. release.yml and docs/RELEASING.md don't mention it or package_j700. main has no required status checks, so dropping the stage1-clang check can't leave PRs waiting on a check that no longer runs. The only remaining mentions of stage1-clang are historical lines in docs/releases/1.0.0b7..b12.md, which are fine as they are.
  • The moved ESP Stage 2 link runs the same command, with the same push/pull_request: main triggers and the same macos-26 runner.
  • A code search across the org finds no other repo that uses cdc_reconnect, package_j700, AFK_TRACE or the four removed functions.
  • The udev rules still give one aura and one aura-sec symlink each.

This head's CI is still pending. Check that clang-macos shows both links and that ESP stage 2 vital size prints the margin. No hardware row is needed.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr merged commit 076a3bf into main Nov 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants