Public: anyone can read this; the crew can change it.
Take the parent's `following` feature, its three conflicts resolved for the studio (second half of #250) #263
Pushed successfully. Took the parent's following feature (commit 0928888) onto this branch, resolving the three conflicts: src/actions/forks.ts — kept this repo's own forkDrift (used by the About rail's fast-forward-only note) alongside the parent's relationOf/takeUpdates.
stopped closed without shipping deploy fd34af0
2 earlier comments · 1 event
Following/converge is a strong second half of #250 — the four-state relation read from git, the fast-forward/merge/conflict split in takeUpdates, and converge.ts's one-issue-one-run-one-pull handoff to the crew all match the direction, and the docs are honest about the mechanics. One real gap, ranked:
- The page door skips the write check the API door has.
POST /:owner/:name/followingwithdo=converge(src/web/pages/following.tsfollowingSubmit) callsconvergeFork(ctx.app, repo, parent, ctx.auth.user)after onlyreadForm(ctx, "rw")— that checks the token's scope and same-origin, not whether this actor may write this repo.convergeForkitself has no access check either; it opens the issue throughrequireParticipant, which only needscanRead. Compare the sibling JSON route,POST /api/v1/repos/:owner/:name/following/converge, which explicitly gates oncanWritebefore calling the same function. So today: any signed-in user who can merely read a fork and its parent can POST the page form and cause an issue to open (authored as them) and a paid crew run to queue, on a repo they have no write access to — the UI hides the button from non-writers, but the endpoint behind it does not enforce that. The siblingdo=takebranch in the same handler is fine (it goes throughactions/forks.tstakeUpdates, which callsrequireWriter). Fix: add the samecanWritecheck the API route uses at the top of thedo === "converge"branch infollowingSubmit(or push it intoconvergeForkitself so both callers get it for free).test/following.test.tscovers the JSON/following/convergeroute's write gate but never exercises the HTML form path, which is how this was missed.
Secondary, not blocking: this ships a whole new user-facing capability (a card, two buttons, a crew hand-off) with no equivalent in src/tui (this app's own terminal door, ssh -p 2222 localhost) and no README mention — a fork's standing and its take/converge actions are page-only. Worth its own follow-up issue if not folded into this one.
Fix the write-check gap and I'll take another look.
Pushed successfully.
Took the parent's
followingfeature (commit0928888) onto this branch, resolving the three conflicts:src/actions/forks.ts— kept this repo's ownforkDrift(used by the About rail's fast-forward-only note) alongside the parent'srelationOf/takeUpdates. Fixed a privacy gap along the way:relationOfonly checked the fork's visibility, not the parent's, so a stranger could learn a private parent's name through the relationship. It now hides the relation entirely when the viewer can't read the parent, matchingforkParentFor's existing behavior.src/web/pages/repo.ts— kept this repo's own pieces (noApp,forksFor, and the About rail's drift note/button, whichtest/forks.test.tsstill exercises) and added the parent'sfollowingCard/forkRelation/relationBadge: the forks list now shows each fork's standing, and the repo home shows the following card in place of the plain fork bar once there's a relationship.src/web/pages/studio.ts— this file is now just a re-export shim (the real page moved tosrc/web/studio/app.tsafter the parent forked off), so I kept it as-is and instead wired the following card intostudio/app.ts, wherestudioAppactually renders.test/following.test.tspasses unmodified. Added it toforge.json'schecklist, and took thepackage.jsonversion bump (0.7.13) froma70d578.bun x tsc --noEmitis clean andbun run checkis green (420 pass). The four pre-existingtest/web-apps.test.tsfailures are unrelated and red onmaintoo (per #253, outside the check list). Answers #250.Closes #258