Architecture decision record · ADR-0011

Change tracking compares local and remote raw values

A shape keeps no change log.

Status
Accepted
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

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() and rollback(path?) compare the local raw value with the remote raw value at each path, with each codec equals.
  • 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 }. kind is set, add, remove or move. A leaf gives its hydrated values. A whole shape or member gives raw JSON. A move gives 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, remove and move change 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.

QuestionAnswerSource
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

DateAuthorChange
2026-12-01Joe GaudetStatus in the Markdown file: Accepted (M3). This is the Tracked API of plan section 4.5.
2026-12-01Joe GaudetCommit 0a16254: Build Millwork 1.0 (#1)
2026-12-04Joe 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.