test(federation): AS2/JSON-LD validity guard — every emitted term must be declared
Builds the actor, a kitchen-sink note/Create and the collections via the real builders and
asserts every property key + type value is an AS2-core/security term OR declared in AP_CONTEXT.
A future feature that emits an undeclared term fails this test → declare it in AP_CONTEXT (or
the AS2 allowlist). Keeps Klonkt's output valid AS2/JSON-LD permanently — not just "Mastodon
tolerates it". node:test, in-memory SQLite, no extra deps. Run: npm test
- test/activitypub-as2.test.js (new)
Co-Authored-By: Claude <noreply@…>