docs(issue-62): record relay leg 1 (bootstrap) in packet

This commit is contained in:
Federico Jaramillo Martinez
2026-07-17 20:36:05 +02:00
parent 0fa9d0e4d2
commit 585c3bc89d
2 changed files with 82 additions and 27 deletions
+42
View File
@@ -45,3 +45,45 @@ pending sessiond restart for later daemon-path slices.
**Handoff:** Planning only — NOT auto-spawning the first implementation leg. **Handoff:** Planning only — NOT auto-spawning the first implementation leg.
Assessment + relay plan are laid out ready to be kicked off by the user. Assessment + relay plan are laid out ready to be kicked off by the user.
---
## Leg 1 — Slice 0 Bootstrap (deps + range correction)
**Did:**
- Corrected `package.json`: three `@earendil-works/*` devDependencies
`^0.80.6``^0.80.8`; peerDependencies `>=0.80.0 <1``>=0.80.8 <0.81`.
- `npm install` in the worktree. The default `/tmp`-based node-gyp build of
`node-pty` failed with "Disk quota exceeded" (/tmp is a 5.8G tmpfs at ~81%).
Re-ran with `TMPDIR="$PWD/.tmp-build" npm install`, which succeeded (618
packages, 0 vulnerabilities). Removed `.tmp-build` after.
- Confirmed installed versions: all three packages resolve to **0.80.10**
(lockfile updated).
- Verified the new export surface via a node ESM check: `ModelRuntime` ✓,
`readStoredCredential` ✓, `ModelRegistry` ✓, `AuthStorage` absent ✓, pi-ai
`InMemoryCredentialStore` ✓.
- Ran `npx tsc --noEmit`: 24 errors, all in `src/server/sessions/` at the
expected migration sites (removed `AuthStorage`, `ModelRegistry.create/inMemory`,
`authStorage` on session-services options, `PiAgentSession.modelRegistry`).
This matches assessment §2/§3 — the new surface resolves; only Pi Web's old
usage is broken.
**Decisions:**
- Committed with `git commit --no-verify`: the pre-commit hook runs a
whole-project typecheck which cannot pass until the migration lands. Charter
explicitly permits non-verify-green legs. Documented this + the `TMPDIR`
workaround in `status.md` so future legs don't rediscover them.
- Did not touch any `src/` migration code — kept strictly to slice 0 scope.
**Artifacts changed:** `package.json`, `package-lock.json` (commit `0fa9d0e`);
`relays/issue-62-authstorage/{status,log}.md`. `node_modules/` installed
(gitignored, not committed).
**Status update:** last completed leg 1, next leg 2 = charter slice 1
(`authService.ts` core migration → propagate async construction to `sessiond.ts`).
**Blockers:** none. Sessiond restart still pending (becomes relevant from leg 2
onward once `sessiond.ts` changes land).
**Handoff:** spawning leg 2 (slice 1).
+40 -27
View File
@@ -1,33 +1,44 @@
# Relay status — issue-62-authstorage # Relay status — issue-62-authstorage
## Current position ## Current position
Relay planned and packet created. Assessment complete and committed Bootstrap (slice 0) complete and committed (`0fa9d0e`). Deps are installed in the
(`ASSESSMENT-issue-62.md`). No fix work has started. The worktree has **no worktree at **0.80.10** (all three `@earendil-works/*`), `package.json` ranges
`node_modules` installed yet** — the first implementation leg must install deps corrected, and the new export surface is confirmed resolvable
(pinned to Pi 0.80.8+) before anything typechecks. (`ModelRuntime`, `readStoredCredential` present; `AuthStorage` gone; pi-ai
`InMemoryCredentialStore` present). `npx tsc --noEmit` now reports **24 errors**,
all in `src/server/sessions/` at the expected migration sites (no crash — the
removed `AuthStorage` import and `ModelRegistry.create/inMemory` calls). The
migration itself has not started.
## Leg tracking ## Leg tracking
- **Last completed leg:** 0 (planning — this packet + assessment). - **Last completed leg:** 1 (slice 0 Bootstrap — deps + range correction).
- **Next leg to run:** 1. - **Next leg to run:** 2.
## Next task ## Next task
Run **charter slice 0 (Bootstrap)** as leg 1: Run **charter slice 1 (`authService.ts` core migration)** as leg 2:
1. In the worktree (`/srv/dev/pi-web-issue-62`), install deps pinning the three - Move `authService.ts` to `ModelRuntime` (async construction via
`@earendil-works/*` packages to 0.80.8+ (0.80.8 or current 0.80.10): `ModelRuntime.create({ authPath, modelsPath })`), migrate
`@earendil-works/pi-coding-agent`, `@earendil-works/pi-ai`, `saveApiKey` / `logoutProvider` / `refreshAuthState` / credential access off
`@earendil-works/pi-agent-core`. Install in the worktree, **not `/tmp`** the removed `authStorage`/`ModelRegistry.create` surface (see assessment §5.1
(`/tmp` has a disk-quota problem; see assessment §8). for the concrete mapping).
2. Correct `package.json`: peerDependencies for the three packages - Propagate the now-async construction to `src/server/sessiond.ts`.
`>=0.80.0 <1``>=0.80.8 <0.81`; devDependencies `^0.80.6``^0.80.8`. - **Sessiond path:** this slice touches session-daemon code → note in
3. Confirm the new export surface resolves (`readStoredCredential`, status/handoff that a manual sessiond restart will be needed once landed.
`ModelRuntime` present; `AuthStorage` gone) — e.g. a quick node/tsx check or - Slice 1 depends only on slice 0 (done). The tree will still not fully
just observe the typecheck errors now point at the migration sites. typecheck after this leg (slices 24 remain); that is expected — leave an
4. Commit (e.g. `chore(deps): require pi 0.80.8+ and correct dep ranges (issue #62)`). honest status.
5. Update this `status.md` + append `log.md`, then hand off to leg 2 (charter
slice 1: `authService.ts` core migration).
If slice 0 is already done when you arrive, apply the charter's task-selection If slice 1 is already done when you arrive, apply the charter's task-selection
policy: pick the lowest-numbered incomplete slice (1 → 6). policy: pick the lowest-numbered incomplete slice (2 → 6).
### Build/tooling note (important for every leg)
Installs and any native rebuild must set `TMPDIR` to a path inside the worktree,
e.g. `TMPDIR="$PWD/.tmp-build" npm install` (remove the dir after). `/tmp` is a
5.8G tmpfs at ~81% and node-gyp's `node-pty` build fails there with "Disk quota
exceeded". `.tmp-build` is scratch — do not commit it. The pre-commit hook runs
a whole-project typecheck; while the migration is incomplete, commit relay work
with `git commit --no-verify` (the charter permits legs that aren't verify-green).
Node: v24.18.0.
## Relevant context for the next runner ## Relevant context for the next runner
- **Plan of record:** `ASSESSMENT-issue-62.md` (root) — read once. §5 has the - **Plan of record:** `ASSESSMENT-issue-62.md` (root) — read once. §5 has the
@@ -53,9 +64,11 @@ commit before handing off. Hand off with `spawn_session` **once** per the
charter's Handover section. charter's Handover section.
## Blockers / intervention state ## Blockers / intervention state
None currently. Known constraints: None. Known constraints:
- **Sessiond restart pending** once slices touching `sessiond.ts` / session - **Sessiond restart pending** once slices touching `sessiond.ts` / session
runtime land — the human must manually restart the sessiond service; note it runtime land (starts with slice 1/leg 2) — the human must manually restart the
here when it applies. sessiond service; keep this note current when it applies.
- `/tmp` disk-quota issue observed during assessment — do dependency installs in - `/tmp` disk-quota issue is real — see the Build/tooling note above; always set
the worktree. `TMPDIR` into the worktree for installs/native rebuilds.
- node_modules is installed (gitignored) at 0.80.10; a fresh `npm install` is
only needed if node_modules is cleared.