Rescoped per @Jordi-Izquierdo-DDS's filed issue #484 and his Stage A.1
verified shop patch 050:
- KEEP the domain-specific fan-out events (test-execution.TestRunCompleted,
coverage-analysis.CoverageGapDetected/CoverageReportCreated,
test-generation.TestGenerated, code-intelligence.FileChanged) with
their existing flat basePayload shape. Their handlers were already
shipped against this shape; changing it would break out-of-tree
subscribers. Smaller blast radius.
- ONLY change the universal learning.ExperienceCaptured event to use the
canonical nested { experience: TaskExperience-shaped, reward } shape.
Tests parametrized across multiple non-fan-out domains
(requirements-validation, security-compliance, visual-accessibility) per
Jordi's #484 test improvement suggestion — these exercise the
universal-event path exclusively, which v3.9.28's test-execution-only
test inadvertently masked via the fan-out's side-effect kv write.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hotfix for v3.9.28 — bridge payload shape (#482 round 3)
After v3.9.28 fixed the subscriber-loading order, handlers fired for
every bridge event but immediately short-circuited because
event.payload.experience was undefined. The bridge had been publishing a
flat payload { experienceId, domain, agent, task, ... } that didn't
match handleExperienceCaptured's destructure.
Fix: bridge now publishes the canonical nested
{ experience: TaskExperience-shaped, reward } shape that matches the
existing publisher in src/learning/experience-capture.ts:1043.
Also dropped the domain-specific fan-out events (test-execution.TestRunCompleted,
coverage-analysis.CoverageGapDetected, etc.) — their handlers expect
domain-event-specific fields (runId, passed, failed, gapId, riskScore)
that hooks don't capture, so publishing them with undefined fields
recorded degenerate experiences. Universal learning.ExperienceCaptured
is now the bridge's sole publication.
Integration test now uses requirements-validation domain (per Jordi's
suggestion) so the universal-event path is the sole thing being tested,
not masked by a fan-out side effect.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hotfix for v3.9.27 — bridge subscriber wiring (#482)
The CapturedExperienceBridge shipped in v3.9.27 published events into a
kernel with no subscribers because lazyLoading: true left domain plugins
un-initialized when the bridge's first drain ran. Cursor advanced past
the rows; events were silently lost.
Fix: kernel.initialize() now eagerly loads all enabled domain plugins
before starting the bridge. CLI commands opt out via the new
enableExperienceBridge: false flag to keep their fast startup. Added
end-to-end integration test (real kernel + real plugin + real drain →
asserts kv_store has learning:experience:* key).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>