Wave C: pull requests (docs/features/03) #9

Merged
crueber merged 2 commits from feat/pulls into main 2026-09-04 03:17:50 +00:00
Owner

Wave C1 of the collaboration layer: new package internal/pulls.

WHAT: PR threads (kind:pr, no PR fields in thread.json), pr.json sidecar, mergeable.json stamped cache + pulls event sink + pull-mergeable task, pull-merge task (merge/squash/rebase, explicit policy evaluation, required-checks pre-scan), pull-fork task (records + task; manifest executor deferred), refs/pull/N/head server-side publish (reachable only, 422 otherwise), built-in protect default on refs/pull/** (push-pipeline refusal, both transports), endpoints/SSE/UI/SDK per 03 sections 8-9. Frozen families (mergeable.json, meta/forks.json, pr.json) amended into docs/go/14 in the same change.

VERIFY: internal/pulls 99.5 percent statements, go test -race clean, full go test -short ./... green, e2e green, node --test 134 pass, live stack verified (open/mergeable/merge/close/delete-head/push-refusal on the wire, headless-Chrome CDP drive of /pulls + /pull/1 with zero console errors).

DEVIATIONS (all recorded in docs): trial merge uses the two-arg merge-tree form (three-arg is exit-129 on modern git); up_to_date follows the spec second clause (head fully merged; the first parenthetical would refuse every normal PR — found live); pr.json gains additive body; POST comments + GET merge/task endpoints additive; fork manifest step is a nil ForkExecutor seam; ResolveRef/MergeBase propagate backend outages as 503.

Tracks Forgejo issue crueber/walhub#5. Do NOT merge — review requested.

Wave C1 of the collaboration layer: new package internal/pulls. WHAT: PR threads (kind:pr, no PR fields in thread.json), pr.json sidecar, mergeable.json stamped cache + pulls event sink + pull-mergeable task, pull-merge task (merge/squash/rebase, explicit policy evaluation, required-checks pre-scan), pull-fork task (records + task; manifest executor deferred), refs/pull/N/head server-side publish (reachable only, 422 otherwise), built-in protect default on refs/pull/** (push-pipeline refusal, both transports), endpoints/SSE/UI/SDK per 03 sections 8-9. Frozen families (mergeable.json, meta/forks.json, pr.json) amended into docs/go/14 in the same change. VERIFY: internal/pulls 99.5 percent statements, go test -race clean, full go test -short ./... green, e2e green, node --test 134 pass, live stack verified (open/mergeable/merge/close/delete-head/push-refusal on the wire, headless-Chrome CDP drive of /pulls + /pull/1 with zero console errors). DEVIATIONS (all recorded in docs): trial merge uses the two-arg merge-tree form (three-arg is exit-129 on modern git); up_to_date follows the spec second clause (head fully merged; the first parenthetical would refuse every normal PR — found live); pr.json gains additive body; POST comments + GET merge/task endpoints additive; fork manifest step is a nil ForkExecutor seam; ResolveRef/MergeBase propagate backend outages as 503. Tracks Forgejo issue crueber/walhub#5. Do NOT merge — review requested.
Implements PR threads (kind:"pr" over the shared numbering/thread/index
family), pr.json sidecars, stamped mergeable.json caches + pulls event
sink + pull-mergeable task, pull-merge (merge/squash/rebase, explicit
protect evaluation, required-checks pre-scan failing closed only when
carried), pull-fork (records + task; manifest executor seam deferred),
pull-update-branch, refs/pull/N/head server publish (reachable only, 422
otherwise), built-in refs/pull/** refusal in the push pipeline, endpoints
(SSE task attach, ETag head-sha), SolidJS UI (list + conversation + merge
box), SDK pulls/forks groups, E4 evidence entry.

Decisions appended to docs/features/03 (Wave C1 notes incl. the ancestry
correction and merge-tree argv), docs/go/14 (frozen overwritable
families), docs/go/06 (UI routes). internal/pulls at 99.5% statements,
go test -race clean; live-verified (open/mergeable/merge/close/delete,
push refusal on the wire, CDP browser drive with zero console errors).
docs/features/03 §5 rebase argv used a pure-SHA range, which stock git's
experimental replay treats as a silent no-op (exit 0, empty stdout), so
strategy:rebase merges always failed at tip validation. Plant a unique
temp branch, run with --ref-action=print (never moves serving refs), parse
the update line, delete the temp branch. Thread committer identity
explicitly (the runner strips ambient env). Doc argv updated in the same
change; gitexec premise corrected with success-shape assertions.
Sign in to join this conversation.
No description provided.