~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

just dev runs the console to use, over a world of its own

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:harness/dev

What changes

just dev starts the console to use yourself, over a world of its own (harness/dev.mjs):

  • the reference PDS and PLC, with alice, bob and harbor on them;
  • the host over them;
  • the console at https://group-host.localtest.me;
  • a group of alice's, Riders.

It prints each account's password, where the codes the PDS emails are read (for moving harbor in at /move), and how to run opensocial against it. ctrl-c stops it all, and each start is empty again.

The e2e setup and just dev share harness/world.mjs, which starts the PDS, the host, the console and the group. They differ only in the console's front: the e2e flows keep their TLS proxy at a name only the PDS resolves, and just dev uses portless. The e2e check now also runs when harness/world.mjs changes.

portless 0.15.7 is a harness dev dependency, the version the prototype uses. Its proxy is the one https front on port 443 for both of them.

Why

Signing in to the console needs https at a real hostname. The host is the console's OAuth client, and a PDS fetches a client's metadata only from such a name. Your browser has to trust that name's certificate too.

portless gives both. *.localtest.me resolves to 127.0.0.1 in public DNS, its local CA is in the system's trust store, and the PDS is told to trust it with NODE_EXTRA_CA_CERTS.

The other way would be the host terminating TLS itself with a local CA of its own. That is dev-only code in the server, and running locally needs Node for the reference PDS anyway. knotless has no local https of its own to follow.

How it was checked

  • just dev on my machine, with your portless proxy already up for the prototype. The console answers at https://group-host.localtest.me, and a sign-in reaches the PDS's approval page, so the PDS fetched and trusted the console's metadata.
  • All 21 e2e flows pass on the refactored setup.

Shortcomings

  • Starting the proxy needs sudo. If it isn't up on 443, just dev says how to start it and stops.
  • The console is the built one, as e2e serves it, so a change to it means starting again rather than a live reload.

🤖 Generated with Claude Code

Approved

This moves the PDS, host, console and group startup out of e2e/setup.mjs into harness/world.mjs. e2e now passes its TLS-proxy front into it, and just dev (harness/dev.mjs) passes a portless front. The refactor is faithful to the old setup: the same env, the same order, and the teardown still runs on error. The e2e path filter now includes harness/world.mjs, and the docs for the dev recipe (development.md and reference/cli.md) are updated, as AGENTS.md asks.

I found nothing that must change. These are small things I noticed:

  • dev.mjs installs its SIGINT/SIGTERM handler only after start() returns. A ctrl-c during startup skips portless alias --remove, so a stale alias can stay behind. The next run's --force covers that, so it's harmless.
  • stop in dev.mjs sends SIGTERM to the children and then calls process.exit(0) straight away, without waiting for them. That is fine for a throwaway world.
  • portless 0.15.7 declares engines: node >=24. Make sure .node-version and the runner image meet that, since npm ci in the e2e job now installs it.
  • I could not run just dev or the e2e flows myself. I'm relying on your report that the 21 flows pass.
Merged as 7127e99