Public: anyone can read this; the crew can change it.

Cross-forge following: a child reads its parent's releases over HTTPS and takes updates #1445

Closed opened this
Closed without merging

A child forge can now follow its parent across forges over HTTPS, take updates, and show the parent's standing. I didn't run the whole suite or the type check here: tsc can't find the bun types in this sandbox. The forge's check will run both.

Notes

stopped closed without shipping deploy 9705b49

opened this

A child forge can now follow its parent across forges over HTTPS, take updates, and show the parent's standing. I didn't run the whole suite or the type check here: tsc can't find the bun types in this sandbox. The forge's check will run both.

What changed

  • Upstream and standing: the child holds an upstream (migration 74): the parent URL plus a read-only token the parent minted. It shows the same four states (synced, behind, ahead, diverged) against the parent's releases.
    • New files are src/core/upstream.ts, src/actions/upstream_follow.ts and routes in src/http/api.ts.
    • src/core/following.ts and docs/FOLLOWING.md are extended.
  • Token: read-only, scoped to the shared apps, revocable by the parent, and stored by the child as a secret.
  • Take updates: reuses takeUpdates and fetches over HTTPS git. A conflict is reported as a decision, as in a local fork.
  • Unreachable parent: the child says so and is left untouched. Standing is cached and refreshed in the background, so no page blocks on it.
  • Tests: test/upstream.test.ts runs two forge instances in one process.

Why the last check failed The failing "gate's list" check was not caused by this change. main itself shipped test/plan-route.test.ts in neither the gate's GATE list nor its EXCLUDED list. I merged current main into this branch (it merged cleanly) and listed test/plan-route.test.ts in EXCLUDED under issue 261, like the other unadmitted files. I didn't put it in GATE because it failed when I ran it here: it spawns the stand-in agent and timed out in this sandbox. It should join the gate once a check run shows it green.

What I checked test/check-list.test.ts passes (8 tests). After the merge I also ran test/upstream.test.ts, test/migrate.test.ts, test/following.test.ts and test/forks.test.ts. They passed apart from the gate-list failure, which the exclusion fixed.

Left out Nothing from #1052's acceptance list.

🤖 Generated with Claude Code

Closes #1052

2 earlier comments
commented

The check failed because my branch conflicted with main in src/core/schema.ts. I've merged main in and pushed the fix.

Both branches added a migration numbered 74. main's adds the attached_by and note columns to look, from #1066. I kept that as 74 and renumbered the cross-forge following migration (#1052) to 75. Everything else in the pull is as before.

The type check was clean. The five suites covering this change (following, upstream, tokens, and both schema suites) pass, 56 tests. I did not run the full bun test, which the forge's check does on the push.

commented

I merged main into this branch to clear the conflict in src/core/schema.ts, and pushed. The six schema, migration, upstream and limb test files pass (56 tests). I did not wait for the full bun test or the type check, which were still running when I stopped. The forge's check will run them on this push.

main took migration 75 for the limb-place table (#1064), which collided with this pull's migration. The limb-place table keeps 75. The cross-forge following migration (token.restricted, token_repo, upstream) is now 76, so a forge that already applied main's 75 still picks it up in order.

src/core/releases.json still says 75 migrations for 0.7.75. That is a past release, so I left it alone.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs