Skip to content

fix(governance): mirror the engine's KEDA-aware replicaCount rule - #8

Merged
catinspace-au merged 1 commit into
mainfrom
fix/validator-keda
Oct 2, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/validator-keda

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

dfe-engine #710 replaced the outright replicaCount refusal with
keda_owns_replicas, which only refuses a write where KEDA actually owns
the count (gitcrud/commit_policy.py + appmgmt/scaling.py keda_by_default).
This validator still refused every replicaCount unconditionally, no
longer matching the engine it claims to mirror.

Refuse replicaCount only where the change targets a helmvars-class
resource and the same action does not also set keda.enabled: false -
the one case an action definition can decide for itself with no access
to the app manifest or chart defaults. Whether a non-helmvars chart runs
KEDA, or an unplaceable overlay's manifest marks it scale_deployed, is a
runtime fact the validator cannot see, so those cases are left to the
engine's own refusal at write time (noted in the comment at the check).

Verified locally: tools/validate_governance.py still passes clean on
the repo's own governance/ tree, refuses a helmvars replicaCount with no
keda.enabled override, and passes one that sets keda.enabled: false in
the same action.

dfe-engine #710 replaced validate_change's outright replicaCount refusal
with keda_owns_replicas, which only refuses a write where KEDA actually
owns the count. This validator still refused every replicaCount, which
no longer matches the engine it claims to mirror.

Refuse replicaCount only on a helmvars-class change that does not also
set keda.enabled: false in the same action - the one case an action
definition can decide for itself. Whether a non-helmvars chart runs
KEDA, or an unplaceable overlay's manifest marks it scale_deployed, is
a runtime fact only the engine's app catalogue and stored document
carry, so those stay the engine's call.
@catinspace-au
catinspace-au merged commit a28368c into main Oct 2, 2026
4 checks passed
@catinspace-au
catinspace-au deleted the fix/validator-keda branch October 2, 2026 23:43
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