WIP: feat(openchamber): add a --single mode for checking one patch on a fresh tree #349

Draft
agent-navi wants to merge 1 commit from chore/openchamber-upstream-single into main
Contributor

What

Adds --single <patch> to scripts/openchamber-upstream.sh, plus a just upstream-single recipe and a README section.

An absorb check run against a tree that already had the queue applied named the wrong patch as absorbed twice. --single makes "does this tag already contain this patch, and what does it add" one command with no shared state: it extracts the tag fresh, applies the queue prefix in source.nix order, applies the patch, and prints the diffstat that arrived. Exit 2 when it does not apply or adds nothing.

Why not the existing run

just upstream <tag> is a verdict sweep. It answers "does the packaged patch still hold" for the whole queue and stops there. It cannot say what one patch adds on top of its prefix, and it reuses no pruned state by design.

Validation against v2.7.3 (cf18602cc)

Every queued patch, run through the new mode:

  • 21 apply and report a non-empty diffstat
  • notification-family-clear fails: 2 of the 6 files it patches are not in the tag (notifications/runtime.js, server/runtime.js; the tag ships .ts)
  • gitea-references-across fails: 4 of 9 files missing (gitea/mappers.js, provider.js, resources.js, source-control/provider-routes.js), the known hand-port

Diffstat totals were cross-checked for four of the heaviest patches (question-rows 75 files/3469+/196-, question-cards 41/1019+/492-, instance-attention 69/6092+/44-, dictation-recovery 11/492+/67-) against an independent copy-and-compare run; identical.

Guard checks

  1. A /tmp tree with the whole queue already applied, and a fake oc-upstream-XXXXXX directory containing it, do not change any result. The mode never reads a tree it did not extract this run.
  2. The --upstream checkout is itself dirty with patches applied (17 modified files) and results are unchanged. A hostile global git config (core.autocrlf=true plus a filter) also produces identical numbers, because the scratch repo runs with config and system attributes disabled.

Whole-queue and --backlog output are byte-identical to before the change.

Not merged

jkpkgs main is protected; the coordinator merges.

## What Adds `--single <patch>` to `scripts/openchamber-upstream.sh`, plus a `just upstream-single` recipe and a README section. An absorb check run against a tree that already had the queue applied named the wrong patch as absorbed twice. `--single` makes "does this tag already contain this patch, and what does it add" one command with no shared state: it extracts the tag fresh, applies the queue prefix in `source.nix` order, applies the patch, and prints the diffstat that arrived. Exit 2 when it does not apply or adds nothing. ## Why not the existing run `just upstream <tag>` is a verdict sweep. It answers "does the packaged patch still hold" for the whole queue and stops there. It cannot say what one patch adds on top of its prefix, and it reuses no pruned state by design. ## Validation against v2.7.3 (cf18602cc) Every queued patch, run through the new mode: - 21 apply and report a non-empty diffstat - `notification-family-clear` fails: 2 of the 6 files it patches are not in the tag (`notifications/runtime.js`, `server/runtime.js`; the tag ships `.ts`) - `gitea-references-across` fails: 4 of 9 files missing (`gitea/mappers.js`, `provider.js`, `resources.js`, `source-control/provider-routes.js`), the known hand-port Diffstat totals were cross-checked for four of the heaviest patches (`question-rows` 75 files/3469+/196-, `question-cards` 41/1019+/492-, `instance-attention` 69/6092+/44-, `dictation-recovery` 11/492+/67-) against an independent copy-and-compare run; identical. ## Guard checks 1. A `/tmp` tree with the whole queue already applied, and a fake `oc-upstream-XXXXXX` directory containing it, do not change any result. The mode never reads a tree it did not extract this run. 2. The `--upstream` checkout is itself dirty with patches applied (17 modified files) and results are unchanged. A hostile global git config (`core.autocrlf=true` plus a filter) also produces identical numbers, because the scratch repo runs with config and system attributes disabled. Whole-queue and `--backlog` output are byte-identical to before the change. ## Not merged jkpkgs main is protected; the coordinator merges.
feat(openchamber): add a --single mode that checks one patch on a fresh tree
All checks were successful
Android release / android (pull_request) Has been skipped
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
Android release / android-smoke (pull_request) Successful in 8m14s
5312b17a44
An absorb check run against a tree that already had the queue applied named
the wrong patch as absorbed twice, because the change was there before the
check started. The whole-queue run cannot answer for one patch either: it is
a verdict sweep, not a diffstat.

`--single <patch>` extracts the tag fresh, applies the queue prefix in
source.nix order, applies the patch, and prints the diffstat it added. It
exits 2 when the patch does not apply or adds nothing, which is the actual
absorbed signal. Each run builds its own scratch tree, so a leftover one, or
a patched --upstream checkout, cannot supply the answer.

Against v2.7.3: 21 of 23 patches apply and add content,
notification-family-clear and gitea-references-across fail, matching what is
already known.
agent-navi changed title from feat(openchamber): add a --single mode for checking one patch on a fresh tree to WIP: feat(openchamber): add a --single mode for checking one patch on a fresh tree 2026-11-19 23:57:02 -05:00
All checks were successful
Android release / android (pull_request) Has been skipped
buildbot/nix-eval Build done.
Required
Details
buildbot/nix-build Build done.
Required
Details
Android release / android-smoke (pull_request) Successful in 8m14s
This pull request has changes conflicting with the target branch.
  • packages/openchamber/README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'chore/openchamber-upstream-single:chore/openchamber-upstream-single'
git switch 'chore/openchamber-upstream-single'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeremy/jkpkgs!349
No description provided.