Skip to content

docs: API alternatives design documents#154

Open
ElFantasma wants to merge 20 commits intomainfrom
docs/api-comparison
Open

docs: API alternatives design documents#154
ElFantasma wants to merge 20 commits intomainfrom
docs/api-comparison

Conversation

@ElFantasma
Copy link
Collaborator

@ElFantasma ElFantasma commented Feb 20, 2026

Summary

Design decision records documenting the API redesign process that led to Approach B (#[protocol] + #[actor] macros).

  • docs/design/API_REDESIGN.md — initial v0.5 redesign plan: Handler, Recipient, object-safe Receiver pattern, supervision trait sketches (from docs: add API redesign plan for v0.5 #147)
  • docs/design/API_ALTERNATIVES_SUMMARY.md — comprehensive comparison of 6 API approaches (A–F) with full chat room example code, analysis tables, and comparison matrix
  • docs/design/API_ALTERNATIVES_QUICK_REFERENCE.md — condensed version with the same structure, plus old API baseline example
  • Outcome: Approach B was chosen and implemented in PR feat: #[protocol] + #[actor] macros, Handler<M>, registry (0.5.0) #153

These docs are kept as architectural decision records for future reference (blog post, onboarding contributors).

Supersedes #147 and #150.

Test plan

  • Document renders correctly in GitHub markdown
  • Internal cross-references between docs work
  • Branch links point to correct branches

@github-actions
Copy link

🤖 Kimi Code Review

This is a documentation-only PR that summarizes API design alternatives. As such, there's no code to review for correctness, safety, or performance issues.

The document is well-structured and provides a comprehensive comparison of the different approaches. The examples are clear and the trade-offs are well-explained.

One minor suggestion: The "Status" column in the comparison matrix shows Approach B as "WIP" but the document states it's "Fully implemented" - this should be updated for consistency.


Automated review by Kimi (Moonshot AI) · custom prompt

@github-actions
Copy link

🤖 Codex Code Review

I checked the diff: it only adds docs/API_ALTERNATIVES_SUMMARY.md and makes no code changes. There are no correctness, concurrency, lifecycle, or performance implications to review in this PR.

If you want doc feedback, I can do a content/clarity pass with line references, but there’s no code-level review to perform here.


Automated review by OpenAI Codex · custom prompt

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Adds comprehensive API alternatives comparison document for the actor framework redesign. The document compares 6 different approaches (A-F) with the same chat room example, including full code samples, analysis tables, and trade-off discussions. All branch references have been verified and point to the correct branches (feat/approach-a, feat/approach-b, etc.). The document is well-structured with 1201 lines covering functional, code quality, and strategic dimensions of each approach.

Key sections:

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it only adds documentation
  • Documentation-only change with no code modifications. All branch references verified to exist. Single minor style issue (missing TOC entry) that doesn't affect functionality. The document is comprehensive, well-structured, and provides valuable technical comparison for API design decisions.
  • No files require special attention

Important Files Changed

Filename Overview
docs/API_ALTERNATIVES_SUMMARY.md New comprehensive API comparison document with 6 approaches, code examples, and analysis tables - well-structured and informative

Last reviewed commit: 7a92097

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +5 to +20
## Table of Contents

- [The Two Problems](#the-two-problems)
- [The Chat Room Example](#the-chat-room-example)
- [Baseline: The Old API](#baseline-the-old-api-whats-on-main-today)
- [Approach A: Handler\<M\> + Recipient\<M\>](#approach-a-handlerm--recipientm-actix-style)
- [Approach B: Protocol Traits](#approach-b-protocol-traits-user-defined-contracts)
- [Approach C: Typed Wrappers](#approach-c-typed-wrappers-non-breaking)
- [Approach D: Derive Macro](#approach-d-derive-macro)
- [Approach E: AnyActorRef](#approach-e-anyactorref-fully-type-erased)
- [Approach F: PID Addressing](#approach-f-pid-addressing-erlang-style)
- [Registry & Service Discovery](#registry--service-discovery)
- [Macro Improvement Potential](#macro-improvement-potential)
- [Comparison Matrix](#comparison-matrix)
- [Recommendation](#recommendation)
- [Branch Reference](#branch-reference)
Copy link
Contributor

Choose a reason for hiding this comment

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

Table of Contents is missing Detailed Design Documents section that exists at line 1198

Suggested change
## Table of Contents
- [The Two Problems](#the-two-problems)
- [The Chat Room Example](#the-chat-room-example)
- [Baseline: The Old API](#baseline-the-old-api-whats-on-main-today)
- [Approach A: Handler\<M\> + Recipient\<M\>](#approach-a-handlerm--recipientm-actix-style)
- [Approach B: Protocol Traits](#approach-b-protocol-traits-user-defined-contracts)
- [Approach C: Typed Wrappers](#approach-c-typed-wrappers-non-breaking)
- [Approach D: Derive Macro](#approach-d-derive-macro)
- [Approach E: AnyActorRef](#approach-e-anyactorref-fully-type-erased)
- [Approach F: PID Addressing](#approach-f-pid-addressing-erlang-style)
- [Registry & Service Discovery](#registry--service-discovery)
- [Macro Improvement Potential](#macro-improvement-potential)
- [Comparison Matrix](#comparison-matrix)
- [Recommendation](#recommendation)
- [Branch Reference](#branch-reference)
- [The Two Problems](#the-two-problems)
- [The Chat Room Example](#the-chat-room-example)
- [Baseline: The Old API](#baseline-the-old-api-whats-on-main-today)
- [Approach A: Handler\<M\> + Recipient\<M\>](#approach-a-handlerm--recipientm-actix-style)
- [Approach B: Protocol Traits](#approach-b-protocol-traits-user-defined-contracts)
- [Approach C: Typed Wrappers](#approach-c-typed-wrappers-non-breaking)
- [Approach D: Derive Macro](#approach-d-derive-macro)
- [Approach E: AnyActorRef](#approach-e-anyactorref-fully-type-erased)
- [Approach F: PID Addressing](#approach-f-pid-addressing-erlang-style)
- [Registry & Service Discovery](#registry--service-discovery)
- [Macro Improvement Potential](#macro-improvement-potential)
- [Comparison Matrix](#comparison-matrix)
- [Recommendation](#recommendation)
- [Branch Reference](#branch-reference)
- [Detailed Design Documents](#detailed-design-documents)
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/API_ALTERNATIVES_SUMMARY.md
Line: 5-20

Comment:
Table of Contents is missing `Detailed Design Documents` section that exists at line 1198

```suggestion
- [The Two Problems](#the-two-problems)
- [The Chat Room Example](#the-chat-room-example)
- [Baseline: The Old API](#baseline-the-old-api-whats-on-main-today)
- [Approach A: Handler\<M\> + Recipient\<M\>](#approach-a-handlerm--recipientm-actix-style)
- [Approach B: Protocol Traits](#approach-b-protocol-traits-user-defined-contracts)
- [Approach C: Typed Wrappers](#approach-c-typed-wrappers-non-breaking)
- [Approach D: Derive Macro](#approach-d-derive-macro)
- [Approach E: AnyActorRef](#approach-e-anyactorref-fully-type-erased)
- [Approach F: PID Addressing](#approach-f-pid-addressing-erlang-style)
- [Registry & Service Discovery](#registry--service-discovery)
- [Macro Improvement Potential](#macro-improvement-potential)
- [Comparison Matrix](#comparison-matrix)
- [Recommendation](#recommendation)
- [Branch Reference](#branch-reference)
- [Detailed Design Documents](#detailed-design-documents)
```

How can I resolve this? If you propose a fix, please make it concise.

@ElFantasma ElFantasma changed the title Add API alternatives comparison document docs: API alternatives design documents Mar 5, 2026
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