oficina / home Public
Resolve Home identity on the caller's transaction
Status: implemented and independently approved by GPT-6 Astra; October 30 compatibility integration with Home main also approved. Deployed canary review remains.
The app adapters recheck current Home person ID/address and admission under their SQLite writer, but bypass linkstore's keyed person_binding validation. A corrupt or changed binding between initial bridge resolution and commit must refuse the write, not commit and fail only on response emission.
Add linkstore.Store.ResolveOn(ctx, Queryer, issuer, subject) and connect.Bridge.ResolveOn(ctx, Queryer, subject). Existing linkstore.Store.Resolve delegates to Store.ResolveOn with its stored DB. Bridge.Resolve retains ordinary Home-only resolution; Bridge.ResolveOn is explicitly existing-linked-account-only and never invokes HomeOnly or Unlinked hooks outside the supplied transaction. The new method performs exactly the existing issuer/subject validation, link lookup, LookupPerson using the supplied Queryer, positive-ID/address and constant-time person_binding check, and existing safe refusal/storage errors. No new cryptography, schema, permissions, caches or subject-to-address fallback. The supplied Queryer must be the caller's transaction connection; it remains caller-owned. Bridge uses its fixed configured issuer.
Each app calls bridge.ResolveOn using tx.Statement.ConnPool (the existing QueryRowContext interface), compares stable ID/address to the request's captured identity, and retains operation-specific local permissions in that transaction. This avoids both the incomplete hand-rolled link check and opening a second SQL connection while holding the writer.
Tests: ordinary Resolve parity; a real held SQLite transaction sees its own uncommitted valid/invalid binding, deleted link, changed address and admission refusal; max one SQL connection with a context deadline proves no escape to stored DB; storage errors remain redacted; nil queryer refused. A deliberate mutant using the stored DB or skipping binding validation must fail. Apps add trigger-driven binding corruption after content insertion and assert all content/attribution/receipt effects roll back. Review and full Home CI precede publishing the module revision; consuming branches pin it exactly.