Architecture decision record · ADR-0009

Millwork finds the store of a checkout copy

The adapter learns the store of each resource key from each record that storeFor knows.

Status
Accepted
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

Context

A shape and a valueField need the remote raw value of the field: for dirty state, rollback, and the equals check that clears a change. The adapter gets it from storeFor(record).cache.getRemoteAttr(...). A Polaris checkout copy is not in the storeFor map (WarpDrive 5.9.1, _CHECKOUT), and WarpDrive has no public link from the copy to its store.

Decision drivers

Not recorded in the original ADR.

Options considered

Not recorded in the original ADR.

Decision

  • The adapter learns the store of each resource key from each record that storeFor knows.
  • @millwork-ts/warp-drive exports checkout. It learns the store of the immutable record, then calls the WarpDrive checkout.
  • When the store is not known, a shape throws an error that names the Millwork checkout. A valueField write then does not clear an equal change. It does not throw.

Consequences

  • A Polaris app uses checkout from @millwork-ts/warp-drive. The WarpDrive checkout works when the app read the immutable record before.
  • If WarpDrive adds a public link from a copy to its store, this ADR can change.

Confirmation

Evidence

  • packages/warp-drive/tests/shapes.test.ts (the test with the WarpDrive checkout).

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/0009-checkout-store.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/0009-checkout-store.md

Changelog

DateAuthorChange
2026-12-01Joe GaudetStatus in the Markdown file: Accepted (M2).
2026-12-01Joe GaudetCommit 0a16254: Build Millwork 1.0 (#1)
2026-12-04Joe Gaudet (agent)Converted from docs/adr/0009-checkout-store.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.