Skip to content

docs: domain model structural design + ADR-0006 (Story #3) - #5

Closed
jonathanstokes wants to merge 3 commits into
mainfrom
docs/domain-model-design
Closed

docs: domain model structural design + ADR-0006 (Story #3)#5
jonathanstokes wants to merge 3 commits into
mainfrom
docs/domain-model-design

Conversation

@jonathanstokes

Copy link
Copy Markdown
Contributor

Summary

The M0 structural design of the domain model (Epic #2, Story #3): docs/domain-model.md designs the object hierarchy from the Quad Cortex manual - Device, the Directory as a typed entry family, the Preset/Scene grid duality, polymorphic blocks, generic typed parameters, device-level feature objects, and assignments. An appendix maps every manual feature to a model surface or an explicit omission with a reason, annotated with protocol reachability from manual-coverage.md.

Also records ADR-0006 (the model takes the top-level namespace at M1; the protocol layer moves to pyquadcortex.protocol) and carries the previously-committed ADR-0005 (hardware-in-the-loop suite).

Changes

  • docs/domain-model.md (new): Part I structural design + full manual-feature appendix; Part II (behavior) is a stub that Story State tracking and save behavior designed and verified on hardware #4 fills
  • docs/ADR.md: ADR-0006 appended
  • docs/STEERING.md: ADR table row, pointer to the design doc, change log entries
  • Rides along: ADR-0005 (committed earlier, unpushed until now)

Test plan

  • Offline suite green (324 passed, 3 skipped) - docs-only change plus ADRs
  • Appendix cross-checked against manual-coverage.md; gaps in that audit are marked unaudited rather than guessed
  • Reviewer: hierarchy recognizable straight from the manual, no mapping table needed

Linked issues

A successful run puts back everything it changed; a failed run restores as
best it can and names what it could not. Separate from the offline suite,
never in CI. Open questions recorded: invocation mechanism, what state is
actually restorable, scratch slots.
The object hierarchy designed from the manual: Device, Directory entries
as a type family, the Preset/Scene grid duality, polymorphic blocks,
generic typed parameters, and a full manual-feature appendix mapping
every feature to the model or an explicit omission with reason.

ADR-0006: at M1 the model takes the top-level namespace and the protocol
layer moves to pyquadcortex.protocol.
…ing report

From the domain-model design session's hardware run, all nine items.

Transport (items 1-3): a read failure retries once and two in a row confirm
loss - the FIRST error after an unplug is a liar, carrying the same 0xE0005000
text as the benign write stall, while the second says "Device is disconnected".
DeviceLostError (bearing the second message) now raises from every transport
entry point, blocked waiters are woken to fail fast, and both background
threads wait quietly instead of spinning on a dead handle. The read/write
asymmetry is documented as the rule it is: 0 read errors and 91 write errors
over a healthy 145 s session, so which call raised is the only signal.

Client (items 4-5, both verified live this session): preset_dirty() answers in
2-11 ms and flips false across a save; RecallReason names RecallPreset.reason,
with host recalls carrying OTHER and a save's push carrying SAVE - measured
here, extending the report's characterisation by one value. UNDO remains
unobserved.

Docs (items 6-9): connect burst measured at ~9 s to the seed push; GlobalTempo
streams per-beat so its rate follows the tempo; a knob turn broadcasts ~40 Grid
messages; lock_screen_and_volume_knob noted in settings docs.

Offline tests simulate the exact unplug sequence: a lone blip is transient, two
failures surface the second message, a blocked request wakes on loss rather
than timing out, and the RX thread stays alive throughout.
@jonathanstokes

Copy link
Copy Markdown
Contributor Author

Superseded by #6.

Same design content, rebuilt on current main so the diff is docs-only. This branch carried a duplicate of the state-tracking protocol commit (9eda304), whose work has since shipped to main as fbb0e7d plus two corrections - so this PR's diff included protocol code it did not mean to change, and an older copy of it at that.

Nothing was lost in the rebuild. Every line unique to the duplicate was a superseded version of something main already has: the pre-correction DeviceLostError docstring, the old connect() signature without handshake_patience, a stale __version__, and the FileMessage.type open question that has since been answered and removed.

#6 carries this PR's Part I commit unchanged, with its original message and authorship, plus Part II (Story #4) and the resolution of Part I's forward references. The M0 gate review moves to #6, where the design is complete.

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