Skip to content

Commit 027f7e4

Browse files
committed
docs: close embedded GLB support
1 parent 7e93b92 commit 027f7e4

3 files changed

Lines changed: 53 additions & 34 deletions

File tree

NEXT.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ before when explicitly requested (`SYS-W14-##` rows).
104104

105105
## 2. Current status
106106

107-
- **Last full build: clean after the current Phase 13 File-open-recent,
108-
View-Bloom/SSAO, SSAO-regression, Camera Preset Overlay, Gizmo Drag Overlay, Stats Overlay, Measurement Overlay, and Status Bar slices.** Testing is enabled in the current Ninja Release tree, and
107+
- **Last full build: clean after `SYS-W14-05` embedded GLB support.** Testing is enabled in the current Ninja Release tree, and
109108
`CCACHE_DISABLE=1 cmake --build b-release -j4` linked all targets successfully
110109
on EASYGL. Alternate-backend runtime qualification remains blocked.
111-
- **Tests:** the fresh Release tree registers 182 tests. All passed again after
112-
the current Phase 13 slices in two
113-
disjoint groups: 147/147 non-render tests and 35/35 render-labelled tests
114-
under Xvfb (with local loopback/X11 socket access). SVG-specific
110+
- **Tests:** the fresh Release tree registers 183 tests. All passed after
111+
`SYS-W14-05` in two disjoint groups: 147/147 non-render tests and 36/36
112+
render-labelled tests under Xvfb (with local loopback/X11 socket access).
113+
The new export test creates an external and inline GLB at runtime and checks
114+
its flattened geometry; the new screenshot test proves the viewport loads
115+
that same embed without falling back to a placeholder. SVG-specific
115116
verification passes with `-j4`: external and inline SVG export to glTF PNGs,
116117
bounded/malformed input, cache invalidation, and real headless viewport
117118
screenshots sampling the rasterized material pixels. This session's own
@@ -121,7 +122,7 @@ before when explicitly requested (`SYS-W14-##` rows).
121122
count this file last recorded (2026-07-19) predates unrelated work not
122123
narrated here (a further audit pass and the `SYS-W14-18..27`
123124
mc3-format-vs-editor gap closures — see `plan.md`/memory, not fully
124-
reflected in this file's own history) — don't treat 142→182 as this
125+
reflected in this file's own history) — don't treat 142→183 as this
125126
session's own delta.
126127
All builds/tests this session used at most `-j4` (never `-j$(nproc)`), per
127128
the user's standing request (shared machine).
@@ -652,12 +653,12 @@ backlog (650+ STAB tasks, then a 57-finding audit, all archived DONE).
652653

653654
## 4. Current blocker / main problem
654655

655-
**The current Phase 13 slice has a clean full Release build and complete test
656-
verification.** `AUD-090` preflights `xvfb-run` with a real `xdpyinfo` client.
656+
**The current `SYS-W14-05` slice has a clean full Release build and complete
657+
test verification.** `AUD-090` preflights `xvfb-run` with a real `xdpyinfo` client.
657658
The execution sandbox blocks the local sockets needed by Xvfb and the
658659
`mc3_ai` loopback mock server, but the permitted host run completed both
659-
partitions cleanly: 147/147 non-render tests (including `mc3_ai` in 1.27
660-
seconds) and 35/35 render tests. CI explicitly installs `xvfb` and
660+
partitions cleanly: 147/147 non-render tests (including `mc3_ai` in 1.28
661+
seconds) and 36/36 render tests. CI explicitly installs `xvfb` and
661662
`x11-utils` for the same render path. `AUD-091` therefore remains closed as
662663
a stale-build false positive rather than hidden behind a longer timeout.
663664

@@ -685,8 +686,9 @@ path still requires CNA/backend validation.
685686
attributes/elements on round-trip (`SYS-W5-03`, human-decided,
686687
documented in `MC3_FORMAT.md`); editor/exporter use different triangle
687688
winding deliberately; undo history is a bounded 20-entry stack
688-
(`AUD-038`); `embed:` mesh references aren't resolved on export
689-
(`AUD-025`, deferred).
689+
(`AUD-038`). Embedded self-contained GLB meshes are supported; loose glTF
690+
companion-file assets and other unsupported embedded-asset features are
691+
explicitly rejected with a warning (see `SYS-W14-05`).
690692

691693
## 6. Architecture notes
692694

@@ -859,8 +861,8 @@ git stash pop && cmake --build b-release -j4 --target <affected-target>
859861
No actionable follow-up audit task remains: `AUD-089` through `AUD-092` are
860862
complete. Android (`AUD-042`) remains environment-blocked, but is now an
861863
explicit supported-platform goal rather than a possible rejection path.
862-
`SYS-W3-01` has 12 completed subsystem phases and an active Phase 13 for
863-
application/UI ownership. The authorized Camera Bookmarks, Camera Preset Overlay, Gizmo Drag Overlay, Stats Overlay, Measurement Overlay, Status Bar, Walk Mode, View
864+
`SYS-W3-01` has 12 completed subsystem phases; its Phase 13 application/UI
865+
ownership work is deferred by user priority. The completed Camera Bookmarks, Camera Preset Overlay, Gizmo Drag Overlay, Stats Overlay, Measurement Overlay, Status Bar, Walk Mode, View
864866
Bloom/SSAO, Help, Add/CSG, Edit-history, Edit-clipboard, and Edit-object-actions
865867
menu slices are implemented and verified, together with Edit-selection-actions,
866868
Edit-select-by-type/tag/material, Edit-copy-properties, Edit-grouping,
@@ -1139,11 +1141,11 @@ be a separately scoped subsystem, not another mechanical `Overlays.cpp` slice.
11391141

11401142
### Current authorized work
11411143

1142-
- **SYS-W14-05:** embedded external/inline GLB support is implemented and
1143-
under final validation. It safely accepts self-contained triangle GLBs only,
1144-
with a 64 MiB / 300,000-triangle ceiling; MC3 materials remain authoritative.
1145-
- **SYS-W14-06:** improved CSG normals/UVs/materials is the next authorized
1146-
task once the `SYS-W14-05` validation/commit is complete.
1144+
- **SYS-W14-05:** complete in commit `7e93b92`: embedded external/inline GLB
1145+
support accepts self-contained triangle GLBs only, with a 64 MiB /
1146+
300,000-triangle ceiling; MC3 materials remain authoritative.
1147+
- **SYS-W14-06:** improved CSG normals/UVs/materials is the current authorized
1148+
next task.
11471149

11481150
### Tracked work that is not implementation-ready
11491151

TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ctest --print-labels # list all labels
3131
ctest --rerun-failed --output-on-failure
3232
```
3333

34-
Expected result: every registered test passes. On 2026-07-26 the fresh Release build reported 183 registrations; the new embedded-GLB export and viewport tests passed after a host configure/build. The preceding complete run passed 147/147 with `-LE render` and 35/35 with `-L render`; re-run both partitions after this change for the final 147/147 + 36/36 confirmation. The focused suites are run with at most `-j4` after each change. A failing test prints its assertion/subprocess output inline with `--output-on-failure`; without that flag, CTest only shows pass/fail per test name.
34+
Expected result: every registered test passes. On 2026-07-26 the fresh Release build reported 183 registrations and passed all of them as two disjoint host runs: 147/147 with `-LE render` and 36/36 with `-L render` under Xvfb. The focused suites are run with at most `-j4` after each change. A failing test prints its assertion/subprocess output inline with `--output-on-failure`; without that flag, CTest only shows pass/fail per test name.
3535

3636
Each C++ test binary can also be run directly (bypassing CTest) for faster iteration:
3737

plan.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ P1s already being fixed in git history. This session:
8787
**Net across all 35 AUD-### rows remaining in this active backlog (61
8888
additional rows completed and archived to `docs/history/plan_20260718.md`
8989
on 2026-07-18 — see that file for their full evidence/resolution text):
90-
32 DONE, 1 TODO, 2 DEFERRED** — 10 of the 32 DONE (`AUD-064` through
90+
33 DONE, 1 TODO, 1 DEFERRED** — 10 of the 33 DONE (`AUD-064` through
9191
`AUD-073`) are fresh findings from a 2026-07-18 (later same day)
9292
independent re-audit, not part of the original 6 (`AUD-069` itself fixed
9393
2026-07-19, the day after it was filed); the other 14 (`AUD-074`
@@ -1119,11 +1119,15 @@ portable through CNA rather than merely hiding its OpenGL dependency.
11191119
CNA exposes no mip-chain generation for pixel-created textures. Added
11201120
malformed/capped-dimension, cache-invalidation, inline viewport, and GLB
11211121
coverage. **Resolved:** commits `8cb14be`, `026fc2d`.
1122-
- **SYS-W14-05** `[IN_PROGRESS, user-authorized 2026-07-26]` `P3` — Safe
1123-
`embed:` mesh/resource support end-to-end. (`AUD-025`) External
1124-
self-contained GLB and inline base64 GLB now resolve through a shared,
1125-
bounded loader in both exporter and viewport; final whole-suite validation
1126-
and status closure follow this implementation slice.
1122+
- **SYS-W14-05** `[DONE]` `P3` — Safe `embed:` mesh/resource support
1123+
end-to-end. (`AUD-025`) External self-contained GLB and inline base64 GLB
1124+
resolve through a shared, bounded loader in both exporter and viewport. It
1125+
flattens default-scene transforms, retains MC3 material ownership, rejects
1126+
companion-file/unsupported GLB features explicitly, and caps source data at
1127+
64 MiB / 300,000 triangles. `mc3togltf_embed_mesh_source` proves external
1128+
and inline export plus node-transform flattening; `embed_mesh_viewport_test`
1129+
proves actual CNA viewport rendering. Full Release validation passed
1130+
147/147 non-render and 36/36 render tests. **Resolved:** commit `7e93b92`.
11271131
- **SYS-W14-06** `[TODO, user-authorized 2026-07-26]` `P3` — Improved CSG
11281132
output (smooth normals/UVs/materials). Next coherent feature slice after
11291133
`SYS-W14-05` validation.
@@ -2009,13 +2013,26 @@ the audit's own initial P1/P2 "visibly double-applied" framing to P2
20092013
"dead/incorrect code" after direct empirical investigation found zero
20102014
actual pixel difference — see its own row for the full story.
20112015

2012-
### AUD-025 `[DEFERRED]` `P2` `W7` · embed: mesh source is treated as a literal OBJ path — node exports with no mesh while export exits 0 'Written'
2013-
- **Component:** mc3togltf/src/GltfExporter.cpp buildMesh()
2014-
- **Evidence:** GltfExporter.cpp:586-593: `if (obj.type == ObjectType::Mesh && !obj.meshSource.empty()) { try { md = loadObjMesh(ctx.basePath, obj.meshSource); } catch (...) { std::cerr << Warning ...; ctx.stats.warnings++; return -1; } }`. The exporter never checks for the `embed:<id>` form the mc3 parser/writer round-trip (Mc3XmlParser.cpp:743-749). `loadObjMesh` tries to open a file literally named 'embed:tree', fails, warning printed, node gets no mesh. main.cpp:93 then prints 'Written:' and returns 0. Documented (MC3_FORMAT.md, STAB-0194/0549) and a warning + stats.warnings signal it, so not fully silent — but the tool still reports success with dropped geometry.
2015-
- **Outcome:** Resolve embed:<id> against doc.embeds (parse the referenced/inline GLB and merge its meshes), or make the missing-geometry case a non-zero exit / clearer failure rather than 'Written' success.
2016-
- **Tests:** The existing embed_mesh_source_test.py locks in the degraded behavior; add resolution or assert a distinct exit/status when geometry is dropped.
2017-
- **Verify note:** Evidence is accurate; no correction needed. Severity P2 is appropriate: the geometry loss is signalled by a stderr Warning and the stats.warnings counter (only shown with --show-stats), and the behavior is documented in MC3_FORMAT.md and locked in by a passing test (mc3togltf/test/embed_mesh_source_test.py, STAB-0549) that asserts exit 0 + warning + empty node is the intended, accepted limitation. It is therefore a low-severity known limitation rather than a silent data-loss bug, but the core claim (tool reports 'Written'/exit 0 while dropping the embed:-referenced mesh) is factually correct.
2018-
- **Status note:** Existing embed_mesh_source_test.py locks in the current documented-limitation behavior (exit 0 + warning + empty node); the adversarial re-verify pass judged this an accepted limitation, not a defect requiring a code change. Left TODO-eligible for W14 embed: resolution work (SYS-W14-05).
2016+
### AUD-025 `[DONE]` `P2` `W7` · Resolve `embed:` mesh sources instead of dropping geometry during export
2017+
- **Component:** `mc3togltf/src/MeshBuilder.cpp` shared GLB loader,
2018+
`GltfExporter.cpp` and `SceneRenderer.cpp` consumers.
2019+
- **Evidence:** `embed:<id>` was preserved by the MC3 parser/writer but the
2020+
exporter handed it to the OBJ loader as a literal filename, warning and
2021+
emitting a meshless node while returning success.
2022+
- **Outcome:** Resolve the id through `doc.embeds`; safely load either an
2023+
external self-contained `.glb` or inline base64 GLB; flatten its default
2024+
scene's triangle geometry and transforms into `MeshData`; then use the same
2025+
data in both export and CNA viewport upload. MC3 material assignment remains
2026+
authoritative. Loose `.gltf` companion resources, non-triangle primitives,
2027+
animation/skin/morph data, singular transforms, malformed accessors, and
2028+
assets exceeding 64 MiB/300,000 triangles fail with a named warning rather
2029+
than silently producing a partial import.
2030+
- **Tests:** Replaced the former degraded-behaviour test with external and
2031+
inline GLB export checks that inspect the resulting transformed positions;
2032+
added `embed_mesh_viewport_test`, a real screenshot test that proves the
2033+
viewport did not fall back to its placeholder. Full Release CTest passed
2034+
147/147 non-render + 36/36 render.
2035+
- **Resolved:** commit `7e93b92` — verify: `ctest -R 'mc3togltf_embed_mesh_source|embed_mesh_viewport_test' --output-on-failure`.
20192036

20202037
### AUD-038 `[DEFERRED]` `P3` `W9` · Undo history is a bounded 20-entry whole-document deep-copy stack; oldest entries are silently dropped (informational — answers the audit question, by-design)
20212038
- **Component:** include/MeshCraft/MeshCraftApplication.hpp, src/MeshCraft/MeshCraftApplication_Commands.cpp

0 commit comments

Comments
 (0)