Skip to content

docs(readme): introduce Entity.aggregate, and fix stale schema and flag lines - #170

Merged
btravers merged 1 commit into
mainfrom
docs/readme-aggregate
Oct 6, 2026
Merged

btravers merged 1 commit into
mainfrom
docs/readme-aggregate

Conversation

@btravers

@btravers btravers commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

No code change. No changeset.

🤖 Generated with Claude Code

…ag lines

Both READMEs gain an "Aggregates" section: a short Subscription showing
no update(), emit returning a sealed decision, and save(decision) for
either persistence style, with the how-to linked. `Entity` stays the hero
example, since an aggregate is built on it.

Also fixes lines that predate today's changes: `updateInput` derives from
`input` (#72), `output` is picked from by allowlist (#138), and the flag
lists gain `identity` (#38) and `unbranded` (#73).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 13:14
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: btravstack/entity/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1fa98a8-d07a-4084-b685-466bb1676ab1
📥 Commits

Reviewing files that changed from the base of the PR and between 7eb045c and 6065aeb.

📒 Files selected for processing (2)
  • README.md
  • packages/entity/README.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@btravers
btravers merged commit d67362f into main Oct 6, 2026
15 checks passed
@btravers
btravers deleted the docs/readme-aggregate branch October 6, 2026 13:16

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

It is a documentation-only change whose every claim and code example I verified as accurate and consistent against the current source.

Review effort: Balanced
Findings: None

What changed in this PR

This documentation-only PR adds an Aggregates section to both the root README.md and packages/entity/README.md (the npm-facing one), introducing Entity.aggregate with a Subscription example that shows the two-call declaration form, emit returning a sealed decision (events, expectedVersion), and persistence via save(decision). It also corrects stale lines in the schema-member and field-flag tables so they match the current API.

I verified the technical content against the source:

  • The aggregate example matches aggregate.ts (two-call form, events/opens/evolve, emit/start/replay, make(row, { version }), decision.events/decision.expectedVersion), and the unbranded status: z.enum(...) field legitimately passes the OnlyNominal check (shape.ts).
  • updateInput is indeed derived from input minus immutable keys (entity.ts:144-147), so the output → input correction is accurate.
  • The new identity and unbranded flags exist and the descriptions are correct — identity implies immutable (field.ts:96).
  • The linked how-to/model-an-event-driven-aggregate page exists, and the two READMEs are mutually consistent.

Changes:

  • Added an Aggregates section (identical prose in both READMEs) documenting Entity.aggregate, decisions, and state-vs-event persistence.
  • Fixed stale schema-member lines: output is "pick a response by allowlist" and updateInput derives from input (not output).
  • Extended the field-flag documentation with identity and unbranded, and added the "model an event-driven aggregate" how-to link.
File Description
README.md Adds Aggregates section, corrects output/updateInput table rows, adds identity/unbranded flag rows, and links the new how-to.
packages/​entity/​README.md Mirrors the same Aggregates section, updateInput-from-input fix, flag-list prose update, and how-to link for the npm-visible README.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants