Skip to content

feat(registry): scope identity by provider binding - #113

Merged
galligan merged 3 commits into
mainfrom
dis-79-scope-provider-identity-across-the-registry-while-preserving
Sep 13, 2026
Merged

galligan merged 3 commits into
mainfrom
dis-79-scope-provider-identity-across-the-registry-while-preserving

Conversation

@galligan

@galligan galligan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Context

Native session, turn, and item identifiers can repeat across providers. Dispatch must scope those identifiers by provider binding so independent providers cannot share history, receipts, or recovery state accidentally.

What changed

  • Introduces schema v24 with provider-qualified identity and transactional migration of affected keys and foreign keys.
  • Preserves durable row IDs, SQLite sequence high-water marks, default-Codex lane IDs, refs, and child relationships.
  • Exposes provider, binding, and native-session identity in managed-thread outputs.
  • Adds foreground, event-ingress, and recovery guards that keep unsupported bindings away from the singleton Codex client.
  • Preserves the default-Codex invariant provider_session_id == id and explicitly classifies changed output contracts.

Verification

  • just check passed Ruff, formatting, strict mypy, 1,345 tests with 17 live tests deselected, wheel and sdist builds, and package-content validation at the current stack tip.
  • Migration regressions cover rollback, connection reuse after failure, composite foreign keys, and deleted-ID sequence preservation.
  • Independent targeted review scored 5/5 with zero P0–P2 findings.
  • Final exact-head composed-stack review at 7e5d6ba is clean at 5/5 with zero P0–P3 findings; adversarial supervisor coverage exercised all 27 immediate and 12 delayed recovery/closure outcome combinations.
  • Hosted current-head check and Bootstrap smoke (macOS) are successful.

Risks and boundaries

The migration is exercised on isolated fixtures and does not alter the installed Dispatch registry. Older binaries cannot use schema v24; rollback follows the existing pre-migration backup path. This slice establishes identity isolation but does not enable Hermes execution. The stack remains ready for review and unmerged.

Closes: DIS-79

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

DIS-79

@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR Summary

High Risk
SQLite migration and binding-scoped joins touch core identity, delivery, and recovery paths; guard or migration mistakes could cross-contaminate provider evidence or break default-Codex compatibility.

Overview
Adds binding-scoped provider identity (schema 24–25): managed threads and normalized history, events, receipts, topology, and server requests are keyed by provider + binding_id + native session id so duplicate native IDs across profiles cannot share evidence. Existing default-Codex lanes keep id / refs / FKs unchanged with provider_thread_id == id; managed outputs and MCP/CLI identity payloads now also expose provider, binding_id, and provider_thread_id.

Codex execution is explicitly gated to the default binding: handlers, delivery/queue/reconciliation, daemon restore, subscriptions, backfill, and server-request responses use native thread ids only when the lane matches the default Codex binding; other bindings get capability/authority errors or no-ops instead of leaking through the singleton App Server client. Event ingress and self resolution look up lanes by provider thread within that binding.

Updates legacy op baseline classification for the expanded output contracts, adds operator docs for the migration/rollback path, and aligns plan/ADR text with the Hermes foundation scope. Claude launch observation fields rename provider_session_idprovider_thread_id for naming consistency.

Reviewed by Cursor Bugbot for commit d129855. Configure here.

@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_54d8c03a-21a7-48e2-9dbc-d421ad1cad9e)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T22:11:10.430366Z d22a71e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67885f70f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/outfitter/dispatch/registry/store.py
@galligan
galligan force-pushed the dis-79-scope-provider-identity-across-the-registry-while-preserving branch from 67885f7 to f0529f9 Compare September 13, 2026 20:33
@galligan
galligan force-pushed the dis-70-bind-daemon-schema-skew-validation-to-the-op-request-itself branch from ec71a2d to 56ca490 Compare September 13, 2026 20:33
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_37e99897-243d-43e7-8981-a28c674c26d7)

@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0529f93cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/outfitter/dispatch/core/handlers.py
@galligan
galligan force-pushed the dis-70-bind-daemon-schema-skew-validation-to-the-op-request-itself branch from 56ca490 to d5c7004 Compare September 13, 2026 20:48
@galligan
galligan force-pushed the dis-79-scope-provider-identity-across-the-registry-while-preserving branch from f0529f9 to a8a4eb8 Compare September 13, 2026 20:48
@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8a4eb8f0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/outfitter/dispatch/core/models.py
@galligan
galligan force-pushed the dis-79-scope-provider-identity-across-the-registry-while-preserving branch from a8a4eb8 to d22a71e Compare September 13, 2026 22:02
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_09c44ba7-f1b8-4068-b2d4-6014153b39a6)

@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d22a71e96c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/outfitter/dispatch/registry/models.py
Comment thread src/outfitter/dispatch/core/topology.py Outdated

galligan commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 13, 11:23 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 13, 11:28 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 13, 11:28 PM UTC: @galligan merged this pull request with Graphite.

@galligan
galligan changed the base branch from dis-70-bind-daemon-schema-skew-validation-to-the-op-request-itself to graphite-base/113 September 13, 2026 23:24
@galligan
galligan changed the base branch from graphite-base/113 to main September 13, 2026 23:26
@galligan
galligan force-pushed the dis-79-scope-provider-identity-across-the-registry-while-preserving branch from 6879f56 to d129855 Compare September 13, 2026 23:27
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8213e432-6763-4ed5-81f4-e00501de050f)

@galligan
galligan merged commit e476d68 into main Sep 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant