docs(skills): record PR triage landing rules from the 2026-11-21 round

finish.sh tells a branch GitHub refuses to write to (exit 4, an organization fork) apart from an author push. The triage skill adds the end-of-round cleanup, keeping the what-changed file current, the lease after our own push to an author's branch, and the maintainer's standing decisions on attachments, Share and Changes.
This commit is contained in:
Bohdan Triapitsyn committed 2026-11-21 21:15:16 +02:00
1 parent da49b69193
commit d8d3c5d93e
2 files changed
+12 -3

No files matched your search

+6 -2
View File
@@ -76,7 +76,7 @@ A PR whose verdict needs more than a review — deep investigation of a core pat
### Landing a PR ourselves
The default for a PR we want is fix-then-merge in the author's branch, with the author keeping the credit. `scripts/prep.sh <N>` puts the whole PR on current `main` as one staged change in a throwaway worktree (conflicts resolved once, not per commit); after fixing and validating there, `scripts/finish.sh <N> "<subject>" "<comment>" ["Closes #M"]` commits as the author (or amends the commit a fix agent made), rebases it onto a fresh `origin/main`, pushes to their branch, posts the comment and squash-merges. Run finish.sh one PR at a time, right before each merge, so every push sits on the `main` the previous merge left. A rebase conflict makes it exit 2 with nothing pushed; the PR goes back to a fix agent and is validated again before the next try. The push holds a lease on the author's head as prep.sh fetched it, so an author push since then makes it exit 3 instead of overwriting their work; read their new commits and prepare the PR again. prep.sh in turn refuses to reset a worktree holding uncommitted changes or an unpushed landing commit unless `TRIAGE_DISCARD=1` says to drop them. The `pr-triage-finish` result lists only READY PRs as ready for finish.sh; REVIEW_FAILED means the commit never had its second look.
The default for a PR we want is fix-then-merge in the author's branch, with the author keeping the credit. `scripts/prep.sh <N>` puts the whole PR on current `main` as one staged change in a throwaway worktree (conflicts resolved once, not per commit); after fixing and validating there, `scripts/finish.sh <N> "<subject>" "<comment>" ["Closes #M"]` commits as the author (or amends the commit a fix agent made), rebases it onto a fresh `origin/main`, pushes to their branch, posts the comment and squash-merges. Run finish.sh one PR at a time, right before each merge, so every push sits on the `main` the previous merge left. A rebase conflict makes it exit 2 with nothing pushed; the PR goes back to a fix agent and is validated again before the next try. The push holds a lease on the author's head as prep.sh fetched it, so an author push since then makes it exit 3 instead of overwriting their work; read their new commits and prepare the PR again. A push of our own to their branch after prep.sh (a port handed back to the author) moves the head the same way: write that pushed sha to `st-<N>/pushed.txt` when you push it, so finish.sh leases on it. Remove a worktree only after finish.sh exits 0; the landing commit of a refused push lives only there and on its `pr<N>` branch. A branch GitHub won't let us write to (an organization fork ignores `maintainerCanModify`) makes it exit 4: push the validated commit to `main` with the author kept, then close the PR with a comment naming that commit. prep.sh in turn refuses to reset a worktree holding uncommitted changes or an unpushed landing commit unless `TRIAGE_DISCARD=1` says to drop them. The `pr-triage-finish` result lists only READY PRs as ready for finish.sh; REVIEW_FAILED means the commit never had its second look.
**Fix agents.** When several PRs are fixed at once (the `pr-triage-finish` workflow, or agents you dispatch), each agent:
@@ -120,7 +120,8 @@ After a batch of merges:
1. Run `bun run type-check` and `bun run test` on current `main`, in a worktree of its own. `main` has no CI of its own, and PRs that pass one by one break `main` together: two PRs changing the same contract from both sides each pass alone. A failure is traced to its PR and fixed on `main` before the next batch.
2. Write a symptom map of what landed (area, PR, merge sha, which part we wrote) to `docs/personal/pr-triage/pr-triage-<date>-merged.md`, so a later regression can be traced to its PR quickly.
3. Write the testing list for the maintainer to `docs/personal/pr-triage/pr-triage-<date>-what-changed.md`, in Ukrainian: grouped by area of the app, each entry a linked PR (or commit) and two or three sentences on what the user sees change, marking single-platform changes and the parts we rewrote.
3. Write the testing list for the maintainer to `docs/personal/pr-triage/pr-triage-<date>-what-changed.md`, in Ukrainian: grouped by area of the app, each entry a linked PR (or commit) and two or three sentences on what the user sees change, marking single-platform changes and the parts we rewrote. The file states what is true now: when something it lists as not on `main` or waiting lands, update that part in the same step as the push, since the maintainer tests from this file.
4. Clean up after yourself, without asking: `git worktree remove --force` every `/tmp/triage/wt-<N>` whose PR is no longer open, with its `st-<N>` and its local `pr<N>` / `pr<N>-head` branches, then `git worktree prune`, and delete the round's scratch files in `/tmp/triage`. A round leaves about 10 GB and 80 worktrees behind, and every leftover worktree shows up in `git worktree list` for the sessions that share the checkout. Worktrees of PRs still in progress stay.
## Standing decisions
@@ -129,6 +130,9 @@ Maintainer decisions that settle a PR without asking again. A PR that contradict
- **`Cyneric`'s PRs get no benefit of the doubt.** They come in volume from an automated pipeline over our issues. A part that is speculative, out of scope or extra is cut without deliberating; a PR that is done badly and easier to redo than to fix is declined; a fix for an edge setup (a fork, an unusual install) that adds risk or code for everyone else is declined. What remains is a plain fix that lands like any other.
- **Other agent runtimes** (ACP, Pi, DeepSeek Harness) are declined: OpenChamber runs on OpenCode, and a second backend doubles every session contract. Never word it as "we are a UI for OpenCode" ([#2010](https://github.com/openchamber/openchamber/issues/2010), [#3654](https://github.com/openchamber/openchamber/issues/3654), [#5700](https://github.com/openchamber/openchamber/pull/5700)).
- **Any file type can be attached; nothing is uploaded before Send.** A file the model can't read (a PDF for a model without PDF input, a ZIP, any other type) follows one rule: at Send it is saved where OpenCode runs and reaches the agent as a path. No per-type setting, no upload at pick time ([#7309](https://github.com/openchamber/openchamber/pull/7309)).
- **A Share from another app opens its new draft in the last-used project**, so the draft shows in the sidebar under that project and can be reopened; Chat only when there is no project ([#7323](https://github.com/openchamber/openchamber/pull/7323)).
- **"Last turn" in Changes always means the latest turn.** Opening an older turn's diff from a file chip marks that selection separately; it never relabels or recounts "Last turn" ([#7305](https://github.com/openchamber/openchamber/pull/7305)).
- **Russian localization** is declined because of Russia's war against Ukraine; close with **russian-locale** below.
- **A composer action that rewrites the user's prompt** with a model is declined: mid-session the agent already sees more than an optimizer would. Say that, without pointing at extensions. The opt-in system-prompt optimizer in Behavior settings is a separate feature ([#3602](https://github.com/openchamber/openchamber/pull/3602)).
- **Theme files carry only colours, fonts and transitions** (`lib/theme/definition.ts`); per-component geometry stays in the components, so layout changes never break imported themes ([#5305](https://github.com/openchamber/openchamber/pull/5305)).
+6 -1
View File
@@ -63,7 +63,12 @@ expected=$author_head
if [ -s "$STATE/pushed.txt" ]; then
expected=$(cat "$STATE/pushed.txt")
fi
if ! git push -q --force-with-lease="refs/heads/$branch:$expected" "https://github.com/$owner/openchamber.git" "HEAD:refs/heads/$branch"; then
if ! push_err=$(git push -q --force-with-lease="refs/heads/$branch:$expected" "https://github.com/$owner/openchamber.git" "HEAD:refs/heads/$branch" 2>&1); then
printf '%s\n' "$push_err" >&2
if printf '%s' "$push_err" | grep -qiE 'permission .* denied|error: 403'; then
echo "PUSH DENIED: GitHub refuses writes to $owner:$branch (an organization fork ignores maintainerCanModify); nothing was pushed. Land the commit on main as the author and close the PR with a comment." >&2
exit 4
fi
echo "PUSH REFUSED: $owner:$branch moved since prep.sh (the author pushed?); nothing was overwritten. Read their new commits, then prepare the PR again (TRIAGE_DISCARD=1 prep.sh $n drops this landing commit)." >&2
exit 3
fi