capture: persist the owning source org on ingestion #1471

Closed
opened 2026-10-27 13:40:32 +00:00 by sam · 0 comments
Owner

Capture insertion omits org_id and therefore always stores the default org. Resolve the source owner in the ingestion path and persist that org through the State Store contract. Verify actual receiver-to-store insertion for a nondefault org and dispatch of its binding; do not rely on manually updated database ownership. This is distinct from receiver delivery authorization and is required for nondefault org event automation.

Notes

Regression reproduced through HTTP receiver, authenticated gRPC State Store and PostgreSQL: capture for a persisted nondefault source stored org-sys. Smallest fix derives org/workspace from sources during the capture INSERT, using the existing source path carried by the State Store contract; callers cannot choose capture ownership. Unknown source retention preserves default ownership. Extended org dispatch regression covers the real receiver insertion, org batch selection, dispatch ledger, task creation and completion through RPC. Full gate pending.
Final verification: regression failed on capture org org-sys versus expected acme before the fix, then passed with real receiver/gRPC/PostgreSQL insertion. Org/workspace ownership, default unknown-source retention, org-scoped pending batches, dispatch ledger and task creation passed. task check completed exit 0 on the committed tree.

Close reason

168247d9: fix(capture): inherit source org on ingestion (already on HEAD; TestPendingDispatchInCallerOrg passes)


Imported from beads archie-core-nit5 · GitHub #1567 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-10

Capture insertion omits org_id and therefore always stores the default org. Resolve the source owner in the ingestion path and persist that org through the State Store contract. Verify actual receiver-to-store insertion for a nondefault org and dispatch of its binding; do not rely on manually updated database ownership. This is distinct from receiver delivery authorization and is required for nondefault org event automation. ### Notes Regression reproduced through HTTP receiver, authenticated gRPC State Store and PostgreSQL: capture for a persisted nondefault source stored org-sys. Smallest fix derives org/workspace from sources during the capture INSERT, using the existing source path carried by the State Store contract; callers cannot choose capture ownership. Unknown source retention preserves default ownership. Extended org dispatch regression covers the real receiver insertion, org batch selection, dispatch ledger, task creation and completion through RPC. Full gate pending. Final verification: regression failed on capture org org-sys versus expected acme before the fix, then passed with real receiver/gRPC/PostgreSQL insertion. Org/workspace ownership, default unknown-source retention, org-scoped pending batches, dispatch ledger and task creation passed. task check completed exit 0 on the committed tree. ### Close reason 168247d9: fix(capture): inherit source org on ingestion (already on HEAD; TestPendingDispatchInCallerOrg passes) --- _Imported from beads `archie-core-nit5` · GitHub #1567 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-10_
sam added the mediumbug labels 2026-10-27 13:40:32 +00:00
sam self-assigned this 2026-10-27 13:40:32 +00:00
sam closed this issue 2026-10-27 13:40:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1471