Record AttributeDefinition coverage status

This commit is contained in:
Felix Riestra committed 2026-09-19 12:48:36 +02:00
1 parent 5b854bd121
commit 5ef7000b67
2 files changed
+8 -4

No files matched your search

+6 -2
View File
@@ -4,7 +4,7 @@
Build a general Python document model over the OCS host API for all **43 canvas kinds**. A kind is **complete** only after the per-kind gate below passes. Merely appearing in a converter or allowing a `layer` edit is partial coverage. Keep a property-level record of read/write, read-only, snapshot-only, and unsupported fields in the [43-kind coverage ledger](plugin-host-model-coverage-ledger.md). Do not resume the separate Lisp-to-Python conversion work.
As of 19 September 2026, the OCS fork branch `plugin/host-model-api` is pushed at `db61379b` in `felixriestra/OpenCADStudio`; the PandoraBox adapter on `main` is pushed at `d0cc85e` in `felixriestra/PandoraBox`. Host API is v7. The Python feature has mapped writes for 16 initial geometry kinds plus **update-only** `Insert`; this is **not** 17 completed kinds. The other 26 canvas kinds have only `layer` writes through the document model. All 43 have raw typed snapshots. There are three internal records and two opaque fallbacks outside the 43 canvas kinds.
As of 19 September 2026, the current AttributeDefinition increment is OCS commit `5b854bd1` on `plugin/host-model-api` and PandoraBox commit `bb259ff` on `main`. Host API is v7. The Python feature has explicit writes for **20 of 43** canvas kinds: 19 are creatable and `Insert` remains update-only. This is **not** 20 completed kinds: only Tolerance and Shape pass every completion gate. AttributeDefinition passes its host and real IPC lifecycle but remains short of `Complete` because the pinned acadrust DXF reader drops optional ATTDEF fields. The other 23 canvas kinds have only `layer` writes through the document model. All 43 have raw typed snapshots. There are three internal records and two opaque fallbacks outside the 43 canvas kinds.
Repositories:
@@ -93,7 +93,7 @@ The last five may require new engine capabilities rather than only Python conver
## Handoff start point
Start with the **Phase 8 integration harness and coverage ledger**. Re-evaluate the existing 17 mapped kinds against the strict completion gate. Then take `Tolerance` as the first new kind, unless its required style or persistence path is blocked; record that and proceed to `Shape`. Keep the exact remaining-kind table above as the queue and update statuses with evidence after each increment.
Continue with **AttributeEntity**, using the existing block fixture and new creation-time `owner_handle` support. Its owner must be a real linked `Insert`, and the test must preserve sequence/attribute references through edit, deletion, undo/redo and both file formats. AttributeDefinition is mapped and integration-tested but remains open at W: pinned acadrust `568a12c` loses optional ATTDEF fields such as width factor on DXF read. Do not mark it complete until that dependency is fixed and the full property state passes DXF save/reopen. Keep the exact remaining-kind table above as the queue and update statuses with evidence after each increment.
## Phase 8 progress log
@@ -109,3 +109,7 @@ Start with the **Phase 8 integration harness and coverage ledger**. Re-evaluate
- `staged_python_tolerance_lifecycle_over_real_ipc` passes the full C/R/E/D/U/I/W/V/P gate with the actual runner: high-level create/read/transaction edit/delete, live canvas selection, undo/redo, invalid direction and missing style rollback, untouched-field preservation, and DWG/DXF reopen. Tolerance is recorded as **Complete** in the ledger. The queue now continues with `Shape`.
- Closed `Shape` with a generated SHX fixture and a real shape-file `TextStyle`. Host-owned binding resolves the Python style name to the stable table handle required by DWG; validation rejects missing/non-shape styles and invalid geometry. The adapter maps all stable shape fields and keeps the bound style handle read-only.
- `staged_python_shape_lifecycle_over_real_ipc` passes C/R/E/D/U/I/W/V/P through the actual runner, checks the real SHX linework before and after DWG/DXF reopen, and proves that invalid size/style edits remain atomic. The DXF renderer fallback now searches named `is_shape_file` styles as well as legacy unnamed styles. Shape is **Complete**; the queue now continues with `AttributeDefinition`.
- Added creation-time `owner_handle` to the generated document-model adapter. It is present in snapshots and accepted by `doc.create_entity`, but rejected after creation; host transactions independently reject owner changes. Generic host validation now requires a non-null canvas owner to resolve to a block record, except `AttributeEntity`, whose owner may be an `Insert`.
- Mapped stable AttributeDefinition fields and validated tag, placement, normal, height, width, angles, text style, line count and block ownership. `embedded_mtext` stays snapshot-readable but unmapped so partial Python edits preserve its linked R2018+ layout payload.
- `staged_python_attribute_definition_lifecycle_over_real_ipc` passes the real create/read/edit/delete/undo/selection/render/validation/portable-build path using a structurally valid block and linked Insert. Full DWG state and core DXF geometry survive reopen; deletion stays absent after both formats. OCS also stopped double-converting ATTDEF/ATTRIB DXF rotation already converted by acadrust.
- AttributeDefinition remains **Integration-tested / DXF blocked**, not Complete: acadrust `568a12c`'s ATTDEF DXF reader does not restore optional AcDbText fields including width factor. The real test and ledger record that exact W-gate gap. The queue now continues with `AttributeEntity`.
+2 -2
View File
@@ -1,6 +1,6 @@
# OCS canvas kind coverage ledger
Use with [the completion plan](plugin-host-model-completion-plan.md). This ledger is current as of 19 September 2026: **19 of 43 canvas kinds have explicit geometry writes** (18 creatable, plus update-only `Insert`), **2 kinds are complete**, and 24 remain layer-only. `Mapped` means at least one non-layer field is exposed for Python writes; it does **not** mean the kind passes the completion gate. `Update-only` means Python creation is unavailable. `Layer-only` means raw inspection and canvas layer edits exist, but geometry is not mapped. Record actual evidence or a blocking issue before changing any status to `Complete`.
Use with [the completion plan](plugin-host-model-completion-plan.md). This ledger is current as of 19 September 2026: **20 of 43 canvas kinds have explicit geometry writes** (19 creatable, plus update-only `Insert`), **2 kinds are complete**, and 23 remain layer-only. `Mapped` means at least one non-layer field is exposed for Python writes; it does **not** mean the kind passes the completion gate. `Update-only` means Python creation is unavailable. `Layer-only` means raw inspection and canvas layer edits exist, but geometry is not mapped. Record actual evidence or a blocking issue before changing any status to `Complete`.
Completion gate codes: **C** = create through Python document model; **R** = read; **E** = edit defining geometry and another property; **D** = delete; **U** = undo/redo and atomic failure; **I** = real IPC plus GUI/canvas pick or observable behavior; **W** = DWG and DXF save/reopen; **V** = invalid-input checks and untouched-field/reference preservation; **P** = portable H7 v5 build. A kind is `Complete` only when **C/R/E/D/U/I/W/V/P** all pass and its property catalog matches implementation. `Blocked` requires a specific dependency or failing fixture.
@@ -25,7 +25,7 @@ Completion gate codes: **C** = create through Python document model; **R** = rea
| Insert | Update-only | Transform transaction and undo tested; Python creation, deletion, real IPC/GUI and DWG/DXF gates pending. |
| Tolerance | **Complete** | `staged_python_tolerance_lifecycle_over_real_ipc` passes C/R/E/D/U/I/W/V/P with the staged API v7 plugin: high-level create/read/transaction edit/delete; insertion, direction, and text edits; live canvas selection; grouped undo/redo; invalid direction and missing style atomic rollback; exact untouched common/style/private-field preservation; and edited DWG plus DXF reopen. Host-owned coverage exposes placement, direction, normal, text, style name, height and gap; style handle is read-only and the undocumented DWG short remains unmapped. `tolerance_geometry_and_style_references_are_validated` and the existing Tolerance tessellation tests cover reference and rendered-frame behavior. |
| Shape | **Complete** | `staged_python_shape_lifecycle_over_real_ipc` passes C/R/E/D/U/I/W/V/P with a generated parser-valid SHX file and a real shape-file `TextStyle`: high-level create/read/transaction edit/delete; insertion, size, rotation and width-factor edits; live canvas selection; grouped undo/redo; invalid size and missing style rollback; exact identity/style/common-field preservation; and DWG plus DXF reopen. Each live and reopened document renders the three-point SHX glyph rather than the placeholder. Host-owned reference binding writes the stable style handle needed by DWG. The DXF fallback now searches all `is_shape_file` styles, preserving named-style glyph resolution after reopen. |
| AttributeDefinition | Layer-only | Requires block-definition fixture. |
| AttributeDefinition | **Integration-tested / DXF blocked** | Host commit `5b854bd1` and adapter commit `bb259ff` map block ownership plus every stable ATTDEF field except the nested `embedded_mtext` payload, which is snapshot-readable and preserved untouched. `staged_python_attribute_definition_lifecycle_over_real_ipc` passes C/R/E/D/U/I/V/P with a real block record, Block/BlockEnd markers and linked Insert: high-level creation inside the block, readback, grouped placement/default/rotation/width edits, selection, render text, atomic tag/height/style/owner rejection, deletion persistence, and three-step undo/redo. DWG reopens with the full edited state. DXF reopens identity, ownership, tag, prompt, value, placement, height and rotation, and OCS no longer double-converts ATTDEF/ATTRIB rotation. **W remains open** because pinned acadrust `568a12c` drops optional ATTDEF fields including width factor while reading DXF; the regression test keeps this limitation explicit. `embedded_mtext` mutation also remains unsupported pending linked-layout validation. |
| AttributeEntity | Layer-only | Requires linked Insert and attribute-sequence fixture. |
| Hatch | Layer-only | Requires valid boundary and pattern fixtures. |
| Leader | Layer-only | Requires annotation-linked fixture. |