OverviewFilesCommitsIssuesDocsReleasesPeers

pgh commits / a06fa3b

0.1.136: add `pgh repo backfill-visibility [--dry-run]`
Front-end for pear-git-v3's repo-backfill-visibility RPC. Marks every existing repo public on THIS peer — read-gate rollout step R1 (#138). Needed because the equivalent script lives in pear-git-v3's source tree and `pgh.stage.ignore` lists `scripts/`, so it never reaches a peer installed via `pgh app install`. An operator on a mirror had no way to run the one step that must precede enforcement. Idempotent. Usage text states it must be run once per peer BEFORE enabling enforcement, since a repo predating the marker goes unserved otherwise. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a06fa3b488046b8344e92717421f7436d633b1c7
by plankatron <fleeky@gmail.com> · 2026-07-31T18:24:08.000Z

Changed files (2) +16 -1

lib/commands/repo.js +15 -0
……@@ -27,6 +27,10 @@ export const usage = `pgh repo — browse repos served by the daemon
2727 pgh repo writers <name> List writers
2828 pgh repo grant-writer <name> --peer <url> [--role owner|writer]
2929 Admin: grant a peer push authority
30 pgh repo backfill-visibility [--dry-run] Mark EVERY existing repo public on this
31 peer. Run once per peer BEFORE enabling
32 read-gate enforcement, or every repo
33 predating the marker goes unserved.
3034 pgh repo visibility <name> Show whether THIS peer serves the repo
3135 pgh repo visibility <name> public Serve it (writes the export-ok marker)
3236 pgh repo visibility <name> private Stop serving it here. Admin.
……@@ -123,6 +127,17 @@ export async function run (client, args) {
123127 return client.call('repo-visibility', value ? { name, visibility: value } : { name })
124128 }
125129
130 // backfill-visibility — mark every existing repo public on THIS peer.
131 //
132 // Runs daemon-side, not from a script: `pgh.stage.ignore` lists `scripts/`,
133 // so pear-git-v3's backfill script never ships to a peer installed via
134 // `pgh app install` — it would be missing on exactly the machines that must
135 // run it before enforcement. Idempotent; --dry-run reports without writing.
136 if (sub === 'backfill-visibility') {
137 const dryRun = args.includes('--dry-run') || args.includes('-n')
138 return client.call('repo-backfill-visibility', { dryRun })
139 }
140
126141 if (sub === 'retire') {
127142 const name = args[1]
128143 if (!name) throw new Error('usage: pgh repo retire <name>')
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "pgh",
3 "version": "0.1.135",
3 "version": "0.1.136",
44 "description": "pgh — P2P content-addressed package manager and app launcher",
55 "type": "module",
66 "main": "index.js",