think
16px
820px

Close the last X-User-Id gaps — plan

Design: ../specs/2026-07-09-identity-internal-embed-design.md. TDD; pnpm check
+ agent pytest green.

  1. dash/gateway.py (edit internal → copy public) — SYSTEM_REINGEST_ACTOR
    + seed_reingest_actor().
  2. dash/scripts/load_knowledge.py (both) — call seed_reingest_actor()
    before the inserts.
  3. app/api/admin/knowledge/{tables,business,content,seed-templates}/route.ts
    — forward X-User-Id: opaqueStaffId(auth.user.email) to the agent.
  4. Gap 1 (internal chat) — no change; already closed by e12ae68/0ce6a72.
    Verify live.
  5. Teststest_gateway.py reingest 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.