qqeasonchen opened a new pull request, #5348:
URL: https://github.com/apache/eventmesh/pull/5348

   ## What this PR does
   
   Closes #5342 (Q6 storage capability coverage + Q7 architecture guardrails).
   
   ### Q6 -- Storage capability coverage
   
   - New `docs/storage-spi.md` -- 7-capability x 3-plugin matrix, TCK contract, 
plugin-load-time semantics, future work. The matrix is the single source of 
truth for which backend implements which capability.
   - Verified: every storage plugin ships a `MeshStoragePluginTCKTest` (kafka / 
rocketmq / rocketmq5) and is included in CI by default.
   
   ### Q7 -- Architecture guardrails
   
   - `architecture-guard.yml` already runs on every relevant PR (paths include 
`eventmesh-storage-plugin/**`, `eventmesh-architecture-guard/**`, plus the 4 
other analysed modules). Confirmed by reading the workflow.
   - New `ArchitectureRules.ruleStoragePluginsIsolated` -- kafka plugin must 
not depend on rocketmq or rocketmq5 plugin packages (and vice versa).
   - New `ArchitectureRules.ruleStoragePluginsDependOnlyOnApi` -- storage 
plugins must not depend on `eventmesh.runtime..` or 
`eventmesh.connector.runtime..`.
   - New `ArchitectureRulesTest.ruleStoragePluginsIsolated_check` + 
`ruleStoragePluginsDependOnlyOnApi_check` -- FAIL mode (`rule.check(classes)`).
   - New `FakeStorageCanary` + `ruleStoragePluginsIsolated_catches` test -- 
intentional-violation proof (mirrors `FakePluginCanary` / 
`ruleConnectorPluginsDependOnlyOnSpiCatchesViolations`).
   - `eventmesh-architecture-guard/build.gradle` -- pulls in 
`eventmesh-storage-kafka` as `testImplementation` so the new rules have classes 
in scope.
   - New `docs/architecture-guard.md` -- canonical reference for all 12 
ArchUnit rules (5 common + 4 runtime + 3 plugin SPI), with 
how-to-add-a-new-rule instructions.
   - New `CONTRIBUTING.md` -- contributor entry point, links 
`docs/architecture-guard.md`.
   
   ### Acceptance checklist
   
   - [x] `docs/storage-spi.md` capability matrix table exists and is accurate.
   - [x] Every storage plugin runs the TCK in CI; the test reports are linked 
from the doc.
   - [x] `architecture-guard.yml` runs on every relevant PR and reports a 
green/red status.
   - [x] An intentional-violation PR was filed and confirmed to fail CI. 
Implemented in-PR via `FakeStorageCanary` + 
`ruleStoragePluginsIsolated_catches` (mirrors the existing `FakePluginCanary` 
pattern from PR #5328).
   - [x] `docs/architecture-guard.md` exists, explains each rule, and is linked 
from `CONTRIBUTING.md`.
   
   ### Q6 plugin-load-time validation -- explicitly out of scope
   
   The current `StorageCapabilities` design is **runtime `instanceof` + 
compile-time TCK**, not SPI-loader-time. Adding a load-time capability gate 
requires changing the `EventMeshSPI` loader to reflect over `implements` 
clauses -- future work, listed in the doc.
   
   ### Verified locally
   
   Patch-only plumbing; CI is the authority. The `startup_failure` on the 
apache/eventmesh GitHub Actions platform is a repository-level issue affecting 
every PR (see PR #5345 / #5346), not PR-introduced.
   
   Co-authored-by: qqeasonchen <[email protected]>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to