McRogueFace/docs
John McCardle 16adc92995 Add public API-surface snapshot regression test; lock #314 freeze decisions
Phase 1 of the #314/#313 plan (docs/plan-313-314.md): commit a deterministic
full-public-API-surface snapshot as the regression net BEFORE the #313
UIEntity::grid -> GridData refactor, so that refactor reduces to a reviewable diff.

tests/unit/api_surface_snapshot_test.py enumerates the complete public mcrfpy
surface (exported types' methods/properties with docstring-derived type + ro/rw,
12 enums with int values, module functions, singletons, the automation submodule)
and diffs it against tests/snapshots/api_surface.golden.txt. Re-baseline with
MCRF_UPDATE_API_SNAPSHOT=1.

Key design points (verified against source + live introspection):
- mcrfpy.Grid IS mcrfpy.GridView and delegates its real API to an internal
  _GridData via tp_getattro -- invisible to dir(). The test walks grid.grid_data
  AND probes delegation integrity on a live instance (69/69 members resolve).
- Behavioral writability probes compensate for docstring-derived ro/rw inference.
- Every exported class is classified FROZEN vs EXPERIMENTAL; the snapshot captures
  the classification so future additions force a deliberate freeze decision.

Freeze decisions recorded in docs/api-audit-2026-04.md:
- F3: grid_pos is the canonical cell-position name (matches the constructor kwarg);
  cell_pos/cell_x/cell_y documented as aliases. Docstrings aligned in UIEntity.cpp.
- F12: deprecated set_scale KEPT in the 1.0 surface (removal would be a new break).
- automation camelCase EXEMPT from the snake_case rule.
- EXPERIMENTAL (exempt): 3D/Voxel, Tiled/LDtk import, Shader, binding helpers.
- FROZEN: core UI/Grid/Entity/value types, enums, procgen (BSP/HeightMap/
  NoiseSource/DijkstraMap/AStarPath), Drawable (root).

Doc/stub regeneration and the entity.texture addition are deferred to Phase 2
(the #313 refactor). Addresses #314.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:51:02 -04:00
..
cookbook Cookbook: draft docs 2026-01-13 19:42:37 -05:00
stubs Fix #161: Update Grid, GridPoint, GridPointState stubs to match current API 2026-01-21 21:47:26 -05:00
templates draft tutorial revisions 2026-01-03 11:01:10 -05:00
tutorials Update all 13 tutorial scripts to current enum-based API, refs #167 2026-04-09 23:23:35 -04:00
api-audit-2026-04.md Add public API-surface snapshot regression test; lock #314 freeze decisions 2026-06-10 07:51:02 -04:00
api_reference_complete.html docs: Add complete API reference documentation 2025-10-23 13:19:36 -04:00
API_REFERENCE_COMPLETE.md Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
api_reference_dynamic.html Regenerate docs and stubs after API freeze pass 2026-04-18 13:35:26 -04:00
API_REFERENCE_DYNAMIC.md Regenerate docs and stubs after API freeze pass 2026-04-18 13:35:26 -04:00
EMSCRIPTEN_RESEARCH.md First successful Emscripten/WASM build for #158 2026-01-31 00:34:11 -05:00
ISSUE_TRIAGE_2026-04.md Fix outdated CLAUDE.md WASM audio entry; update triage notes 2026-04-20 14:37:48 -04:00
mcrfpy.3 Regenerate docs and stubs after API freeze pass 2026-04-18 13:35:26 -04:00
PROCEDURAL_GENERATION_SPEC.md HeightMap: core class with scalar operations (closes #193) 2026-01-11 20:07:55 -05:00
WASM_TROUBLESHOOTING.md Add WASM developer troubleshooting guide, closes #240 2026-04-10 03:31:43 -04:00