Skip to content

publish-kernel: fast-forward omamobile and tag releases, never force-push; RELEASES records the 11-01 decisions - #310

Merged
derekross merged 3 commits into
mainfrom
kernel-publish-fix
Nov 2, 2026
Merged

derekross merged 3 commits into
mainfrom
kernel-publish-fix

Conversation

@derekross

Copy link
Copy Markdown
Owner

The kernel publishing model in RELEASES §8 had drifted from reality. Run as documented, tools/publish-kernel would have force-pushed and dropped every community commit merged into omamobile since 10-29.

tools/publish-kernel rewritten. Usage: tools/publish-kernel [--dry-run] [--tag kernel-YYYY.MM.DD] [BRANCH].

  • It reads the published tip, and pushes only a branch that contains it (a fast-forward).
  • It refuses merge commits.
  • It runs kernel-pr-check --no-checkpatch --strict-trailers on the new commits: a human sign-off from the author, none from an AI, no Co-Authored-By.
  • With --tag, it creates an annotated tag and pushes it atomically with the branch.
  • --dry-run prints the exact commands without running them.
  • The squash replay, --rebuild and every force-push are gone.
  • The remote comes from $PUBLISH_KERNEL_REMOTE, so tests can never reach GitHub.

tools/kernel-pr-check. A Co-Authored-By trailer now warns on pull requests and fails with --strict-trailers. Kernel CI runs this tool from our main, so a hard failure would have turned open community PRs red at once.

Tests. tests/publish-kernel is new and sandboxed (file:// remote only, ssh refused, global config replaced, environment overrides unset). It covers fast-forward, refusals, tags, dry run, an unreadable remote, a race with another push, and a shim that fails on any force, delete or mirror push. tests/kernel-pr-check gets the new trailer cases, and tests/all passes.

Docs.

  • RELEASES §1, §4, §7, §8, §9 and §11 now describe the real model: omamobile on GitHub is the one source, releases are tags kernel-YYYY.MM.DD, and omamobile-int stays local only.
  • §12 becomes the record of the decisions approved on 2026-11-01.
  • AGENTS, CONTRIBUTING, README, ROADMAP and KERNEL-PUBLISH are updated to match.

Supersedes #286 (only21mil). It takes #286's ls-remote exit-code rule and its sandboxed test idea, with credit; #286's force-with-lease and rebuild paths don't fit a branch that only moves forward.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

derekross and others added 3 commits November 1, 2026 20:26
…push

Since 2026-10-30 the phone runs the published omamobile branch plus a
curated local branch, and community pull requests merge into omamobile
on GitHub. RELEASES §8 still said releases come from omamobile-int
snapshots published with tools/publish-kernel, and run that way the
tool found no local commit matching the published tree and fell back to
a rebuild and a force push: from the stale local omamobile that drops
every community commit, from omamobile-int it replaces the snapshot
history with hundreds of unsigned commits.

The model is now: omamobile on GitHub is the one source of the release
kernel; community work lands by rebase merges, the maintainer's curated
work as a fast-forward of a local release branch built on the current
published tip; releases are annotated tags on it (kernel-YYYY.MM.DD,
proposed); omamobile-int is a local test branch only.

tools/publish-kernel is rewritten to match. It reads and fetches the
published tip first (a failed read is never taken for a missing
branch), pushes only when the branch contains it, and otherwise prints
the rebase to run. It runs kernel-pr-check's commit and policy checks
(new --no-checkpatch) on what it would publish and refuses merge
commits. --tag creates an annotated tag naming the release uname and
pushes it with the branch atomically, or alone on the published tip;
--dry-run prints the exact push. The squash replay, --rebuild and every
force push are gone; with no force flag, git refuses a non-fast-forward
even when the remote moves during the run. The remote comes from
PUBLISH_KERNEL_REMOTE for the test.

kernel-pr-check now fails a Co-Authored-By trailer: CONTRIBUTING §6.2
and coding-assistants.rst credit an AI with Assisted-by in kernel
commits.

This takes over #286's safe read of the published tip (ls-remote exit
2 only means missing) and its test sandbox idea; its --rebuild and
--force-with-lease paths have no place in a branch that only moves
forward, so the two conflict in tools/publish-kernel and RELEASES §8.

tests/publish-kernel runs the tool against a scratch bare repository
with only the file protocol allowed, ssh disabled, replaced global and
system configs and the GitHub URL rewritten into the scratch folder,
and logs every push to prove none forces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d
The maintainer decided all twelve items of the release decisions brief,
with the kernel source changed to a tag on the published omamobile
branch after the curated commits land there by fast-forward. §12 turns
from open questions into that record, and the sections the decisions
change say so: the kernel package is packed on the build machine with
the pinned AOSP clang (§4, §9); one root image per device, a signed
JSON manifest with per-file sizes and hashes and the install checks as
data for a future web flasher and desktop installer, and hosting next
to [omamobile] with the GitHub Release carrying notes and links, never
any Google firmware (§6); the first release's version and label (§7);
signing with the release key and users on stable (§10); the attended
test install gating the release, and the upload and promotion (§11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d
…ls with --strict-trailers

linux-omarchy-mobile's CI runs this tool from omarchy-mobile's main, so
failing every Co-Authored-By trailer would have turned open community
kernel PRs red the moment this branch merged. Pull requests now get a
warning that names the commits; tools/publish-kernel passes
--strict-trailers, so nothing published carries one. The help range
follows the longer header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d
@derekross
derekross merged commit 645bb62 into main Nov 2, 2026
2 checks passed
@derekross
derekross deleted the kernel-publish-fix branch November 2, 2026 01:41
derekross pushed a commit that referenced this pull request Nov 9, 2026
--help printed a hard-coded line range of the header comment, so every
change to the header had to move the range by hand: #287 and #288 each
added a header line and both set it to '3,37p', and with #310 on main
the merged ranges became '3,46p' and '3,47p'. Whichever change missed
the update cut the header's last line. On #287 the maintainer suggested
working the range out from the file instead.

--help now prints from line 3 to the first line that isn't a comment,
with the awk line tools/nv-backup and tools/phone-provision already use
(without their "# " stripping, so the output keeps its current form).
On today's header its output is byte for byte what '3,49p' printed.

tests/kernel-pr-check gains a check that runs --help on a copy of the
tool with one more header line, and compares it with the header up to
the line before `set -uo pipefail`. It failed with the old range (the
last header line was missing) and passes with this change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
derekross added a commit that referenced this pull request Nov 9, 2026
Fourteen tools printed --help as a hard-coded line range of their
header comment (sed -n '3,NNp'), the pattern that cut kernel-pr-check's
header after #287, #288 and #310 each edited it. On #287 the maintainer
suggested working the range out from the file; #529 did that for
kernel-pr-check alone. This moves all of them onto one helper,
tools/lib/usage.sh: usage_from_header prints the comment lines from
line 3 up to the first line that isn't a comment (#529's awk line), with
"# " taken off or, with --raw, kept. Tools load it only for --help, so
the copies the tests make of a tool, with only the lib files it needs,
still run. kernel-pr-check moves onto it too.

Ten tools print byte for byte what they printed before (cmp of stdout,
stderr and exit status, and of phone-demo's and phone-mirror's error
usage). Five ranges were already wrong, and print the header now:
fetch-toolchain and build-flame-probe printed two lines of code after
it; install-phone cut --reinstall, --unsigned and its last paragraph,
build-rootfs cut --channel, and release cut its check-bundle stage.
build-packages, phone-demo and release print only the start of a longer
header, so the helper takes a paragraph count (a bare "#" line ends
one) and their output stays what the range meant.

install-phone keeps the awk line inline, as nv-backup and
phone-provision already do: make-bundle ships these three alone,
without tools/lib (review lesson L-497).

tests/tools-help fails if any tool still hard-codes the range, and runs
--help on every tool that prints its header (the helper's users and the
three inline ones): it must print the header, or whole paragraphs from
its start, and no code, and a copy whose header has grown by a line
must print that line too. It replaces #529's single-tool check in
tests/kernel-pr-check. On the base it fails on the range check, and the
per-tool check fails for 13 of the 15 tools.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Derek Ross <derekross@gmail.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…push; RELEASES records the 11-01 decisions (derekross#310)

* publish-kernel: fast-forward omamobile and tag releases, never force-push

Since 2026-10-30 the phone runs the published omamobile branch plus a
curated local branch, and community pull requests merge into omamobile
on GitHub. RELEASES §8 still said releases come from omamobile-int
snapshots published with tools/publish-kernel, and run that way the
tool found no local commit matching the published tree and fell back to
a rebuild and a force push: from the stale local omamobile that drops
every community commit, from omamobile-int it replaces the snapshot
history with hundreds of unsigned commits.

The model is now: omamobile on GitHub is the one source of the release
kernel; community work lands by rebase merges, the maintainer's curated
work as a fast-forward of a local release branch built on the current
published tip; releases are annotated tags on it (kernel-YYYY.MM.DD,
proposed); omamobile-int is a local test branch only.

tools/publish-kernel is rewritten to match. It reads and fetches the
published tip first (a failed read is never taken for a missing
branch), pushes only when the branch contains it, and otherwise prints
the rebase to run. It runs kernel-pr-check's commit and policy checks
(new --no-checkpatch) on what it would publish and refuses merge
commits. --tag creates an annotated tag naming the release uname and
pushes it with the branch atomically, or alone on the published tip;
--dry-run prints the exact push. The squash replay, --rebuild and every
force push are gone; with no force flag, git refuses a non-fast-forward
even when the remote moves during the run. The remote comes from
PUBLISH_KERNEL_REMOTE for the test.

kernel-pr-check now fails a Co-Authored-By trailer: CONTRIBUTING §6.2
and coding-assistants.rst credit an AI with Assisted-by in kernel
commits.

This takes over derekross#286's safe read of the published tip (ls-remote exit
2 only means missing) and its test sandbox idea; its --rebuild and
--force-with-lease paths have no place in a branch that only moves
forward, so the two conflict in tools/publish-kernel and RELEASES §8.

tests/publish-kernel runs the tool against a scratch bare repository
with only the file protocol allowed, ssh disabled, replaced global and
system configs and the GitHub URL rewritten into the scratch folder,
and logs every push to prove none forces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* RELEASES: record the first-release decisions of 2026-11-01

The maintainer decided all twelve items of the release decisions brief,
with the kernel source changed to a tag on the published omamobile
branch after the curated commits land there by fast-forward. §12 turns
from open questions into that record, and the sections the decisions
change say so: the kernel package is packed on the build machine with
the pinned AOSP clang (§4, §9); one root image per device, a signed
JSON manifest with per-file sizes and hashes and the install checks as
data for a future web flasher and desktop installer, and hosting next
to [omamobile] with the GitHub Release carrying notes and links, never
any Google firmware (§6); the first release's version and label (§7);
signing with the release key and users on stable (§10); the attended
test install gating the release, and the upload and promotion (§11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* kernel-pr-check: a Co-Authored-By trailer warns on pull requests, fails with --strict-trailers

linux-omarchy-mobile's CI runs this tool from omarchy-mobile's main, so
failing every Co-Authored-By trailer would have turned open community
kernel PRs red the moment this branch merged. Pull requests now get a
warning that names the commits; tools/publish-kernel passes
--strict-trailers, so nothing published carries one. The help range
follows the longer header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ross#529)

--help printed a hard-coded line range of the header comment, so every
change to the header had to move the range by hand: derekross#287 and derekross#288 each
added a header line and both set it to '3,37p', and with derekross#310 on main
the merged ranges became '3,46p' and '3,47p'. Whichever change missed
the update cut the header's last line. On derekross#287 the maintainer suggested
working the range out from the file instead.

--help now prints from line 3 to the first line that isn't a comment,
with the awk line tools/nv-backup and tools/phone-provision already use
(without their "# " stripping, so the output keeps its current form).
On today's header its output is byte for byte what '3,49p' printed.

tests/kernel-pr-check gains a check that runs --help on a copy of the
tool with one more header line, and compares it with the header up to
the line before `set -uo pipefail`. It failed with the old range (the
last header line was missing) and passes with this change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ekross#559)

Fourteen tools printed --help as a hard-coded line range of their
header comment (sed -n '3,NNp'), the pattern that cut kernel-pr-check's
header after derekross#287, derekross#288 and derekross#310 each edited it. On derekross#287 the maintainer
suggested working the range out from the file; derekross#529 did that for
kernel-pr-check alone. This moves all of them onto one helper,
tools/lib/usage.sh: usage_from_header prints the comment lines from
line 3 up to the first line that isn't a comment (derekross#529's awk line), with
"# " taken off or, with --raw, kept. Tools load it only for --help, so
the copies the tests make of a tool, with only the lib files it needs,
still run. kernel-pr-check moves onto it too.

Ten tools print byte for byte what they printed before (cmp of stdout,
stderr and exit status, and of phone-demo's and phone-mirror's error
usage). Five ranges were already wrong, and print the header now:
fetch-toolchain and build-flame-probe printed two lines of code after
it; install-phone cut --reinstall, --unsigned and its last paragraph,
build-rootfs cut --channel, and release cut its check-bundle stage.
build-packages, phone-demo and release print only the start of a longer
header, so the helper takes a paragraph count (a bare "#" line ends
one) and their output stays what the range meant.

install-phone keeps the awk line inline, as nv-backup and
phone-provision already do: make-bundle ships these three alone,
without tools/lib (review lesson L-497).

tests/tools-help fails if any tool still hard-codes the range, and runs
--help on every tool that prints its header (the helper's users and the
three inline ones): it must print the header, or whole paragraphs from
its start, and no code, and a copy whose header has grown by a line
must print that line too. It replaces derekross#529's single-tool check in
tests/kernel-pr-check. On the base it fails on the range check, and the
per-tool check fails for 13 of the 15 tools.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Derek Ross <derekross@gmail.com>
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.

1 participant