Skip to content

fix(guardians): detect per-service stryker config in monorepos#2

Merged
TMogdans merged 1 commit into
mainfrom
fix/mutation-ratchet-monorepo
Jul 19, 2026
Merged

fix(guardians): detect per-service stryker config in monorepos#2
TMogdans merged 1 commit into
mainfrom
fix/mutation-ratchet-monorepo

Conversation

@TMogdans

Copy link
Copy Markdown
Collaborator

Problem

hasMutationRatchet prüfte nur das Repo-Root auf eine Stryker-Config. In einem Monorepo mit per-Service-Configs (services/<svc>/api/stryker.config.json — das bsk-Pilot-Layout) war das ein systematisches False-Negative: checkGuardians meldete mutation-ratchet fehlend, obwohl der Ratchet pro Service existiert → jede T3-PR brauchte einen Guardian-Override (REFUSE_GUARDIANS / protected-set-Umweg), obwohl die Vorbedingung faktisch erfüllt war.

Fix

Bounded (Tiefe 3), node_modules-/hidden-dir-überspringende Suche → eine im Repo für mindestens ein Package adoptierte Ratchet-Config registriert als das grobe repo-level „the guardian stands"-Signal (konsistent mit den anderen Detektoren). Reicht bis services/<svc>/api/- und packages/<pkg>/-Layouts.

Tests

  • Neue Fixture repo-stryker-in-service (Stryker in services/foo-service/api/, andere Wächter am Root) + Test: wird als vollständig erkannt.
  • Root- und Missing-Fälle unverändert grün. Volle Suite: 174 passed. dist/ neu gebaut (committed).

Kontext

Das v0-Detektions-Kontrakt-"tighten per Obol later" (§5) — hier kalibriert gegen das bsk-Monorepo, nachdem 4 Services (link, location, monitoring, feedback) durch die Kette liefen und jedes Mal den Root-only-Override brauchten.

🤖 Generated with Claude Code

hasMutationRatchet checked only the repo root, so a monorepo with per-service
stryker configs (services/<svc>/api/stryker.config.json — the bsk pilot layout)
was a systematic false negative, forcing guardian overrides. Replace with a
bounded (depth 3), node_modules/hidden-dir-skipping scan so an adopted ratchet
in at least one package registers as the repo-level guardian signal. New fixture
+ test cover the per-service layout; the root and missing cases are unchanged.
@TMogdans
TMogdans merged commit 43760ca into main Jul 19, 2026
1 check passed
@TMogdans
TMogdans deleted the fix/mutation-ratchet-monorepo branch July 19, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant