feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts
Some checks failed
Test / test (push) Has been cancelled

Implements IHUB-WP-0009: closes four GAAF-2026 gaps before domain hub work begins.
- TypeRegistry helper + controllers/views (hub_kind, hub_capability_manifest)
- HubCapabilityManifest entity with validation and registry linkage
- ARCHITECTURE-LAYERS.md + CI-enforced boundary contracts
- Alembic migration 1743724800, fitness tests (Test/Architecture/)
- GAAF spec, Operational Architecture spec, domain hub extension guide
- Updates to CLAUDE.md, SCOPE.md, Schema.sql, Routes, FrontController, Types

state_hub_sync: pending (tunnel was STALE at completion time; run fix-consistency)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 21:17:39 +00:00
parent 1a7732d7da
commit b5d73aa18b
47 changed files with 4855 additions and 104 deletions

View File

@@ -7,10 +7,7 @@ import IHP.ControllerPrelude
import Data.Aeson (object, (.=))
import qualified Data.Text as T
import Network.Wai (requestMethod, requestHeaders)
-- | Accepted event types per InteractionReportingContract v1.0
apiAcceptedEventTypes :: [Text]
apiAcceptedEventTypes = ["clicked", "viewed", "submitted", "dismissed", "errored"]
import Application.Helper.TypeRegistry (validateEventType)
instance Controller ApiInteractionEventsController where
@@ -65,12 +62,15 @@ createEventForHub hub = do
let Just wIdText = widgetIdText
Just evType = eventType
unless (evType `elem` apiAcceptedEventTypes) do
setStatus 422
respondJson (object
[ "error" .= ("Unacceptable event_type" :: Text)
, "accepted" .= apiAcceptedEventTypes
])
evTypeResult <- liftIO $ validateEventType evType
case evTypeResult of
Left _ -> do
setStatus 422
respondJson (object
[ "error" .= ("Unacceptable event_type" :: Text)
, "hint" .= ("Register the event type in the Type Registry before submitting" :: Text)
])
Right () -> pure ()
-- Resolve widget — must belong to this hub.
case readMay wIdText of