Skip to content

docs: state the operator_handle hook-ordering contract - #117

Merged
vvillait88 merged 1 commit into
mainfrom
operator-handle-ordering-docs
Aug 18, 2026
Merged

docs: state the operator_handle hook-ordering contract#117
vvillait88 merged 1 commit into
mainfrom
operator-handle-ordering-docs

Conversation

@vvillait88

Copy link
Copy Markdown
Contributor

Summary

Twin of node-commerce PR 110. The gate that populates ctx.operator_handle runs AFTER pre_validate, so the field is readable from compute_pricing onward and always None inside pre_validate. A pre_validate read passes every keyless-dev test and zero-settles every production request whose flow keys on it; a live store shipped exactly that (caught by its first real settle, fixed store-side). The contract now lives on the field's docstring, where the mistake gets made, plus the CLAUDE.md operator-handle section. Worked with Varun.

Type of change

  • Bug fix (no breaking change)
  • New feature (no breaking change)
  • Breaking change (existing callers must update)
  • Docs, tests, or internal maintenance only

Public API

None; docstring/doc text only.

Test plan

Docs-only; uv run ruff check passes locally. No behavior to test.

Checklist

  • Tests cover the new behavior, and the suite passes locally
  • Lint, format, and type checks pass
  • Docs and README examples updated if the public surface changed
  • No secrets, credentials, or personal data in the diff or the tests

Twin of the node-commerce docs change. The gate that populates
ctx.operator_handle runs AFTER pre_validate, so the field is readable
from compute_pricing onward and always None inside pre_validate; a
pre_validate read passes every keyless-dev test and zero-settles every
production request whose flow keys on it (a live store shipped exactly
that). The contract now lives on the field's docstring where the
mistake gets made.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vvillait88
vvillait88 merged commit 42e6601 into main Aug 18, 2026
7 checks passed
@vvillait88
vvillait88 deleted the operator-handle-ordering-docs branch August 18, 2026 21:21
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