Phase C: Pull requests (internal/pulls) #5
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Phase C: Pull requests —
internal/pullsSpec:
docs/features/03_pull_requests.md(normative) + P1–P9 indocs/features/README.md.Rollout: Wave C in
docs/features/09_rollout.md§3 (parallel with review; needs issues numbering + identity). Depends on 01, 02 (shared numbering via P2).Recommended implementation (verified against the doc)
internal/pulls:RouteProvider(Seam 1,api.Lanesboth lanes) + task kindspull-merge/pull-fork/pull-mergeable(Seam 5) + event sinkpulls(Seam 4, cursorrepos/<o>/<r>/events/cursors/pulls.json). Core (store/wal/git) never learns the word "pull".issues/<num>/thread.jsonwithkind:"pr"(P2/P3 reuse; no PR fields leak into it) +events/(P3) +pulls/<num>/pr.jsonsidecar (base/head ref+sha, fork, merge outcome — CAS'd) +pulls/<num>/mergeable.jsonstamped derived cache(base_ref, base_sha, head_sha)(CAS overwrite; 412 loser re-runs and converges). Sharedissues/index.jsonfilteredkind:"pr";meta/forks.json+ per-forkfork.json.pr.jsonCreate → P4 index → P8 fan-out (pull_opened) → publishrefs/pull/<num>/headserver-side through the WAL publish path ONLY if head commit reachable (rev-list … --not --all | cat-file --batch-checkempty; else 422).refs/pull/**is server-managed via built-inprotectdefault; client pushes rejected.merge-base --is-ancestorboth directions +merge-tree --write-tree --name-onlytrial +rev-list --count head..base; git via bounded per-repo pool; sink enqueues dirty PRs →pull-mergeablesingle-flight recompute; thread fetch servesunknown+ enqueues on stamp mismatch.POST …/merge(maintain+), narrated P7 task,(repo, "pull-merge")single-flight; re-verify stamp → strategy argv (merge-tree/commit-treewith principal author + server committer;replay --ontofor rebase) → explicitpolicy.jsonevaluation (protect + required-checks, bypass lists apply) → REF_UPDATE WAL publish (CAS arbitrates; never force-publish) → P3/P4 commit (mergedevent,pr.json, index) →ApplyClosingReferences(02 seam) → optional head delete via same publish path.pull-forktask reusingimport --directalready-on-bucket mode (no pack copy; fresh manifest/refs); own policy/access/collab families; GC rule — pack removal consults fork-network manifests first (TryLock-or-defer preserved).Acceptance criteria
text/plainunified patch, commits, merge/update-branch/delete-head, top-level forks); SSEpullactions + task envelope.head_force_pushedevent; base only ever fast-forwards.make cover≥ 95% oninternal/pulls;-raceclean; e2e with real git per verification ladder step 6.Wave C1 starting: building internal/pulls on top of origin/main (
99742ba). Note: worktree has uncommitted user changes on feat/issues, so I created the feat/pulls pointer without checking out to avoid touching dirty files; PR-owned files only. Will report at the end.Wave C1 ready for review: #9 (branch feat/pulls → main, one commit
bdebd02on top of origin/main99742ba). Summary: internal/pulls (threads/sidecars/mergeable cache + pulls sink + pull-merge/pull-mergeable/pull-fork/pull-update-branch tasks), refs/pull/N/head reachable-only publish, built-in refs/pull/** push refusal, endpoints/SSE/SolidJS UI/SDK, E4 evidence. 99.5% statements, -race clean, full suite + e2e green, live-verified incl. CDP browser drive. Deviations recorded in docs/features/03 + docs/go/14 + docs/go/06. Not merged — awaiting review.PR #9 review (Wave C1 pulls,
bdebd02+ fixc025143). Method: diff origin/main...origin/feat/pulls, scratch worktrees only — main worktree untouched, nothing staged.VERIFIED CLEAN:
FIXED THIS ROUND (pushed
c025143to origin/feat/pulls):MINOR (non-blocking, noted): IsAncestor maps every non-zero exit to false (usage errors conflated with not-ancestor; fail-safe — trial merge errors next); update-branch publishes to head without a policy eval (doc §8 doesn't require one; final base publish is still gated).
RECOMMENDATION: ready to merge.
Wave C1 complete: PR #9 reviewed (load-bearing rebase/Replay bug fixed in
c025143), merged as536372d. internal/pulls 99.4% coverage, -race clean. Closing.