steid

@jamesgill /

steid/plans/current.md
Markdown27.6 KBRendered·Source·Blame·History·Raw
1# Current
2
3> Keep this file short: the active work, what it leaves open, and the known gaps.
4> Completed work moves to [progress.md]progress.md. If this file starts reading like a
5> changelog, it has drifted — that's exactly what went wrong last time.
6
7## Active: launch readiness
8
9Since 2026-10-01 the order of work is the workspace launch plan,
10[`../../plans/launch.md`]../../plans/launch.md. These are Steid's items in it; the number
11is the plan's, and the plan holds the detail and the order.
12
13- [ ] [1.1](../../plans/launch.md#phase-1-before-anything-else) Source off the laptop,
14 Steid's half: the only remote is the author's own box, unpushed since 2026-09-10.
15- [ ] [1.2](../../plans/launch.md#phase-1-before-anything-else) A rollback must boot.
16 **All but the proof:** the fix is in 0.8.1, published 2026-10-04. Only the real
17 upgrade-and-rollback proof is left, carried to the next release that adds a migration.
18 - [x] `migrate()` ignores applied migrations it does not know and still refuses an
19 edited one; tested in process (`database_compat_tests.rs`).
20 - [x] Every released migration set from 0.5.0 to 0.8.0 is pinned by digest. 0.5.0's
21 published bytes are proved too: the served checksums match `dist/` (2026-10-04)
22 ([releases.md]releases.md#which-bytes-each-release-shipped).
23 - [x] **0.8.1 cut** (2026-10-02): `Cargo.toml`, `install.sh`'s default, README and
24 the `releases.md` row.
25 - [x] **0.8.1 published** (2026-10-04) by the author: both architectures on
26 `releases.steid.dev`, byte-identical to `dist/`, and the root `install.sh` defaults to
27 it. Tagged `v0.8.1` with every earlier release (local until the author pushes).
28 - [ ] **The upgrade-and-rollback proof**, with the console: provision a tenant while
29 0.8.1 is the newest release, publish the next one, upgrade, force a failure, and
30 watch the box come back. Until a release after 0.8.1 exists there is nothing to roll
31 back *from*, and **that release must add a migration** for the proof to exercise the
32 fix: across no migration, 0.8.0 would have rolled back just as well. 0.8.2 adds none,
33 so the proof waits past it.
34- [ ] [2.13](../../plans/launch.md#steid) Commands run by hand read the installed config.
35- [x] [2.14](../../plans/launch.md#steid) A half-failed seed is refused on the next boot.
36 **Cut into 0.8.2** (2026-10-21, not published): `check_seed` validates the
37 whole seed before the first write, so every boot refuses it the same way. A storage
38 failure *between* the writes can still half-seed: that is 2.20's missing transaction.
39- [x] [2.15](../../plans/launch.md#steid) A backup cannot hold refs to missing objects.
40 **Cut into 0.8.2** (2026-10-21, not published), with the author's two follow-ups of
41 2026-10-21: a push's `.keep` is never archived, and each file is copied exactly as large
42 as it was when opened. The record is in
43 [progress.md]progress.md#a-backup-of-a-live-instance-is-consistent--launch-215, and
44 what it leaves open, the deleted-branch gap accepted for now, is under *Backups of a
45 live instance* below.
46- [ ] [2.16](../../plans/launch.md#steid) A merge that fails partway finishes or says so.
47- [ ] [2.17](../../plans/launch.md#steid) Reset links come from `STEID_PUBLIC_URL`, not `Host`.
48- [x] [2.18](../../plans/launch.md#steid) Login CSRF and DNS rebinding (see Security below).
49 Both halves are **cut into 0.8.2** (2026-10-21, not published).
50 - [x] **DNS rebinding** ([decision 12]../../plans/launch.md#phase-2-correctness-and-safety):
51 webhooks dial the address their resolver checked, with the proxy off;
52 imports are pinned with `http.curloptResolve`, and refused on git older than 2.37
53 ([progress.md]progress.md#dns-rebinding-closed--launch-218-for-082).
54 - [x] **Login CSRF** ([decision 11]../../plans/launch.md#phase-2-correctness-and-safety):
55 `csrf_verified_signed_out` refuses a `POST /auth/login` carrying neither `Origin` nor
56 `Sec-Fetch-Site` (0008's note).
57- [ ] [2.19](../../plans/launch.md#steid) A new security review once 2.13–2.18 land
58 ([the 2026-09-10 review]security-2026-09-10.md is the standard).
59- [ ] [2.20](../../plans/launch.md#steid) The smaller batch (WAL, transactions, the
60 stranded rename, reserved handles, merge edges, `run_allowing`'s cap, installer flags).
61 Of the installer flags, `--owner-org-name`'s line injection and `--operator-token`'s
62 bare write are closed in 0.8.2 by decision 4's quoting (below); `--no-caddy`
63 without `--domain` still writes `STEID_PUBLIC_URL=https://`.
64- [x] [Decision 4](../../plans/launch.md#phase-2-correctness-and-safety): `install.sh`
65 writes owner values safely. **Cut into 0.8.2** (2026-10-21, not published):
66 every value it writes into `steid.env` is double-quoted with `"`, `\`, `$` and backticks
67 escaped, which systemd and sh read alike; what no quoting can make them agree on is
68 refused at install time. Proved on Debian 13 (systemd 257) and 12 (systemd 252); the
69 full cure is launch 5.8, the installer in the binary.
70- [ ] [2.21](../../plans/launch.md#both) Measure clone, push and browse on the smallest tier.
71- [ ] [3.2](../../plans/launch.md#phase-3-the-customer-journey) The forgot-password copy
72 for managed instances, which cannot run `steid reset-password`.
73- [ ] [4.1 / 4.2](../../plans/launch.md#phase-4-decisions-only-the-author-can-take) The
74 milestone 7 members slice, closing the single-owner shortcuts inside it.
75- [ ] [5.2](../../plans/launch.md#phase-5-release-engineering) Immutable releases: a
76 version is never re-cut.
77- [ ] [5.3](../../plans/launch.md#phase-5-release-engineering) Provenance and tags: build
78 from a clean, tagged commit, and record it.
79- [ ] [5.4](../../plans/launch.md#phase-5-release-engineering) A pinned, checksummed,
80 signed installer and signed artefacts.
81- [ ] [5.5](../../plans/launch.md#phase-5-release-engineering) CI (after 1.1).
82- [ ] [5.6](../../plans/launch.md#phase-5-release-engineering) Contract tests against a
83 real Steid binary. Steid's share includes the check launch 1.2 asks for: boot the
84 **previous release's** binary against the current schema. Release binaries are Linux
85 and the laptop is macOS, so it cannot be a `cargo test`; the in-process stand-in is
86 `a_database_one_migration_ahead_still_boots`.
87
88**Held, the author's: publishing 0.8.2** (cut 2026-10-21): `./release.sh --all`, then
89`./deploy.sh --publish-s3-only`. Since the cut the repository's `install.sh` pin says
90**0.8.2**, and the publish uploads it with the artefacts. Do not re-publish `install.sh`
91on its own before then: it would send fresh installs to a 0.8.2 that does not exist.
92
93### Open from 0.8.0
94
950.8.0 (organisations and home) is in [progress.md]progress.md#organisations-and-home--080.
96
97- **No way to unset home**, only to move it. An instance with none falls back to its
98 sole owner, a state a fresh instance is in rather than one anybody chooses, so the
99 button says "make this the home page" and there is no "stop being it".
100- **Nothing lists the organisations you belong to.** `/orgs/new` is reachable only by
101 typing it. Launch 4.2's minimum slice has the list; until then a second organisation is
102 easy to create and hard to find.
103- **`/api` says nothing about home.** `InstanceReport` had no natural place for it.
104- **`/auth/setup` and `/auth/login` are unstyled** (the new wizard screens are styled).
105 The look is [launch phase 7]../../plans/launch.md#phase-7-the-aesthetic, last.
106
107## Known gaps
108
109Still open, condensed; the reasoning behind each is in [progress.md]progress.md under
110the work that opened it. Open shape work from the reviews is under *Code shape*.
111
112### Security
113
114- **Login CSRF is closed** (launch 2.18; cut into 0.8.2, not published). The
115 origin layer refuses `same-site`, `cross-site` and a foreign `Origin`, and
116 `csrf_verified_signed_out` refuses a sign-in carrying neither header — no pre-session
117 cookie ([0008]decisions/0008-csrf-double-submit-bound-to-the-session.md's note). What
118 stays: `/auth/setup`, `/auth/forgot` and `/auth/reset/{token}` are exempt, with reasons
119 in `csrf::EXEMPT`; and a client sending neither header can no longer sign in, so a
120 `curl` sign-in must add `Sec-Fetch-Site: same-origin`.
121- **`STEID_ALLOW_PRIVATE_WEBHOOKS` is a real hole when on**: off by default, warned at
122 boot, documented in [runbook.md]runbook.md.
123- **The operator token** has no rotation, expiry or hash at rest (`steid.env`, mode 640,
124 compared in constant time). Since `seed-and-login`, `install.sh --operator-token`
125 writes it quoted like every other value, verified on a real systemd box in a container.
126- **`POST /api/setup` shares `/auth/login`'s limiter**, so a flood of headless claims can
127 lock the owner out of the form for a minute.
128- **`STEID_TRUSTED_PROXY` assumes one proxy hop**, and nothing checks it matches reality;
129 it now guards the git limiter as well as the login one, both keyed on
130 `X-Forwarded-For`.
131- **The seeded owner's only way in is `steid reset-password` on the box** — a bearer
132 secret in whatever channel carries it — until milestone 7's identity. Nothing in the
133 data says an account was seeded (deliberate: no sentinel).
134- **CSRF edges:** a restart 403s every open form (per-boot secret, by 0008; a persisted
135 secret is the fix if it grates); `csrf_scan.rs` matches text, so a comment naming
136 `csrf_verified` fools it and a route spelled across two lines escapes it, and its 307
137 rule fails any POST handler containing `redirect(`, doc comments included.
138- **A forgot hit costs an SMTP round trip a miss does not**; a send queue closes it.
139- **`Password::MAX_BYTES` (512)** has never been timed against Argon2 on the deployed
140 machine.
141- **Tokens:** nothing sweeps expired ones or warns before expiry; `GIT_PER_CLIENT = 60` is
142 reasoned, not measured.
143- **An import of a renamed repository fails** rather than following the redirect — the
144 price of `http.followRedirects=false`. If it bites, resolve the redirect ourselves and
145 re-check the target.
146
147### Git and data
148
149- **Rename:** a rename that dies midway strands the row (launch 2.20) — the boot sweep
150 quarantines the moved directory, but nothing reconciles any row whose directory is
151 missing. Two renames onto one name race, and the loser gets "name taken" for the wrong
152 reason; create's duplicate-name check races too and surfaces as an opaque storage
153 error. A rename touches nothing stored outside the row (a webhook target, an issue
154 reference).
155- **Every use case that rebuilds through `Repository::new()` must carry what `new()`
156 resets** — `pinned`, `archived`, the import trio. A builder taking the whole existing
157 row would close the trap for good.
158- **Imports:** no size cap (a 10 GB source fills the disk); the two-clone limit is not a
159 size cap; an import starts public; "Queued" is process-local; a row stuck at
160 `importing` because the recording failed cannot be retried until a restart. On a git
161 older than 2.37 the form still offers an import, which is refused on the repository
162 page once the row exists, and `/api/instance` does not say whether imports work. `import_repo` and `run_import` still read the clock — the next `Clock`
163 caller.
164- **Webhooks:** retries do not survive a restart; a slow endpoint holds a task ~2.5
165 minutes per push, bounded by hooks per repository, which nothing caps; `push_events`
166 only grows; redelivery reads a hook's whole delivery history — unbounded on a
167 long-lived hook, closed by a `find` by delivery id plus a per-event attempt count.
168- **Pull requests:** objects a first merge preview writes are unreferenced and never
169 gc'd (once per pair of commits now). A merged request's Commits and Files tabs go
170 blank once its source branch is deleted — storing heads was refused while open; revisit
171 as one question.
172- **The last-commit column** names the commit inside a merged branch, not the merge —
173 `-m --first-parent` would change it everywhere, a decision. It re-walks up to 500
174 commits per tree page, uncached (caching per tree id and directory would be exact), and
175 appears only on tree listings — a pull request's file list would be the next place.
176- **Diffs:** a merge commit is diffed against its first parent only, and merge rendering
177 has never been seen; `Diff::files` empties wholesale when the patch is truncated.
178 `MAX_RAW_BYTES` (10 MiB, chosen) is also the diff cap — retune both together; raising
179 it lets concurrent requests each hold that much.
180- **Search:** `git grep` output is collected whole before the cap; every page re-runs the
181 grep; the query is trimmed, lines cut at 500 characters, `GrepHit::column` ignored; an
182 importing repository answers 200 with no matches (the refs pages answer 200 there too,
183 and what they render was not read closely).
184- **The cat-file pool** holds memory nothing measures (two processes per live repository,
185 up to 64), is unmeasured under concurrency (requests serialise per repository per
186 stream), and a desync is a 500 with no retry. `--batch-command` waits for Ubuntu 22.04
187 to leave support.
188- **History:** the followed-count cap of 500 has never been reached on a real repository;
189 a path's history runs two walks per page; a submodule's commit is never resolved,
190 nested `.gitmodules` are not read, and the 100-link cap is chosen.
191- **Costs noted, not fixed:** blame is the most expensive read; `count_commits` is two
192 processes (`rev-list` is fatal on an empty repository or unknown branch, and
193 `--ignore-missing` covers a bad object id, not a bad name); a push touches `updated_at`
194 twice; the settings page costs a `branches()`; the compare form's `<datalist>` and the
195 search switcher each cost a ref listing per visit; `language_of` re-runs `syntax_for`;
196 no ahead/behind counts on branches (by decision: a `rev-list` per branch, until git is
197 kept alive); a subprocess per git request and streaming are unmeasured (launch 2.21).
198- **Sweeps missing:** `sweep_expired` is never called and nothing sweeps
199 `password_resets` (one periodic sweep wants both; expiry is enforced on read); nothing
200 sweeps `<data_dir>/.backup`, where a killed backup leaves a full database copy.
201- **The forward migration check runs in process only.**
202 `a_database_one_migration_ahead_still_boots` boots *this* binary against a database
203 one migration ahead, which is the failure launch 1.2 found. Nothing yet runs the
204 **previous release's** binary against the current schema, which is the test that would
205 have caught it. It cannot be a `cargo test` (release binaries are Linux), so it is
206 launch 5.6's.
207- **The replay test stands at 0.5.0's schema**, not the last released one (0.8.0's): its
208 set was not moved on when 0.8.0 was cut, and it reads neither `password_resets` (0.5.0)
209 nor `instance_settings` (0.8.0). Moving it on is the replay set plus two reads.
210- **Smaller:** a client that vanishes mid-request leaves the body-copy task waiting until
211 git exits; bare repositories made on macOS carry `ignorecase = true`; `\r\n` files keep
212 the `\r` inside highlighted markup; a repository with tags and no branches says "No
213 branches"; `latest_tag` breaks a same-second tie by refname.
214
215### Web and UI
216
217The look is redone last ([launch phase 7]../../plans/launch.md#phase-7-the-aesthetic);
218these are gaps in behaviour.
219
220- **The profile has no links** — `Organization` carries a name and a bio only; a `links`
221 field plus a settings control is the fix.
222- **Steid has no per-page `<title>`**, and a page cannot contribute to `<head>` (the shape
223 of the fix is in progress.md's feeds entry).
224- **No page renders `TooLarge`**: the five that guard on `context::timed_out` would 500
225 with a "took too long" copy that would be a lie; extend the shared helper. The commit
226 page's timeout state has never been rendered.
227- **The `/log` switcher opens with nothing marked current** when the URL names no
228 revision, because `repo_log` does not report what it resolved.
229- **Issues:** a rejected issue burns a number; no assignees, milestones, search or edit
230 history; `closed_at` clears on reopen; the body cap of 65,536 characters is chosen; a
231 label-filtered list is read whole. Owner-only writes are the single-user assumption
232 (milestone 7: a change to `writable_repo`).
233- **Pull requests:** no assignees, reviews, milestones, `/api` or feed; merging stays
234 owner-only at milestone 7; the Conversation tab asks git 2–4 questions per view; the
235 Commits and Files tabs re-run the comparison; squash lists at most 50 subjects; the
236 strategy control is a native `<select>`; `Unrelated` and the stale-ref refusal are
237 tested, not walked.
238- **Labels:** the delete confirm is a client-side `required` checkbox (a direct POST
239 bypasses it — a confirm, not an authorization); the list is unpaged; no bulk,
240 multi-label or "unlabelled" filter; a rename breaks bookmarked `?label=`; no `/api`.
241- **Cross-links** are not styled by state, and cross-repository references and full URLs
242 stay plain text.
243- **Feeds:** a missing `?rev=` answers 200 and empty; issue content carries Tailwind
244 classes; the issue feed orders by `created_at` while `<updated>` is `updated_at`;
245 same-second events tie-break by id; an importing repository feeds an empty commit list;
246 no `ETag`, `Last-Modified` or rate limit; the Feed link on a filtered issue list offers
247 the whole feed.
248- **Highlighting:** diffs do not go through the cache; a hunk inside a multi-line string
249 colours wrong (asserted); nothing measures the cache, and its per-line and merge-cache
250 overheads are guesses.
251- **Blame** shows `BlameCommit::boundary` and `author_name` only in the tooltip — the row
252 is sha, summary and date, and must stay one line. On a multi-user instance the author
253 is the first thing to revisit.
254- **Smaller:** raw-route images are checked in Chrome only; task-list items keep their
255 bullet and footnotes render in place; `bg-surface` is nearly `bg-background` in light
256 mode; light mode is unchecked on the profile, settings and log, and a visitor cannot
257 choose it; fonts are not loaded; the wordmark says "steid" ([ui.md]ui.md#the-shell).
258
259### Operations
260
261- **Releases:** the `jpgill.dev` mirror is temporary — until the control plane moves this
262 instance onto the fleet a publish writes two hosts and can half-succeed — and the 0.6.0
263 mirror had not been written, since it needs ssh to the author's box (not rechecked
264 since 2026-09-20). Signing is launch 5.4.
265- **`/api/instance`** reports no memory or cache numbers. The disk walk is cached for a
266 minute, so a console that has just grown a volume sees the old number for up to that
267 long, and counts `.replaced-…` and `orphaned/`, so a replaced instance reads as twice
268 its size until the aside directory goes. Both routes live in `web/instance.rs`;
269 move them if `/api` grows.
270- **Metrics:** `active_imports` never observed above zero; `cat_file_respawns` only
271 unit-tested; no process metrics or histograms. `classify()` restates the URL layout, so
272 a new route shape or git subcommand needs a line there.
273- **The instance owner is the sole user** (`instance_owner`), so the backup download
274 fails closed the day a second user exists; `claim::sole_owner_handle` is the same
275 lookup. Launch 4.2's instance-level role replaces both. No second-user test exists at
276 the HTTP level, because no registration route exists.
277- **Backups:** no test covers the web route; a missing directory destination is written
278 as a file; a never-migrated database errors badly; `--backups daily` was verified
279 against a stubbed `systemctl`; cross-filesystem restore and large archives are
280 untested. A self-hoster's backups stay on the machine unless they ship them.
281- **Backups of a live instance** — what launch 2.15 left open:
282 - **A branch deleted mid-backup can come back broken. Accepted for now** by the author
283 on 2026-10-21; to be revisited in Steid's own plan, not the launch plan.
284 - **What happens.** Deleting a branch deletes its reflog too (checked with git 2.50),
285 so the reflog that keeps a moved ref's old commit safe does not cover it. If the
286 branch is deleted after the walk has read that repository's refs, and a `gc --auto`
287 in the same window prunes its now-unreachable commits before the walk reaches
288 `objects/`, the archive holds the ref and not its commits. The backup succeeds and
289 says nothing.
290 - **How rare.** All three at once, inside the time it takes to copy that one
291 repository: a branch deleted mid-backup; its commits on no other branch and older
292 than `gc.pruneExpire` (two weeks); and a `gc --auto` that actually runs, which a
293 push triggers only past 6,700 loose objects or 50 packs. Not reproduced.
294 - **What the customer sees**, only after restoring that archive: the branch they had
295 deleted is back, naming a commit that is not there. Until it is deleted again, a
296 full clone or a fetch of that repository fails (`upload-pack: not our ref <sha>`),
297 and so do the branches page and changing the default branch, whose `for-each-ref`
298 reads each branch's commit and exits with "missing object". Deleting the branch
299 again clears it: `git push <url> --delete <branch>` works on a ref whose commit is
300 missing ("allowing deletion of corrupt ref"), and the next clone is whole. Nothing
301 else in the repository is damaged. Checked with git 2.50 against a hand-broken ref,
302 not through a running Steid.
303 - **The two cures, both rejected for now.** A connectivity check (`git fsck
304 --connectivity-only`) after each repository is copied is slow on big repositories
305 and costs CPU credits on the small tiers. Pausing gc while a backup runs needs a
306 safety net of its own, or a backup that crashes leaves gc off for good.
307 - **The README's live `rsync` recipe** copies `objects/` before `refs/` too, so it has
308 the races `steid backup` had; `steid backup` is the way to copy a running instance.
309- **Mail:** TLS submission to a real relay has never been exercised.
310- **The archive endpoint** is the most expensive anonymous request (a full pack per hit,
311 limited to 10 a minute per client) and the first thing to look at under load; a late
312 `git archive` failure is a truncated download.
313
314### Code shape
315
316The open steps of [review-2026-09-10-organisation.md]review-2026-09-10-organisation.md,
317which stays as their reference:
318
319- **Step 4:** URL builders re-scattered (two `commit_url`s, two `compare_url`s, seventeen
320 more in pages); `labels::encode` is a fourth copy of `urls::encode(v, false)`.
321- **Step 6:** `web/frame.rs` — `web/repo.rs` is imported by thirteen modules, and
322 `context.rs` imports `repo_for` and `profile_for` upward from page modules.
323- **Step 7:** split `web/pulls.rs` (1,975 lines, 7 tests); the web layer is the thin spot
324 in testing. `owned_repo` and `owned_profile` have no unit tests.
325- **Step 8:** `GitQuery::diff` hands git's stdout (`RawDiff`) across the layer boundary.
326- **Step 9:** `application/refs.rs` out of `browse.rs`; repoint the test modules and drop
327 `infrastructure::git`'s `InMemoryGitQuery` re-export.
328- **Step 10:** `tests/http.rs` exists but cannot render a view (empty asset bundle), so
329 303-after-POST, the `__Host-` cookie and the CSRF refusal page are hand-verified. The
330 real bundle needs `topcoat asset bundle` in the test gate or a checked-in manifest —
331 decide.
332- **Step 11:** split `GitQuery` (an amendment to 0006). **Step 12:** a `RepoEvent` log, so
333 webhooks and feeds can report more than pushes (needs an ADR). **Step 13:** `/api` —
334 five routes against 87; the standing practice in ROADMAP.md has lapsed.
335
336Also open:
337
338- **38 `too_many_arguments` allows** remain, all genuinely wide signatures (`merge_pull`,
339 `redeliver`); narrowing them is step 11 and `merge_pull`'s own shape.
340- **`&Stores::new(&orgs(cx), &memberships(cx), &repos(cx))` is written 60 times** in
341 `web/`; a `context::ports(cx)` would collapse it.
342- **`writable_repo` and `changeable_repo` are two functions for one rule**;
343 `access_tests.rs` pins their agreement, so folding them is safe.
344- **Milestone 7's permission argument has a home but no name**: the third role, the
345 permission enum and the collaborator model (an ADR) are undecided.
346- From the [2026-09-06 review]archive/review-2026-09-06-organisation.md, not rechecked
347 since: `sqlite.rs`'s tests use `claim_instance` as a fixture, and `view_repo` pays two
348 `count(*)` and a membership lookup even on routes that draw no tab strip.
349
350## Backlog
351
352Forward plans outside the launch order. Milestone 6 comes after launch by the plan's own
353list; milestone 7's first slice is launch 4.1 / 4.2, and the rest follows it.
354
3551. **Milestone 6 — Writing.** Posts, markdown, `/{handle}/posts/{slug}`. Open when it
356 starts: which markdown crate, and whether raw HTML in markdown is trusted — safe for a
357 single author, a stored-XSS hole the moment milestone 7 adds a second user.
3582. **Milestone 7 — Identity, full — has a shape**, set by the control plane's
359 [ADR 0005]../../steid-control-plane/decisions/0005-oidc-only-sign-in-and-organisations-own-instances.md
360 (2026-09-12): a company signs everyone into its instance with its identity provider,
361 and an individual's managed instance may do the same with a personal Google account.
362 Beyond organisations (shipped in 0.8.0), invites and a registration policy, it asks
363 for: a `User` with linked **external identities** (issuer, subject, verified email)
364 beside an *optional* password hash; an **identity-provider configuration** reachable
365 headlessly (`STEID_OIDC_*`); `POST /api/setup` able to bind the owner to an external
366 identity; and an instance-level role. The OIDC relying party is a small crate
367 **shared** with the control plane (`steid-control-plane/crates/steid-oidc`, on
368 `openidconnect`, to be extracted when this milestone needs it) — the one exception to
369 copy-not-share, because it is security code. Run it alone, as CSRF was.
370 OIDC first; SAML is the control plane's milestone 9. **The registration policy is
371 chosen per instance on the control plane** and delivered headlessly, so it is data:
372 `Open`, `InviteOnly`, `EmailDomain { provider, domain }`,
373 `Provider { issuer, group/claim constraint }`, later `Saml`. A self-hoster sets the
374 same by env or a settings page. Launch 4.2 is its first slice.
3753. **Forge feature candidates still open** (surveyed 2026-09-05; the waves that built the
376 rest are in [progress.md]progress.md#how-the-waves-were-run): topics, and pinned
377 repositories on the profile; milestones (8+); LFS; SSH (would reverse
378 [0001]decisions/0001-git-over-http-not-ssh.md); profile links; an Atom feed for
379 posts once they exist; `/api` coverage for existing use cases.
3804. **Zero-downtime deploys — deferred, deliberately.** `deploy.sh` stops, swaps and
381 starts: about two seconds. The plan: a systemd template unit `steid@.service` whose
382 instance name is the port (`/opt/steid/3000`, `/opt/steid/3001`); install to the idle
383 port, health-check it on loopback, repoint Caddy and `caddy reload`, then stop the old
384 one and swap which is enabled. Two things make it more than a script: both processes
385 share one SQLite file during the overlap, which wants WAL (launch 2.20: Steid is in
386 rollback-journal mode today) and migrations written expand, deploy, contract; and an
387 in-flight `git push` is cut unless the old process stops *after* Caddy has repointed
388 (`topcoat::start` already drains on SIGTERM). Worth building when instances belong to
389 other people.
390
391## Open questions
392
393- **Whether an absent *public* repository can 404 while private ones still 401.** The
394 uniform 401 from [0007]decisions/0007-tokens-over-http-basic.md hides private names,
395 and also turns every mistyped URL into "Authentication failed", which cost real time on
396 the first deployment. The leak concerns private names only, so a 404 for a name that
397 would be public may cost nothing — needs thought about whether that is true.
398- **Topcoat is early** (v0.5.0, first released 2026-07-22, breaking changes expected by
399 its own authors). Expect churn that isn't feature work.