Repository navigation
Patch queue: patches.py absorb for direct edits to vendored files, and a check that says what to run (builds on #147) - #148
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Absorb lacks pre-write checks for already-satisfied replayed patches and empty amended commits, allowing it to modify patch files and leave the patch queue invalid.
3 open issues
What changed in this PR
This PR restores patch-queue coverage of the documentation updates from #139 and adds absorb to fold direct vendored-file edits into existing patches.
Changes:
- Refreshes the probe and fork-documentation patches to reproduce the current docs.
- Adds
absorbwith patch ownership selection, path filtering, safety checks, and fixture tests. - Updates contributor guidance and CI errors with recovery commands.
| File | Description |
|---|---|
scripts/tests/test_patches.py |
Adds absorb scenarios and updates failure-message expectations. |
scripts/patches.py |
Implements absorb and actionable check diagnostics. |
patches/README.md |
Documents absorbing direct vendored-file edits. |
patches/0015-fork-docs.patch |
Records the updated launcher feasibility milestone. |
patches/0014-ios-probe.patch |
Incorporates the device probe results and remaining limitations. |
CONTRIBUTING.md |
Adds absorb to the contribution workflow. |
.github/workflows/tests.yml |
Adds patch-queue recovery guidance to CI errors. |
.github/workflows/pr-scope.yml |
Adds recovery guidance when vendored-tree validation fails. |
Review effort: Balanced
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
aa03f71 to
cd904e1
Compare
patches.py absorb for direct edits to vendored filespatches.py absorb for direct edits to vendored files, and a check that says what to run (builds on #147)
|
Merged #147 just now (it was green and fixes the same red check), so main's Please rebase #148 onto main. What is still worth landing from it: Note for the rebase: 0015 now ends with |
…t says what to run absorb [paths] [--into patch] folds the difference between the vendored files and pin + series into the patch that touches each file, then runs check. check names the command per file; the CI jobs, patches/README.md and CONTRIBUTING.md say the same.
…and print the whole-tree recovery command
cd904e1 to
49715da
Compare


Builds on #147 (this branch is
patch-queue-fixplus one commit; the diff shows only #147's commit until it merges, then rebase). #147 is what restores main's redpatches.py checkafter #139; this PR adds nothing to the series and touches no patch.What changes
patches.py absorb [paths...] [--into <patch>]. It compares the vendored files (working tree or already committed) with pin + series and folds each difference into the patch that already touches the file (the last one if several do), keeping the header. It then runscheck. Use it when you edited a vendored file directly.--into <patch>.apply.checknow prints, per file,docs/x.md differs from pin+patches: run python3 scripts/patches.py absorb docs/x.md and commit patches/. Thepr-scopeand tests CI jobs add the same as an error annotation.patches/README.mdand CONTRIBUTING.md are updated.scripts/tests/test_patches.pyon the fixture repo (owned file, committed edit, last owner, new file next to a patched one,--into, ambiguity, paths filter, deletion, no-op, chain refusal). They do not use the real series.Verified (on the #147 base)
python3 scripts/patches.py checkpasses (18 patches);python3 -m unittest discover scripts/testspasses (34 tests).Fix, merge when green and after #147. It touches the sync mechanism, so @LNPANDY please have a look.