You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump @intentius/chant and @intentius/chant-lexicon-github to ^0.55.0 and
delete the warden-local removalLiveCap guardrail: chant's removalDeltaCap
now takes a managedTotal live denominator (chant#2067), so runGuardrails
passes the countLiveManaged value straight through as
{ maxFraction, managedTotal }. The runner's diff→guardrails sequencing
capture and its lock test are unchanged, as are adminFloor /
requiredAdmins / requireSelf and their member-visibility gating. Tests
now assert the same behavioral cases through the upstream function, and
the docs no longer describe the cap as warden-local. Action bundle
rebuilt for the dependency bump.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RErsihpfppjyZ37vQuRwKb
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,7 @@ Before any apply, warden runs safety checks and refuses dangerous changes
241
241
242
242
| Guardrail | What it refuses or protects |
243
243
|---|---|
244
-
|`removalLiveCap`| Refuses an apply whose deletes exceed 25% of the live managed entries in the collections the policy declares (typo protection). With nothing live to measure against it falls back to chant's plan-relative `removalDeltaCap`. |
244
+
|`removalDeltaCap`| Refuses an apply whose deletes exceed 25% of the live managed entries in the collections the policy declares (typo protection). With nothing live to measure against it falls back to the plan-relative denominator. |
245
245
|`adminFloor`| Refuses if fewer than 2 org admins would remain. |
246
246
|`requiredAdmins` / `requireSelf`| Keep named admins (and the managing identity) from being removed. |
247
247
| rename-without-loss | A `previously` alias collapses a delete+create into an update, so a rename doesn't count as a deletion. |
@@ -337,7 +337,7 @@ The hermetic compose smoke drives every cycle's full loop against a stateful
337
337
mock GitHub (dependency-free node, run via docker compose or directly). Each
338
338
cycle applies its policy slice and then re-plans to convergence, with
339
339
out-of-band drift corrected and deletes exercised under `owned`. The suite
340
-
also trips the `removalLiveCap` block and walks the permission-gated 403 NOTE
340
+
also trips the `removalDeltaCap` block and walks the permission-gated 403 NOTE
341
341
path, and auth runs the real App JWT and installation-token flow against the
if (managedTotal !== void 0 && managedTotal > 0) {
430
+
const fraction2 = deletes / managedTotal;
431
+
if (fraction2 > maxFraction) {
432
+
return {
433
+
guardrail: "removalDeltaCap",
434
+
message: `${deletes} of ${managedTotal} live managed entries (${Math.round(fraction2 * 100)}%) would be deleted, exceeding the ${Math.round(maxFraction * 100)}% threshold. Check for typos in config or raise maxFraction to proceed.`
435
+
};
436
+
}
437
+
return null;
438
+
}
426
439
const total = changeSet.entries.filter((e) => e.kind !== "create").length;
if (liveManagedTotal > 0 && fraction > maxFraction) {
1063
-
return {
1064
-
guardrail: "removalLiveCap",
1065
-
message: `${deletes} of ${liveManagedTotal} live managed entries (${Math.round(fraction * 100)}%) would be deleted, exceeding the ${Math.round(maxFraction * 100)}% threshold. Check for typos in config or raise maxFraction to proceed.`
1066
-
};
1067
-
}
1068
-
return null;
1069
-
}
1070
1069
function adminFloor(changeSet, live, opts = {}) {
1071
1070
const min = opts.min ?? 2;
1072
1071
const liveMembers = live.members ?? [];
@@ -1124,11 +1123,10 @@ function requireSelf(changeSet, live, opts) {
1124
1123
function runGuardrails(changeSet, live, config2 = {}, liveManagedTotal = 0) {
0 commit comments