Axel Meyer 8131f42ba0 test(api-discovery-test): add 3 assertions for tier=engine
Covers the new engine-tier validate_readme_structure behavior:
complete engine README, missing-API detection, and the relaxed Badges
pattern that accepts arbitrary bold key:value lines (engine has no
Lib-ID prefix).

Total assertion-count grows from 52 to 55. Coverage table updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 18:45:07 +02:00
2026-05-16 18:04:15 +02:00

lib-core.api-discovery-test

Test-lib for lib-core.api-discovery (Tests-as-Libs per ADR-0037).

Coverage Statement

Per Fault-Injection-Audit-Convention (2026-05-16):

Function Assertion-Count Coverage
parse_lua_surface 19 Happy-path (2 public + 1 private), empty-source edge, sugar-form (function M.foo), mixed-form (sugar + explicit), comment-stripping (commented stubs, inline-comment after code)
parse_readme_api 9 Standard H3-pattern, no-API-section edge, namespace-less function (e.g. run_tests), mixed namespaced + namespace-less
diff_surface 5 Equal (no diff), surface-superset (missing), doc-superset (stale)
grep_engine_calls 5 3 unique calls, no-calls edge
generate_topology_block 6 Lib-with-deps+engine, asset-lib (no deps, no engine)
validate_readme_structure 11 Complete core, missing-API core, missing-Topology, missing-Badges, community-tier-no-enforcement, engine-tier-complete, engine-tier-missing-API, engine-tier-naked-badges
TOTAL 55

Tested-Surface

  • All 6 public functions of lib-core.api-discovery v0.1.0.

Structurally Untestable

  • Idiomatic-edge: M.foo = function ... end mit Multi-Line-Body wird durch pattern-line-match abgedeckt; very-creative-patterns (z.B. dynamic _ENV[k] = function...) sind by-design out-of-scope.
  • Doc-quality (sind die Function-Descriptions akkurat?) — sentiment-level question, kein assertion-target.

Deferred

  • Mutation-Audit der Test-Lib selbst (analog 2026-05-16 Test-Coverage-Audit) — Folge-Slice.

Running

Wird automatisch via --test-libs=lib-core.api-discovery-test ausgeführt (Smoke P0-S-batch Stage).

Description
Test-lib for lib-core.api-discovery (Tests-as-Libs per ADR-0037)
Readme 63 KiB
Languages
Lua 100%