Close the last X-User-Id gaps — plan
Design: ../specs/2026-07-09-identity-internal-embed-design.md. TDD; pnpm check
+ agent pytest green.
dash/gateway.py(edit internal → copy public) —SYSTEM_REINGEST_ACTOR
+seed_reingest_actor().dash/scripts/load_knowledge.py(both) — callseed_reingest_actor()
before the inserts.app/api/admin/knowledge/{tables,business,content,seed-templates}/route.ts
— forwardX-User-Id: opaqueStaffId(auth.user.email)to the agent.- Gap 1 (internal chat) — no change; already closed by
e12ae68/0ce6a72.
Verify live. - Tests —
test_gateway.pyreingest actor (both); internal-web
knowledge-write-identity.test.ts.
Gate: agent pytest (scratch venv) + pnpm check. Completion + upload. Deploy
internal-web (live admin-write attribution) + both agents (future reingest
attribution); verify admin-write → admin HMAC, load_knowledge → system:reingest,
and re-run the attribution table.