Skip to content

docs(hermes): define native turn correlation contract - #116

Merged
galligan merged 2 commits into
mainfrom
dis-94-prepare-request-correlated-native-hermes-gateway-execution
Sep 13, 2026
Merged

galligan merged 2 commits into
mainfrom
dis-94-prepare-request-correlated-native-hermes-gateway-execution

Conversation

@galligan

@galligan galligan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Context

The Hermes stdio admission race means the stock gateway cannot produce positively correlated durable send receipts. Dispatch needs an explicit upstream contract before it can claim request-level native correlation.

What changed

  • Documents the source-pinned admission race and the limits of the stock gateway at 939e45c.
  • Defines prompt_turn_correlation_v1: atomic idle admission, an owner token, and a native turn_id echoed in start, terminal, error, active or settled, and retained or replayed evidence.
  • Requires Dispatch to fail closed until that contract is verified and adopted.
  • Keeps generation quarantine and unknown-outcome handling as separate safety boundaries.
  • Preserves the existing synthetic two-turn and working-directory probe as continuity evidence without treating it as production correlation proof.

Verification

  • Fresh targeted documentation review scored 5/5 with zero P0–P2 findings.
  • The review verified pinned source anchors, the four-file scope, Markdown links and fences, and git diff --check.
  • 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; the stack-tip source gate also passed just check with 1,345 tests and 17 live tests deselected.

Risks and boundaries

The isolated upstream implementation is neither included nor claimed complete here. No release, deployment, runtime replacement, or Hermes adapter execution is included. The stack remains ready for review and unmerged.

Refs: DIS-94 (implementation and verification of prompt_turn_correlation_v1 remain open upstream; this PR only defines the contract)

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

DIS-94

@galligan
galligan force-pushed the dis-80-introduce-guarded-provider-routing-beneath-the-existing branch from 8b86fff to 3969725 Compare September 13, 2026 18:20
@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from 6cf1d20 to 3986f06 Compare September 13, 2026 18:20
@galligan galligan changed the title docs(providers): require native turn correlation docs(hermes): define native turn correlation contract Sep 13, 2026
@galligan
galligan marked this pull request as ready for review September 13, 2026 19:27
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation and planning updates only; no execution, auth, or migration behavior changes in this PR.

Overview
This PR documents a new Hermes prerequisite discovered by a source-pinned audit of gateway 939e45c: idle check/claim can race heartbeat and bot turns, so sequence fencing, status:streaming, and running:false cannot tie an arbitrary terminal event to a submitted prompt.

It introduces DIS-94 in the execution plan (after DIS-84, before DIS-85) and defines the upstream additive capability prompt_turn_correlation_v1—atomic idle admission, an owner token, and a native turn_id echoed through start, terminal, error, and retained evidence. Dispatch must fail closed on durable Hermes send receipts until that contract is verified and adopted; generation quarantine and unknown-outcome rules stay separate.

ADR-0028, the native provider contract, RETRO, and Hermes pickup gates are updated to match: DIS-85 now requires verified DIS-94 adoption; the existing two-turn/cwd probe remains continuity evidence only, not production correlation proof. A source map entry points at session_notifications.py for the race paths. No runtime or adapter code changes.

Reviewed by Cursor Bugbot for commit 87e5098. 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_90e100a1-a3bf-4a1e-b8a4-6f216c5a6457)

@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:06:46.750343Z d16e50b 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: 3986f06edb

ℹ️ 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 .agents/plans/stations-providers/PLAN.md
@galligan
galligan force-pushed the dis-80-introduce-guarded-provider-routing-beneath-the-existing branch from 3969725 to 0ec0c32 Compare September 13, 2026 20:33
@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from 3986f06 to 2616808 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_59475bef-8c51-4be8-bb51-2ab0d0ede776)

@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 26168085e1

ℹ️ 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".

@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from 2616808 to f144b71 Compare September 13, 2026 20:48
@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: f144b715fd

ℹ️ 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".

@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from f144b71 to d16e50b 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_13aa6d69-51af-4ede-a67f-4937049b6160)

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

ℹ️ 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 docs/research/hermes-native-provider-contract.md
@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch 2 times, most recently from 1372196 to a588026 Compare September 13, 2026 22:50
@galligan
galligan force-pushed the dis-80-introduce-guarded-provider-routing-beneath-the-existing branch from b0fecfd to 904861f 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:34 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 13, 11:34 PM UTC: @galligan merged this pull request with Graphite.

@galligan
galligan changed the base branch from dis-80-introduce-guarded-provider-routing-beneath-the-existing to graphite-base/116 September 13, 2026 23:31
@galligan
galligan changed the base branch from graphite-base/116 to main September 13, 2026 23:32
@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from a588026 to 87e5098 Compare September 13, 2026 23: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_429f90f4-3c00-4bcd-bf89-524158996c57)

@galligan
galligan merged commit f6e39c6 into main Sep 13, 2026
9 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