Files
zhuyuanbin.gdut 1f7c23788a feat(slides): gate all edit commands through the xml_lint linter
Run the slides XML linter (skills/lark-slides/scripts/xml_lint.py) as a
pre-submit gate on every edit command. The linter runs in-process via a
CPython-3.12 interpreter compiled to wasm32-wasi and executed by wazero:
no system Python, no cgo, no on-disk extraction. The interpreter (stdlib
frozen in), the unmodified lint scripts and the schema/iconpark data are
embedded and mounted read-only; slide XML goes in on stdin and the JSON
verdict comes back on stdout. Verdicts are byte-identical to native python3.

Wiring:
- +update-slide / +add-slide      lint the full page before submit
- +create / +replace-pages        batch-lint all pages in one interpreter run
- +replace-slide                  lint each new/changed element (schema +
                                  out-of-canvas); full-page overlap needs the
                                  merged page, use +update-slide for that
- level=error blocks the edge; warnings are surfaced, not blocking
- --no-lint per command, or LARKSUITE_CLI_SLIDES_LINT=off globally, bypasses
- fail-open on engine errors (a gate defect never blocks a legit edit)

The wazero compile of the 26MB wasm (~3s) is cached under
GetConfigDir()/cache/slides-lint-wasm/<version>; the wasm is gunzipped in
memory only. internal/slideslint carries the engine + tests; the shortcut
package has a wiring regression test.
2026-08-14 16:49:45 +08:00
..