docs: stop advertising client interceptors — they were cut - #417
Conversation
`533c796` removed `CreateClientOptions.interceptors`, `ClientInterceptor`
and friends ("no consumer in the repo beyond a single test; every client
method already returns an `AsyncResult` that composes"). Two places kept
promising them: the README's feature list, where a reader would go
looking for an option that does not exist, and the handlers rule, which
told an agent the client has a mirror-image seam to the activity
middleware.
The rule now says why there is none, since that is the part worth
knowing: a client call hands you an `AsyncResult`, so wrapping it is
composing one — no registration, no hook. Activity middleware exists
because the platform invokes the activity and the application never
holds its `AsyncResult`.
Refs #374
Claude-Session: https://claude.ai/code/session_01GGixjxi5AQ2cNK62bBymfF
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe documentation removes client interceptor references. It documents ChangesClient interceptor documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized documentation change removes promises for a client-interceptor API that no longer exists; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The PR addresses [ Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to documentation updates that correctly reflect the current client API surface and do not affect runtime behavior.
Pull request overview
Removes outdated documentation that still implied @temporal-contract/client supports client interceptors, aligning the docs and agent guidance with the current client surface (where calls already return AsyncResult and interception is done via composition at the call site).
Changes:
- Updated README feature list to stop advertising “client interceptors” as a contract-aware capability.
- Updated agent handler guidance to explicitly document that there is intentionally no client-interceptor seam, and why.
File summaries
| File | Description |
|---|---|
| README.md | Removes “client interceptors” from the advertised feature set to match the current public API. |
| .agents/rules/handlers.md | Replaces the outdated claim about TypedClient.create({ interceptors }) with an explanation of the deliberate absence of client interceptors and the recommended composition approach. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Closes #374, by finding that the surface it is about no longer exists — and fixing the two places that still promise it.
What #374 asked for, and why it cannot be done
The issue proposes scoping client interceptors per contract (
for(contract, { interceptors })), and/or adding contract identity toClientInterceptorArgs. Both halves address a surface533c796deleted after the issue was filed:CreateClientOptionsis{ client }today,for()takes only a contract, andClientInterceptorArgsis gone. There is nothing left to rescope.What was still lying
README.md:129— "Schedules, cancellation scopes, continue-as-new, activity middleware, client interceptors — all contract-aware". A reader would go looking for an option that does not exist..agents/rules/handlers.md— told an agent the client has "the mirror-image seam:TypedClient.create({ interceptors })".The rule now says why there is no mirror-image seam, since that is the part worth knowing: a client call hands you an
AsyncResult, so wrapping it is composing one —.tap,.flatMap,.mapErrCasesat the call site, no registration and no hook to learn. Activity middleware exists because the platform invokes the activity and the application never holds itsAsyncResult.The asymmetry #374 noticed is real, and now points the other way
@amqp-contractkept per-contractpublishInterceptors/callInterceptors, with a live consumer in its example. So the family is asymmetric — but the choice is "re-add or stay cut", not "rescope", and staying cut is the decision recorded here. Re-adding would want a consumer first; there is none in this repo or in btravstack/start's temporal example.Gate
format --check,lint(0 warnings),typecheck12/12, unit 9/9.https://claude.ai/code/session_01GGixjxi5AQ2cNK62bBymfF
Summary by CodeRabbit
AsyncResultmethods.