Skip to content

[codex] Complete chat turn quality gate#41

Merged
roackb2 merged 1 commit intomainfrom
codex/m116-chat-turn-quality-gate
May 3, 2026
Merged

[codex] Complete chat turn quality gate#41
roackb2 merged 1 commit intomainfrom
codex/m116-chat-turn-quality-gate

Conversation

@roackb2
Copy link
Copy Markdown
Owner

@roackb2 roackb2 commented May 3, 2026

Summary

Completes the M11.6 chat-turn architecture-quality gate before moving to toolkits.

  • Delete the wrapper-only src/core/chat/turn-tools.ts module.
  • Keep ordinary-turn default tool setup directly visible in turn-context.ts.
  • Move prepared preflight session persistence into session-turn-preflight.ts.
  • Move completed-turn session saving into turn-persistence.ts.
  • Remove src/core/chat/* imports from the public package root and add an import-boundary test to prevent recurrence.
  • Add behavior tests for approval bridging, lease cleanup on run-loop failure, preflight persistence, and final turn persistence.
  • Update src/core/chat/README.md to distinguish stable core entry points from internal turn services.

Why

M11.6 is meant to be a quality gate, not a file shuffle. The chat turn path now leaves ordinary-turn.ts as orchestration over behavior-owning services: context preparation, preflight, run loop, memory maintenance, persistence, and lease cleanup. Durable side effects now live with the lifecycle phase that owns them.

Validation

  • yarn test:unit src/__tests__/unit/core/chat-turn-runtime.test.ts src/__tests__/unit/core/chat-turn-persistence.test.ts src/__tests__/unit/core/import-boundaries.test.ts
  • yarn vitest run src/__tests__/integration/chat/chat-runtime.test.ts
  • yarn vitest run src/__tests__/integration/chat/session-submit.test.ts src/__tests__/integration/memory/memory-integration.test.ts
  • yarn typecheck
  • yarn eslint

@roackb2 roackb2 marked this pull request as ready for review May 3, 2026 03:50
@roackb2 roackb2 merged commit 4ead7a6 into main May 3, 2026
4 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