Skip to content

V37 Gate 2: Conversation Session And Route History Contracts#112

Merged
geraldarthurdavis merged 2 commits into
version/v37from
v37/gate-2-conversation-session-route-history-contracts
May 24, 2026
Merged

V37 Gate 2: Conversation Session And Route History Contracts#112
geraldarthurdavis merged 2 commits into
version/v37from
v37/gate-2-conversation-session-route-history-contracts

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

  • Adds package-owned ConversationSession route-history contracts and generated source-safe artifact coverage for create, restore, branch, retry, redact, and stream operations.
  • Adds route-facing source-safe contract helpers plus focused protocol and uapi route tests.
  • Updates V37 spec, delta, notes, parity, roadmap, READMEs, package scripts, and gate/canon workflows for check:v37-gate2.

Validation

  • pnpm run check:v37-gate1
  • pnpm run check:v37-gate2
  • pnpm run check:v37-conversation-session-route-history
  • pnpm --filter @bitcode/protocol test
  • pnpm -C uapi exec tsc --noEmit --pretty false
  • pnpm -C uapi run lint
  • pnpm --dir uapi exec jest tests/api/conversationSessionRouteHistory.test.ts tests/api/conversationSessionRouteHistoryContract.test.ts --runInBand
  • node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
  • node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V36 --draft-target V37
  • node scripts/check-bitcode-canonical-inputs.mjs --current-target V36
  • bash scripts/check-import-casing.sh
  • bash scripts/find-uppercase-raw-promptparts.sh
  • git diff --check
  • git diff --cached --check

Notes

  • Leaves the pre-existing local packages/agent-generics/src/steps/factories.ts modification unstaged and untouched.
  • Conversation history remains route-local projection state; Terminal and ledger remain authoritative for transactions, settlement, wallet, Exchange, and BTD ownership work.

Implements package-owned ConversationSession route-history contracts with deterministic source-safe artifact generation for create, restore, branch, retry, redact, and stream operations.

Adds route-facing source-safe contract helpers, package and uapi route tests, V37 Gate 2 checker scripts, workflow wiring, and V37 spec/roadmap documentation for route-local history boundaries.

Validation: pnpm run check:v37-gate1; pnpm run check:v37-gate2; pnpm run check:v37-conversation-session-route-history; pnpm --filter @bitcode/protocol test; pnpm -C uapi exec tsc --noEmit --pretty false; pnpm -C uapi run lint; focused uapi Jest route-history tests; canonical input, import casing, raw promptpart casing, and diff hygiene checks.
@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment May 24, 2026 1:55pm

Keep the Gate 2 checker strict on generated route-history contracts, protocol tests, source-safety, documentation, and workflow wiring while making UAPI route-test execution explicit for workspace-installed jobs. This lets Bitcode Spec Basics run inside its lightweight Node container and leaves route Jest coverage to Gate Quality or BITCODE_RUN_UAPI_ROUTE_TESTS=1 local validation.

@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: 32262c6b71

ℹ️ 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 on lines +145 to +147
const observedMustNotExpose = new Set(payload.mustNotExpose || []);
const forbidsProtectedSource = contractRow.mustNotExpose.every((payloadClass) => observedMustNotExpose.has(payloadClass));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Validate mayExpose against contract allowlist

assertSourceSafeConversationRouteHistoryPayload accepts mayExpose in its input but never checks it, so a payload that declares unsafe classes in mayExpose can still be admitted as long as mustNotExpose and the two booleans match. In practice, a caller could pass mayExpose: ['wallet_private_material'] and still receive admitted: true, which defeats the purpose of a source-safety admission helper for route-history envelopes.

Useful? React with 👍 / 👎.

Comment on lines +47 to +51
'policy_decision',
'history_refs',
'proof_roots',
'event_ids',
'redaction_posture',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include stream_state in required route-history refs

The shared required reference list omits stream_state, even though the protocol-side contract for the same feature treats stream state as a required ConversationSession field. This creates drift where route-side validators that depend on requiredRefs can accept payload metadata without any stream lifecycle marker, weakening contract completeness for create/restore/retry/redact flows.

Useful? React with 👍 / 👎.

@geraldarthurdavis
geraldarthurdavis merged commit faa76c2 into version/v37 May 24, 2026
28 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