Phase 2B.2 of the convention pass. Closes the inconsistency where
arts/aapp used APP_* prefix while libs/aapp already used AAPP_*.
After this commit every constant under arts/aapp and libs/aapp uses
the canonical 4-letter alias `AAPP_` (rule 1 of docs/conventions.md).
Constants renamed (~24 total):
- APP_EVENT_* → AAPP_EVENT_* (the 6 public events)
- APP_USER_IDENTITY_CAUSE_* → AAPP_USER_IDENTITY_CAUSE_*
- APP_ORCHESTRATION_* → AAPP_ORCHESTRATION_*
- APP_ERROR_* → AAPP_ERROR_*
- APP_LOG_MSG_* → AAPP_LOG_MSG_*
- APP_CONNECTION_CLOSE_REASON_* → AAPP_CONNECTION_CLOSE_REASON_*
- APP_EVENT_RUNTIMES → AAPP_EVENT_RUNTIMES
Wire-format change for the public app event values:
- 'app.user.identity.changed' → 'aapp.user.identity.changed'
- 'app.tenant.switched' → 'aapp.tenant.switched'
- 'app.permissions.refresh.requested'→ 'aapp.permissions.refresh.requested'
- 'app.connectivity.changed' → 'aapp.connectivity.changed'
- 'app.cache.invalidate.requested' → 'aapp.cache.invalidate.requested'
- 'app.dispose.starting' → 'aapp.dispose.starting'
Per docs/conventions.md rule 5, every event-identifier string value
must start with the module's 4-letter alias. Now that AAPP_MODULE = 'aapp'
(set in phase 2B.1) is the canonical module identifier, the event
scope follows. External observers of these events must update string
filters from `app.*` to `aapp.*`. The framework has not been tagged 0.1
yet so the wire format is still in flight.
Translation keys (`'app.title'`, `'app.cart'`, `'app.boot'`, etc. used
by `App.Lang.t(...)` in the demo / ecosystem test pages) are NOT
events and were intentionally left untouched — they're paths in the
lang schema, independent of the AAPP module identity.
Verification: svelte-check 1395 / 0 errors. Server 1230 tests, client
19 tests — all green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>