Skip to content

feat(hermes): add correlated local adapter - #120

Merged
galligan merged 6 commits into
mainfrom
dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns
Sep 13, 2026
Merged

galligan merged 6 commits into
mainfrom
dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns

Conversation

@galligan

@galligan galligan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Context

Dispatch needs a local Hermes adapter that reserves immutable lane intent before native admission and refuses execution when the required native correlation capability is absent.

What changed

  • Adds an owned, generation-fenced JSONL stdio Hermes worker with fixed default-profile and entrypoint configuration.
  • Adds schema v27 lane_launches for atomic opaque-lane creation reservations, immutable replay and conflict handling, and separate first-delivery receipts.
  • Requires correlation_v1 and if_idle_v1; stock Hermes fails closed before execution.
  • Preserves stored native conversation identity separately from generation-scoped runtime route identity.
  • Projects correlated terminal text into bounded local transcript items and handles current-generation runtime activity without allowing unrelated native turns to settle local receipts.
  • Adds bounded uncorrelated control-free attention holds and corrects grouped MCP output schemas for SDK validation.

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.
  • Retained native proof on the reviewed local gateway completed two distinct correlated turns on one lane, session, and runtime generation, including exact replay and conflict assertions, MCP SDK validation, and owned-process cleanup.
  • Stock Hermes refused with capability_unavailable before creating lanes, launches, deliveries, or workspace files; cleanup was verified.
  • Independent adapter and MCP follow-up reviews both 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

Native request-indexed persistence remains unknown; transcripts are bounded live observations. The retained proof does not establish Codex and Hermes coexistence or external Desktop attachment. This slice does not publish, install, release, or activate Hermes configuration. The stack remains ready for review and unmerged.

Closes: DIS-85

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

DIS-85

@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from ae914b9 to 722a512 Compare September 13, 2026 18:20
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 6427320 to 5f34fbd Compare September 13, 2026 18:20
@galligan
galligan marked this pull request as ready for review September 13, 2026 19:28
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches core delivery, idempotency, and daemon provider lifecycle with generation-fenced execution; scope is a gated Hermes slice but mistakes could affect receipt reconciliation or lane writability.

Overview
Adds Hermes as a third execution provider (--provider hermes) with an owned stdio JSON-RPC gateway worker, wire client, and lane adapter wired into the daemon’s provider manager.

Lane creation goes through durable lane_launches with optional idempotency_key on new (Hermes-only today): immutable replay, conflicts with delivery keys, session mapping, and optional first-message delivery in one coordinated path. Hermes launches are restricted to plain-text, explicit cwd, and no Codex-only presets/workspace options.

Sending uses generation-fenced ProviderTargets, exclusive lane delivery reservation, pre-submit checks for incomplete launch or native attention holds, and observation-driven receipt/turn lifecycle (including partial evidence when event buffers overflow). Transcripts for Hermes come from bounded live-observed thread items (transcript_source: live_observed, partial: true), not full provider reads.

The provider router now supports generic binding adapters, route_submission_target, and route_hermes_launch; idempotent replay resolves via get_caller_key_binding. Subscriptions reject Hermes as a target and block delivery:turn for Hermes subscribers (docs/skills updated). MCP grouped action output schemas switch from oneOf to anyOf with inlined refs for validation.

Reviewed by Cursor Bugbot for commit de7b2a0. 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_2217ae26-b453-46cc-b429-609e7bf0fdb3)

@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:08:03.136235Z a70595a 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: 5f34fbdd74

ℹ️ 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/hermes_launch.py Outdated
Comment thread src/outfitter/dispatch/core/hermes_launch.py Outdated
Comment thread src/outfitter/dispatch/registry/store.py
Comment thread src/outfitter/dispatch/core/hermes.py Outdated
Comment thread src/outfitter/dispatch/client/hermes.py Outdated
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from 722a512 to cf65364 Compare September 13, 2026 20:33
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 5f34fbd to 229dde7 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_a2a456d4-a994-40cf-8ee0-9103c36843f9)

@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 229dde7 to 91a05d0 Compare September 13, 2026 20:37
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from cf65364 to 2101434 Compare September 13, 2026 20:37
@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: 91a05d068d

ℹ️ 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/hermes_launch.py Outdated
Comment thread src/outfitter/dispatch/daemon/host.py
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 91a05d0 to c9b25d5 Compare September 13, 2026 20:48
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from 2101434 to 65a7a3c 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

if native and inp.content:
raise ValidationError("native attached queue currently supports plain text only")

P2 Badge Make Hermes attention admission atomic

When an attention notification is persisted after this check but before reserve_delivery() or submit_reserved(), the new receipt is still reserved and the provider call is attempted because neither later path rechecks needs_attention. This can turn a send with a reusable idempotency key into a permanently failed receipt while the lane is known to require attention, contradicting the stated no-submission behavior; include the attention predicate in the lane-scoped admission/claim.

ℹ️ 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/hermes.py Outdated
Comment thread src/outfitter/dispatch/core/hermes.py
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from 65a7a3c to bdb5218 Compare September 13, 2026 22:02
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from c9b25d5 to a70595a 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_1ccf6a48-733f-4993-b3f5-82af817ce784)

@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: a70595a9a3

ℹ️ 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/hermes_launch.py Outdated
Comment thread src/outfitter/dispatch/core/hermes_launch.py Outdated
Comment thread src/outfitter/dispatch/core/hermes.py Outdated
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from bdb5218 to 67fd6b8 Compare September 13, 2026 22:32
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from a70595a to 946851b Compare September 13, 2026 22:32
@galligan
galligan force-pushed the dis-83-make-provider-startup-and-recovery-independent-within branch from 67fd6b8 to b0609f4 Compare September 13, 2026 22:50
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 946851b to 9e1a29f Compare September 13, 2026 22:50

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:42 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 13, 11:42 PM UTC: @galligan merged this pull request with Graphite.

@galligan
galligan changed the base branch from dis-83-make-provider-startup-and-recovery-independent-within to graphite-base/120 September 13, 2026 23:39
@galligan
galligan changed the base branch from graphite-base/120 to main September 13, 2026 23:41
@galligan
galligan force-pushed the dis-85-add-the-hermes-adapter-and-prove-two-coherent-local-turns branch from 9e1a29f to de7b2a0 Compare September 13, 2026 23:41
@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_c5dd6aa9-4432-4fe1-b224-efd1ab47c3d4)

@galligan
galligan merged commit 8b012c1 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