Architecture decision record · ADR-0011
Change tracking compares local and remote raw values
A shape keeps no change log.
Context
Not recorded in the original ADR.
Decision drivers
Not recorded in the original ADR.
Options considered
Not recorded in the original ADR.
Decision
- A shape keeps no change log.
isDirty,changes()androllback(path?)compare the local raw value with the remote raw value at each path, with each codecequals. - A path names fields, and a shape array member by its key (or by its index when there is no key).
changes()gives{ kind, path, from, to }.kindisset,add,removeormove. A leaf gives its hydrated values. A whole shape or member gives raw JSON. Amovegives the key lists.rollback(path)restores the remote value at that path. For a removed member, it puts the member back at its remote index.rollback()writes the remote raw reference.- A shape array is a frozen array.
add,removeandmovechange it through the owner.
Consequences
- The record API (
rollbackAttributes(),commit()) and a server push cannot get out of step with Millwork: there is no second state. - The key of a shape array member must not change while the member is edited.
subscribe(plan 4.5) is not built. Signals give reactivity in Ember.
Confirmation
Evidence
packages/core/tests/shapes/tracked.test.ts,packages/warp-drive/tests/shapes.test.ts
Interview record
Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.
| Question | Answer | Source |
|---|---|---|
| Where does the text of this page come from? | From the Markdown file docs/adr/0011-change-tracking.md at commit c8154b0. The text of each section is the text of the Markdown file. A section that the Markdown file does not have says so. | Document: docs/adr/0011-change-tracking.md |
Changelog
| Date | Author | Change |
|---|---|---|
| 2026-12-01 | Joe Gaudet | Status in the Markdown file: Accepted (M3). This is the Tracked API of plan section 4.5. |
| 2026-12-01 | Joe Gaudet | Commit 0a16254: Build Millwork 1.0 (#1) |
| 2026-12-04 | Joe Gaudet (agent) | Converted from docs/adr/0011-change-tracking.md to this page. The text is the text of the Markdown file. |
The adr skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.