Skip to content

Boundary guard · Konsist/ArchUnit gate enforcing the firewall (no MuJoCo in core/Phosphor) #552

@wow-miley

Description

@wow-miley

Context. Recon (#543 §8) found there is no ArchUnit / Konsist / dependency-analysis plugin in the repo — nothing fails the build on an architectural-boundary violation. Today the firewall is only emergent (module-graph compile errors + commonMain + PR review). Locked decision #6 ("build FAILS if MuJoCo leaks into ampere-core/Phosphor") therefore isn't literally enforced. This ticket makes it a rule.

Objective. Add a lightweight, blocking boundary guard (prefer Konsist, KMP-friendly; ArchUnit is JVM-only and acceptable if scoped to JVM check tasks) wired into CI.

Rules to assert (fail the build on violation)

  1. No module except :sim-mujoco references com.neuronrobotics.mujoco / mujoco-java (especially ampere-core and Phosphor).
  2. ampere-core commonMain imports no platform/UI/framework packages (no Android, no Compose, no Ktor-client engines, etc.).
  3. AMPERE source never imports Socket UI/domain packages (the dependency-inversion boundary).
  4. (stretch) every Event subtype appears in EventRegistry.allEventTypes — turns the manual recon-§8 DoD item into a check.

Validation

A deliberately-planted MuJoCo import in ampere-core (and a planted Socket import) makes ./gradlew check fail; removing them makes it pass. Rule (4), if implemented, fails when a new Event type is omitted from the registry.

Notes

Land before AMPERE 0.8.0 so the published contract ships with the firewall enforced. This is the one place a new build-tooling dependency is justified; keep it to the check classpath. DoD: a concept cell documenting the guard + ktlintFormat.

Scope ~3 pts · Model: Sonnet, medium thinking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions