Files
FreeCADWasmDev/docs/current/techdraw-selected-business-checkpoint.md

78 lines
4.4 KiB
Markdown

# TechDraw selected business checkpoint
Batch: `cbe20bf10e26216e27b81ccd`. Selected IDs remain ActiveView, ArchView,
BrokenView and ClipGroup, all under `TechDraw:desktop:` with the `TechDraw_` prefix.
## Changes in this continuation
- `web/src/workbench-shell.tsx`: include TechDraw in the module list that forwards
`preparedDesktopArgs` into `desktopCommands.execute`. The shell already obtains
the ActiveView viewport capture before dispatch; previously its prepared image
arguments were discarded at this merge.
- `tools/techdraw-browser-cases.mjs`: assert that viewport capture for
`ForeignDocument` is rejected, and retain this observation in each successful
insertion case. Assert the cancellation response envelope before accessing its
records so the actual failure is reported rather than a TypeError.
- No acceptance contract, verifier, acceptance runner, passing statuses or IFC
semantic requirements were edited. No build, deployment or push was performed.
## Attributable execution
Executed the acceptance runner twice for the isolated selected ActiveView ID:
`python3 tools/run_business_acceptance.py --module TechDraw --ids TechDraw:desktop:TechDraw_ActiveView`
First evidence:
`docs/current/business-evidence/626207e84836c1406cd7c8df-20260917T133949499958.json`
(6.666 seconds): browser cancellation attempted to access an absent result.
Latest evidence:
`docs/current/business-evidence/626207e84836c1406cd7c8df-20260917T134030805946.json`
(6.976 seconds): **acceptance_incomplete; zero passed IDs**. After improving the
assertion, the exact browser cancellation response is:
```json
{"schema":"freecad-web-facade/v1","version":1,"kind":"error","requestId":"module-techdraw-11","error":{"code":"native_protocol_error","message":"TechDraw native error is missing its code or message","diagnostic":{"index":0,"apiId":"TechDraw:desktop:TechDraw_ActiveView"}}}
```
The browser reaches this failure after two geometry variants have passed the
existing insertion assertions: nonblank captures, native document/page identity,
exact image embedded in SVG, exact SVG persisted to OPFS, expected object counts,
different captures after geometry edits, and the new foreign-document capture
rejection. This is partial progress only; the browser report does not finish and
the ID is not accepted. Native cases preceding the browser also completed.
## Next action and boundaries
1. Isolate browser cancellation `{documentId:"ActiveViewBrowser",action:"cancel"}`
through the TechDraw Python-family facade/worker. Inspect cancellation status
handling in `web/src/techdraw-python-family-facade.ts` and the corresponding
native result. Native ActiveView cancellation succeeds in the preceding direct
native cases, so first check whether the browser facade incorrectly validates
a cancelled record as an error. Do not manufacture success or weaken semantic
response checks. Fix the owning application protocol implementation.
2. Rerun only ActiveView through the acceptance runner after that repair. The
foreign-selection and final viewport screenshot checks after cancellation
have not yet executed successfully in this continuation.
3. ArchView, BrokenView and ClipGroup still need executable native/browser cases
and acceptance. Existing native source contains ArchView and BrokenView paths;
their presence is not proof of completion. ClipGroup implementation was not
inspected beyond the selected packet metadata in this continuation.
4. Packet acceptance setup lists all four IDs as missing declared coverage. The
isolated acceptance runner nevertheless executes ActiveView's existing cases.
This continuation leaves coverage declarations untouched.
The four supplemental source windows used this turn were:
`tools/techdraw-business-cases.mjs:297` (100 lines),
`tools/techdraw-browser-cases.mjs:64` (100 lines),
`tools/techdraw-business-cases.mjs:398` (60 lines), and
`web/src/techdraw-desktop-adapter.ts:1` (100 lines).
No further source windows were read. Continue with new bounded windows rather
than bypassing the source policy. The packet remains
`docs/current/module-implementation-packet.json`.
Preserve all original and supplemental requirements, including the unchanged
IFC semantic export contract. Reuse supplied WASM/local sources; only focused
build/sync/tests are authorized. Do not run full-parity/API gates or edit proof
machinery or passing statuses. No deployment, pushes or external messages.