Gitea working surface: MCP, branch protection, runbook, and two protocol rules #10
Reference in New Issue
Block a user
Delete Branch "agents/gitea-mcp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The branch that built the gate, going through it.
9 commits, 12 files. Everything Phases 1-6 produced lives only here, and the
agents clone
main-- so until this merges they run without the new PROTOCOLrules,
gitea-protect, or the runbook.What is in it
docker/*-- gitea-mcp v1.7.0, checksum-pinned, per-agent identity, token bypath (
GITEA_ACCESS_TOKEN_FILE) so it never lands in~/.claude.json. The--toolsallowlist withholdspull_request_review_write.tools/gitea-protect-- applies and re-checks themainrule.--verifystates its expectations independently of what the apply path posts.
docs/agents/GITEA-SETUP.md-- the seven-phase runbook.docs/agents/PROTOCOL.md-- findings reach main before the code citing them;a check may only soften against a condition it can test.
tools/port/check-citations --for-merge-- turns the peer-branch class into afailure when the target is
main. 19 citations currently qualify.Verified
mainrefused with
pre-receive hook declined, as the repository owner;403onbranch_protections;gitea-mcp 1.7.0present in each;check-citations --selftestextended to the peer class, with a control thatmakes it report BROKEN.
Known, and not from this branch
The default
check-citationsrun exits 1 on 4export/...citations -- thegenerated tree, gitignored by design.
main's copy fails identically.🔴 I cannot merge this, by design. It needs your review and your merge.
Review of #10 — from the Pi session. A comment, not an approval: see the last section for why that distinction is load-bearing here.
Verdict: land it. Nine of the ten commits are the surface itself, and the tenth fixes the pipeline that was holding them. I wrote five of them, so my review is worth most on the four I did not —
17c0e3f,a008836,87932e4,25bfa15. Two findings, both in25bfa15, neither blocking.🔴 The third selftest class is a time bomb, and it goes off when #8 lands
--selftest's dangling and resolving cases plant their own files. The new peer case does not: it cites a real path,docs/re/f5-a-press-snaps-the-plate.md, and depends onorigin/auto/frame-blend-draw-pathbeing fetched and carrying it.scan()testsos.path.exists(m)first. So the moment #8 merges that corpus tomain, the fixture resolves here,ppis empty,peer_okgoes False, and the selftest reports🔴 BROKEN, rc=2— for the success of the very merge it exists to encourage.It also fails today in any checkout that lacks the branch.
actions/checkout@v4fetches one ref at depth 1, so in CI the peer ref is absent and the citation collapses into nowhere — which is exactly the state the stated control (emptying PEER_REFS) uses to prove the classification works. The control and an ordinary CI checkout are the same condition.The rule this PR adds catches it: can this branch tell the difference between "not yet" and "no longer"? Here it cannot — a merged finding and a missing branch look identical to it. The fix is to make the third fixture hermetic like the other two: stub
PEER_REFS/on_a_reffor the duration of the selftest rather than pointing it at a file whose classification the repository is expected to change.The
--for-mergereport stops earlyWith
--for-mergeand both classes present, it returns before listing the dangling ones — the more severe class, and the one that is nobody's merge-ordering problem. The exit code is right either way; the report is quieter than the scan. The printedtotalthen does not reconcile with the lines under it and nothing says why. Collect both, then return.📌 What I could not check
cargo check --workspaceon aarch64. It has never run here — 23 cancelled runs, 2 waiting, zero successes — so the native job in run 203 is the first honest answer this pipeline has produced. If it fails, that is a portability finding and wants an issue, not a patch toc457320.Why this is a comment and not an approval
#10's author isfabi, andfabiis the only account on the approvals whitelist. Gitea will not let an author approve their own pull request, sorequired_approvals = 1cannot be met on this PR by anyone. The only route to merge is the repo-admin override — which is precisely whytools/gitea-protectsetsblock_admin_merge_override: falseand says so in its docstring. That was written as a trap to avoid; this is the first live exercise of it, and it is working as designed rather than failing.I hold an API token that acts as
fabi. Whether the review endpoint would accept an approval from it is not something I am going to find out, because an agent-minted credential approving on the human's behalf collapses the gate this PR exists to build — and it would collapse it silently, which is worse. The merge is the human's, by hand.Run 203 — read in full.
c457320worked; the remaining three failures all have names.This is the first run in this repository's history to reach a terminal state on every job. 23 runs cancelled, 2 stuck waiting, zero successes before it. All three jobs now report, which is what the CI rewrite was for.
Native — linux ✅✅✅❌
The workspace compiles, links and passes its whole test suite on aarch64. That was the open question behind the
--target x86_64removal, and it is now answered — 214 tests across 30 binaries, not one failure.The previous run's
No space left on devicewas the Pi's root filesystem at 97%. Reclaimed 46 GB of Docker build cache and orphaned CI scratch volumes;/is at 55% with 51 GB free, and run 203 consumed about 1 GB of it. That cause is retired.The Clippy failure is not a lint result:
dtolnay/rust-toolchain@stableinstalls a minimal profile. Thenativejob named no components, so this step has never executed — not on this commit, not on any commit. Thefmtjob always namedcomponents: rustfmtcorrectly; this one never did.Fix is two lines, commit
b6466cb, bundle at/tmp/sylph-clippy-toolchain.bundle(basec457320, verifies clean):I left
-D warningsgating, deliberately. Once clippy runs it will go red, because the build already emits ~13 rustc warnings that-D warningspromotes to errors. Softening it —continue-on-error, or dropping-D warnings— cannot distinguish "debt not yet paid" from "debt paid", which is the shape #12 already ruled out for rustfmt and PROTOCOL.md forbids generally. I wrotecontinue-on-error: truefirst and reverted it on reading #12. The debt is scoped in #13.WASM — Web ❌ — #11, unchanged
Fails at
Check WASM compile, which is beforejetli/trunk-action— so the x86_64-on-arm trunk problem is still queued behind this one, undisturbed.Formatting ❌ — #12, unchanged
The ~13,000-line rustfmt diff. Pre-existing,
mainfails identically, and no commit on this branch touches a.rsfile.What this means for merging #10
This PR cannot go green, and that is not a fact about this PR. #11 and #12 are pre-existing failures on
mainthat no commit here touches. Even withb6466cbapplied, native goes red on #13's lint debt. Three red checks, three tracked issues, none of them caused by the thirteen files in this branch.enable_status_checkisfalse, so nothing mechanical blocks the merge — the human is the check, as stated. My read: merge it. The branch's own work is sound, the CI change in it is what made these three causes legible in the first place, and holding it until CI is green means holding it behind two issues that predate it.One request before you do: fold
b6466cbin first. A merge that leaves the Clippy step still unable to run keeps a fourth failure in the tree that looks like the other three but isn't one.🤖 Generated with Claude Code
https://claude.ai/code/session_01McNbzUeq1KRBWs4G6X2YVj
Correction to my run-203 comment above, and where Clippy now stands.
The test count I gave was wrong. I wrote "214 passed". The correct figure is 207 passed, 0 failed, 14 ignored across 30 suites — I miscounted the per-suite totals. It reads 207 in run 203, 207 in run 204, and 207 locally after the lint work below, so the conclusion the number supported is unchanged: the workspace's whole test suite passes on aarch64. Only the figure was wrong.
Clippy is resolved locally.
cargo clippy --workspace -- -D warningsexits 0 on a fresh uncached run, withcargo test --workspacestill at 207/0/14.The workspace total turned out to be 73 lints, not the 48 run 204 reported —
-D warningsmakes a lint a hard compile error, sosylpheed-formatsfailing meantsylpheed-viewer(14) andsylpheed-cli(11) were never built and had never been linted by anyone. Clearing formats is what made them visible.Two commits on top of this PR's head, offered as a bundle at
/tmp/sylph-clippy-clean.bundle(baseb6466cb, verifies clean):Full detail — the site-by-site collision analysis, the three genuine collisions in
sylpheed-exportfor the branch owners, and the reasoning behind each#[allow]— is on #13. Not pushed: #13 is stillstate/proposed.This does not make #10 green. WASM (#11) and Formatting (#12) are unchanged and still red for pre-existing reasons no commit here touches. My merge recommendation stands as written above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01McNbzUeq1KRBWs4G6X2YVj
`dtolnay/rust-toolchain@stable` installs a minimal profile. The `native` job named no components, so every run that reached the Clippy step died on error: 'cargo-clippy' is not installed for the toolchain 'stable-aarch64-unknown-linux-gnu' before clippy read a line of source. That is not a lint result; the step had never run. The `fmt` job below always named `components: rustfmt` correctly — this one never did. Two lines of behaviour change. The rest is the comment explaining why the step is left gating on `-D warnings` rather than softened: the workspace is not clippy-clean (run 203's build alone emits ~13 rustc warnings that `-D warnings` promotes to errors), and `continue-on-error` cannot tell "debt not yet paid" from "debt paid". That debt is scoped in #13, the way the rustfmt debt is in #12. Run 203 is what made this visible. With the aarch64 fix inc457320the native job got all the way through: cargo check --workspace ok 10m01s cargo build --workspace ok 19m04s cargo test --workspace ok 16m22s 214 passed, 0 failed cargo clippy --workspace toolchain error Refs #13 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McNbzUeq1KRBWs4G6X2YVjb6466cb722toa3d99adaa6