attenu-guard 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/cjs/audit.d.ts +15 -1
  3. package/dist/cjs/audit.d.ts.map +1 -1
  4. package/dist/cjs/audit.js +26 -3
  5. package/dist/cjs/audit.js.map +1 -1
  6. package/dist/cjs/authority.d.ts +12 -6
  7. package/dist/cjs/authority.d.ts.map +1 -1
  8. package/dist/cjs/authority.js +51 -15
  9. package/dist/cjs/authority.js.map +1 -1
  10. package/dist/cjs/ceilings.d.ts +65 -13
  11. package/dist/cjs/ceilings.d.ts.map +1 -1
  12. package/dist/cjs/ceilings.js +393 -70
  13. package/dist/cjs/ceilings.js.map +1 -1
  14. package/dist/cjs/cli.d.ts.map +1 -1
  15. package/dist/cjs/cli.js +11 -4
  16. package/dist/cjs/cli.js.map +1 -1
  17. package/dist/cjs/display.d.ts +3 -2
  18. package/dist/cjs/display.d.ts.map +1 -1
  19. package/dist/cjs/display.js +4 -3
  20. package/dist/cjs/display.js.map +1 -1
  21. package/dist/cjs/evidence.d.ts +35 -9
  22. package/dist/cjs/evidence.d.ts.map +1 -1
  23. package/dist/cjs/evidence.js +333 -39
  24. package/dist/cjs/evidence.js.map +1 -1
  25. package/dist/cjs/guard.d.ts.map +1 -1
  26. package/dist/cjs/guard.js +7 -3
  27. package/dist/cjs/guard.js.map +1 -1
  28. package/dist/cjs/index.d.ts +1 -1
  29. package/dist/cjs/index.d.ts.map +1 -1
  30. package/dist/cjs/index.js +3 -1
  31. package/dist/cjs/index.js.map +1 -1
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/cjs/wire.d.ts.map +1 -1
  35. package/dist/cjs/wire.js +3 -2
  36. package/dist/cjs/wire.js.map +1 -1
  37. package/dist/esm/audit.d.ts +15 -1
  38. package/dist/esm/audit.d.ts.map +1 -1
  39. package/dist/esm/audit.js +26 -4
  40. package/dist/esm/audit.js.map +1 -1
  41. package/dist/esm/authority.d.ts +12 -6
  42. package/dist/esm/authority.d.ts.map +1 -1
  43. package/dist/esm/authority.js +51 -15
  44. package/dist/esm/authority.js.map +1 -1
  45. package/dist/esm/ceilings.d.ts +65 -13
  46. package/dist/esm/ceilings.d.ts.map +1 -1
  47. package/dist/esm/ceilings.js +390 -70
  48. package/dist/esm/ceilings.js.map +1 -1
  49. package/dist/esm/cli.d.ts.map +1 -1
  50. package/dist/esm/cli.js +12 -5
  51. package/dist/esm/cli.js.map +1 -1
  52. package/dist/esm/display.d.ts +3 -2
  53. package/dist/esm/display.d.ts.map +1 -1
  54. package/dist/esm/display.js +4 -3
  55. package/dist/esm/display.js.map +1 -1
  56. package/dist/esm/evidence.d.ts +35 -9
  57. package/dist/esm/evidence.d.ts.map +1 -1
  58. package/dist/esm/evidence.js +335 -41
  59. package/dist/esm/evidence.js.map +1 -1
  60. package/dist/esm/guard.d.ts.map +1 -1
  61. package/dist/esm/guard.js +8 -4
  62. package/dist/esm/guard.js.map +1 -1
  63. package/dist/esm/index.d.ts +1 -1
  64. package/dist/esm/index.d.ts.map +1 -1
  65. package/dist/esm/index.js +1 -1
  66. package/dist/esm/index.js.map +1 -1
  67. package/dist/esm/version.d.ts +1 -1
  68. package/dist/esm/version.js +1 -1
  69. package/dist/esm/wire.d.ts.map +1 -1
  70. package/dist/esm/wire.js +3 -2
  71. package/dist/esm/wire.js.map +1 -1
  72. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,55 @@ Versions follow semantic versioning.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.13.2] - 2026-10-10
10
+
11
+ ### Fixed
12
+ - **A ledger entry whose `event` the schema does not define verified.** `valid_bundle_v2` with a `done` renamed `frobnicate` or `""`, re-chained and re-anchored, verified ok; an `allow` renamed was read by no check, containment included, and only the outcome it orphaned failed; and a bare `outcome` on a schemaVersion 1 chain verified, though `outcome` is v2-only. Measured on the 0.8.0 and 0.13.1 packages. `verifyBundle` now fails such an entry as `unknown_ledger_event`, positioned on it: an `event` that is absent, is not a string, or is not in the new `LEDGER_EVENTS` (the schema's eight names) or, on a schemaVersion 1 chain, `LEDGER_EVENTS_V1` (the seven without `outcome`), as in `unknown_ledger_event: entry carries an event this verifier does not evaluate and will not ignore: frobnicate`, and `checks.ledger_fields` is false. The Python implementation's name and message, byte for byte. The name `unknown_ledger_event` is XuebinMa's (A2A #1575)
13
+ - **`verifyBundle()` threw on a ledger entry that is not a JSON object.** null threw a TypeError (`Cannot read properties of null (reading 'event')`) out of `verifyBundle` and `attenu-guard verify` from 0.8.0, whose note says it never throws, through 0.13.1, and a string or a boolean did from 0.10.0, as did a number parsed with `JSON.parse` (`parseBundle` read a number as an object; 0.13.1 reported its `raw` and `value` as `unknown_ledger_fields`), with `Cannot use 'in' operator to search for 'policy' in x`; measured on the 0.8.0, 0.9.0, 0.10.0 and 0.13.1 packages. An array, and before 0.10.0 those three as well, was read as an entry with no members and reported under four other reasons, `mixed_entry_versions`, `chain_id_mismatch`, `integrity` and `integrity(anchor)`. Each is now `invalid_ledger_entry: entries[7] is an array, not an object`, chain-level (`seq` and `node` null, the index in the message, `failure_entries` naming it), nothing else reads the entry, and the hash chain fails at it. An `entries` that is not an array, which threw (`entries.filter is not a function`), and a bundle that is not an object report `invalid_bundle` alone, and `checks.envelopes` and `envelopes.status` read `"not checked"` there, a new value of both types. `AuditLog.verify`, which a `.jsonl` ledger goes through, reads a null line as a seq gap there (`TAMPERED — seq gap at 1 (got None)`) instead of throwing, and `--entries` prints such an entry as `seq=null`. The Python implementation's names and messages, byte for byte. The name `invalid_ledger_entry` is XuebinMa's (A2A #1575)
14
+ - **`verifyBundle()` threw on `envelopes` that were not an array, and read an `anchor` that was not an object by its characters.** `envelopes.forEach is not a function` from 0.8.0, whose note says it never throws, through 0.13.1 (measured on the 0.8.0, 0.10.0 and 0.13.1 packages), and a string anchor's characters were read as its members. Each is now `invalid_bundle` (`invalid_bundle: anchor is a string, not an object`), once per such member and alone, as in the Python implementation; an anchor `""` or `false` read as absent, and a bundle carrying one, which verified without a key, now fails `invalid_bundle`. An absent or null `entries` or `anchor` is absent; a null `envelopes` reads as an empty array. `attenu-guard verify` shows its witness-key hint only over an array of envelopes. The field values the Python implementation hashed or compared, and raised on, it now reports exactly as this build does
15
+ - **A root's `authority.ttl` that was not a number was read as unbounded, so a bundle carrying one verified.** `verifyBundle` accepted a non-numeric ttl (a string, an array, an object or a boolean) as unbounded from 0.1.0 through 0.13.1, so that root bounded no child's ttl (measured on the 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.7.1, 0.8.0, 0.9.0, 0.10.0 and 0.13.1 packages); on a spawn under a bounded parent it has failed monotonicity since 0.7.0 (`ttl unbounded, parent 600`). The Python implementation raised a TypeError on a string, an array or an object. A member of the root's `authority` or a spawn's `granted` that is not the type the wire format gives it is now `unreadable_authority` or `unreadable_granted`, positioned on that entry, with the same message in both implementations: the object itself an object, `scopes` and `constraints` arrays, a scope a string, and `ttl` null or a finite number (`root vectors:n0: unreadable authority (ttl is a string, not a number)`). An `authority` that is absent, null, a number, a boolean or an array, and a null `scopes` or `constraints`, read as empty, so a bundle holding only a root with one of them, which verified in 0.13.1, now fails
16
+ - **`delegationGraph`, `denials`, `verifyEnvelopes`, `redactionReport`, `stateKey` and `integrityBreak` threw on a bundle, its entries, or an entry that was not what the format says** (`delegationGraph`, `denials` and `redactionReport` measured on the 0.8.0 and 0.13.1 packages; `verifyEnvelopes` on a string entry threw in 0.13.1). The two views skip what they cannot read: an empty graph or no rows for an unreadable bundle or `entries`, and an entry that is not an object names no node. `verifyEnvelopes` reports `invalid_bundle` (`ok` false, status `"not checked"`), and `redactionReport` a violation naming the JSON kind, so `RedactionViolation` gains `entries`, `entry` and `context`, and its `event_index` may be null. `denials` groups by the escaped JSON text of its five values and lists rows in the order each first occurs, where it sorted by `first_seq` and ordered a seq that was not a number by NaN; `delegationGraph` reads `disposition or reason` as the Python implementation does (an empty disposition names none) and files one that is not a string by its printed form. `stateKey` files an entry that is not an object by its index and a seq that is a list or an object by its JSON text, and `integrityBreak` returns null for entries that are not an array. `envelopeSubject`, `signEnvelope` and `envelopeSigningInput` throw their documented Error, and `exportBundle` and `anchorFor`, which sign, refuse such input with a TypeError naming it (`entries[1] is null, not an object`); `AuditLog.verify` returns `[false, "entries is null, not an array"]` and `AuditLog.verifyAnchor` reads an anchor that is not an object as one with no members
17
+ - **Two published types are wider for the fixes above.** `VerifyChecks.envelopes` and `EnvelopeSummary.status` gain `"not checked"`, which only an `invalid_bundle` report carries, and `RedactionViolation` gains `entries`, `entry` and `context` and an `event_index` that may be null, which only input that is not an array or not an object produces; an exhaustive switch over the two unions needs the new case, and arithmetic on `event_index` a null check; `LEDGER_EVENTS` and `LEDGER_EVENTS_V1` are new exports
18
+
19
+ ## [0.13.1] - 2026-10-05
20
+
21
+ ### Changed
22
+ - **A constraint bound of the wrong type is malformed, so a token that carried one and verified before is now refused.** A `max` that is not a number (a boolean, a string, null, an array, an object, or no `max` at all), a `prefix` that is not a string, an egress `rank` other than `none`, `internal` or `any`, and a `field` or `applies_to` that is not a string are refused when the ceiling is built, with a TypeError `<member> of constraint <key> is <kind>, not <expected>`: `max of constraint 'max_rows' is a boolean, not a number`, `prefix of constraint 'path' is a number, not a string`, `rank of constraint 'egress' is 'everywhere', not 'none', 'internal' or 'any'`, `field of constraint 'region' is a number, not a string`. null leaves `field` and `applies_to` unset in-process and `field` unset on the wire; a wire `applies_to: null` is refused, as before, as a member this build does not read. So a token carrying one is refused as `malformed`, a bundle reports `unreadable_authority` or `unreadable_granted` with that text, and `new RowLimit("5")` or `new EgressRank("external")` throws. Every release from 0.1.0 through 0.13.0 accepted them: `max: true` read as 1, `max: "5"` was coerced, an unknown rank ranked above `any` and so admitted every request, `prefix: 5` matched as the text `5`, and `field: 5` read `ctx["5"]`. The draft defines `max` as a number and `prefix` as a string. The Python implementation raises ValueError with the same text
23
+ - **A constraint's `key` must be a string, so a token whose constraint had none, or a key of another type, is now refused.** A constraint of any type, an unknown type included, is refused when it is read, with a TypeError `key of a constraint is <absent|null|a number|a boolean|an array|an object>, not a string`, so a token is refused as `malformed` and a bundle reports `unreadable_authority` or `unreadable_granted`; `Allow`, `Deny` and `Prefix` throw it in-process too. Through 0.13.0, an allow-list, a deny-list or a prefix with no key loaded and read the context field `"undefined"`, so it bounded nothing; a key of 5, null or `true` was read as `String(key)`, so 5 and `"5"` were one dimension and one of two such constraints was dropped, where the Python implementation read a field no JSON context carries. Measured on the 0.13.0 package; the code is the same at every tag from 0.1.1. The draft makes `key` REQUIRED. The Python implementation raises ValueError with the same text
24
+ - **A constraint must be a JSON object, and its `type`, when present, a string, so a token carrying another value is now refused.** A constraint that is not an object is refused with a TypeError `a constraint is <a string|a number|a boolean|null|an array>, not an object`, and a `type` that is not a string with `type of constraint 'max_rows' is <null|a number|a boolean|an array|an object>, not a string`, the Python implementation's words; a token is refused as `malformed`, and a bundle reports `unreadable_authority` or `unreadable_granted`. Through 0.13.0, a constraint that is not an object loaded as an unknown constraint, which denies every action, except null, which threw a TypeError in JavaScript's words; a `type` that is a number, a boolean, a list or an object loaded as an unknown constraint; and a null `type` was read as absent, so the constraint was routed by its key: `{"key": "allow", "type": null, "one_of": ["us"]}` loaded as an allow-list, where the Python implementation loaded an unknown constraint, and `{"key": "max_rows", "type": null, "max": 5}` was refused as a member this build does not read. Measured on the 0.13.0 package; the code is the same at every tag from 0.1.1
25
+ - **An absent `one_of` or `not_one_of` is malformed.** Through 0.13.0, `{"key": "tool", "type": "deny"}` read as an empty deny-list and bounded nothing (measured on the 0.13.0 package; the code is the same at every tag from 0.1.1). It is now refused like a list of the wrong type, `not_one_of of constraint 'tool' is absent, not an array`. A constraint this build writes always carries its list
26
+ - **A scoped call limit's `applies_to` must be a scope.** It follows the scope grammar, an exact scope or a terminal `.*` wildcard, and any other string is refused: `applies_to of constraint 'max_calls' is '*', not a scope`. Through 0.13.0, `new CallLimit(1, "*")`, `"crm"` or `"CRM.READ"` applied to no call, so the limit bounded nothing (measured on the 0.13.0 package; the code is the same at every tag from 0.1.1)
27
+ - **A verifier finding prints every string member of an allow-list or a deny-list in its escaped JSON form, quoted.** `ceiling t in [1] looser than parent t in ["1"]`, where both lists printed `[1]`. That is the display rule 0.13.0 applied to a member that needs escapes, applied to every string member, so the text is ASCII and the same as the Python implementation's on every Python version: `["S\u00e3o\u0020Paulo", "us"]` where 0.13.0 printed `["S\u00e3o\u0020Paulo", us]`. A number, a boolean and null print bare, as before. `describe()` is unchanged
28
+ - **Two constraints under one key in one authority are malformed.** `Authority` throws a TypeError `two constraints share the key 'region'; an authority holds one per key`, in-process and on the wire, so a token carrying two is refused as `malformed` and a bundle reports `unreadable_authority` or `unreadable_granted`. Through 0.13.0 the last one won, silently: `[allow region in [us], deny region not in [rm]]` kept only the deny-list and permitted `region: eu` (measured on the 0.13.0 package). The Python implementation raises ValueError with the same text
29
+ - **`Allow.oneOf` and `Deny.notOneOf` are read-only at runtime.** Both were typed `ReadonlySet` and held a `Set`; each is now a read-only set whose `add`, `delete` and `clear` throw a TypeError, and which is not an `instanceof Set`, as the Python implementation's member set has no mutators. `has`, `size`, iteration, `forEach`, `keys`, `values` and `entries` work as before. The wire order of a member set is computed once, so a member added through a cast after the first `toWire()` would have been checked by `permits()` and missing from the wire
30
+ - **A token refused for a malformed constraint carries the error's text alone.** `invalid authorization_details: TypeError: max of constraint 'max_rows' is a boolean, not a number` is now `invalid authorization_details: max of constraint 'max_rows' is a boolean, not a number`, the Python implementation's message, and the same for an `AuthorityError`
31
+ - **`Ceiling.permits`, called directly, reads only the context's own fields.** `new RowLimit(5).permits(Object.create({ rows: 500 }))`, or a context whose `rows` is a getter on its prototype, was refused by 0.13.0 and is permitted now: an inherited field is not the context's, so it asserts nothing. `Authority.permits`, `Guard.check`, `VerifiedChain.permits` and `verifyBundle` already read only own fields in 0.13.0, through `{...context}`, so they are unchanged
32
+ - **A bundle that verified under an earlier release can now fail re-verification.** Evidence recorded by 0.1.0 through 0.13.0 fails where the earlier check was wrong: an allow whose context held a value a ceiling coerced, such as `rows: "50"` under a row cap, `tool: ["rm"]` under a deny-list, or `path: ["/tmp/x"]` or `flag: true` under a prefix, fails containment, and so does an allow whose context carried a `_scope` that moved the call off its meter. A bundle the Python implementation recorded through 0.19.0 fails the same way, with `rows: true` under a row cap or `tier: true` under `one_of: [1]`. A Python delegation whose meet widened across `true` and 1, in either direction, failed monotonicity here already, and now fails it there too
33
+
34
+ ### Fixed
35
+ - **A deny-list let through a request value it could not compare.** `not_one_of: ["rm"]` permitted `tool: ["rm"]`, and any other array or object, in every release from 0.1.0 through 0.13.0: measured on the 0.1.0, 0.1.1, 0.5.0, 0.6.0, 0.7.0, 0.9.0, 0.12.0 and 0.13.0 packages, and the `Allow` and `Deny` checks are the same at every tag in between. A Set compares an array or an object by identity, so no request value ever equals a member: an allow-list refused one as a non-member, and a deny-list waved it through. Both lists now refuse a request value that is not a string, a number, a boolean or null, as `ceiling_exceeded` with the message `an array cannot be compared with not_one_of members; refused` (or `an object`, or `a value that is not JSON`; `one_of` for an allow-list). The rule is in `permits`, so it holds in `Guard.check`, in `VerifiedChain.permits` after `load()`, and in `verifyBundle`'s containment check. The Python implementation's change for attenu-ops#110 has the same rule, reason and message
36
+ - **A number read with this library's `parseJson` passed a deny-list.** `parseJson` returns every number as a `RawNumber`, which no Set member equals, so `not_one_of: [1]` permitted a context `{"tier": 1}` read with `parseJson`, in `Ceiling.permits` and in `Guard.check`, and `one_of: [1]` refused it. Measured on the 0.13.0 package; the check is the same at every tag from 0.1.1. A `RawNumber` now counts as the number it holds in every ceiling's type check, in a context, a bound or a member
37
+ - **`Allow` and `Deny` read a context field named like an `Object.prototype` member from the prototype.** On a plain object `ctx["constructor"]` is Object's constructor, so `Allow("constructor", …)` refused a context that did not hold that field, where the Python implementation reads the field as absent and permits. Both now read only the context's own fields, so an absent field asserts nothing, whatever its name
38
+ - **Different ceiling types under one key threw a TypeError, or delegated by a guess.** A child whose ceiling under a key is of another class than its parent's, such as a deny-list where the parent holds an allow-list, threw a TypeError (`undefined is not iterable`) out of `isNarrowerThan`, so out of `load()` and out of `verifyBundle`; a delegation across the two threw out of `meet` with nothing on the ledger; one that asked for a prefix under a parent's egress rank was granted the parent's rank, the request dropped; and one that asked for a constraint this build does not define under a parent's row cap failed the chain's own check, `attenuation invariant violated`. Measured on the 0.13.0 package; the `subsumes` and `narrow` code is the same at every tag from 0.1.1. Two different known types under one key are not comparable now: such a child is not narrower, so `load()` reports `not_narrower` and a bundle a monotonicity finding, and `Authority.meet` throws an AuthorityError `constraint 'region' has a different ceiling type on each side; neither narrows the other` with the reason `not_narrower`, so `Guard.delegate` records the refused delegation as `spawn_denied`, with that reason and the detail `{"constraint": "region"}`, and throws it. A constraint this build does not define is the one exception, in one direction: from a parent holding one, the child inherits it, as 0.13.0 did, since it denies every action. A request carrying one under a parent's other ceiling is refused like any other pair, as not narrower with a `spawn_denied` entry. 0.13.0 did one of three things there, by the parent's ceiling: under an allow-list, a deny-list or a prefix it threw a TypeError with nothing on the ledger; under an egress rank it delegated, granting the parent's rank and dropping the requested constraint; and under a numeric cap it recorded `spawn_denied` with the reason `integrity`; and a child holding one under a parent's other ceiling is not narrower, in `isNarrowerThan`, `load()` and a bundle's monotonicity check, as 0.13.0 found for a numeric cap, where an allow-list threw. The same in the Python implementation, whose `meet` raises the same AuthorityError
39
+ - **A custom ceiling could let a wider child of another class pass as narrower.** `isNarrowerThan` handed the parent's ceiling the child's ceiling under the same key whatever its class, so a custom ceiling whose `subsumes()` accepts any ceiling, as one written for its own class may, let a child holding a wider allow-list pass as narrower: in-process, and for a registered type in `load()` and in a bundle's monotonicity check. Measured on the 0.13.0 package. The relation checks the class first now, so such a child is not narrower
40
+ - **A custom ceiling's denial without a reason let the call through.** `Authority.permits` allowed a call whenever it had collected no reason, so a custom ceiling returning `Decision.deny([])` was allowed by `Guard.check` and by `VerifiedChain.permits`, and passed `verifyBundle`'s containment check (measured on the 0.13.0 package). Such a denial denies now in all three, with the reason `ceiling_exceeded`, the ceiling's key and the message `denied without a reason`, the same in the Python implementation. An archived bundle that recorded allows under such a ceiling, and verified before with the ceiling registered, now fails containment
41
+ - **A constraint member named like an `Object.prototype` member was ignored.** The check that refuses a constraint carrying a member this build does not read asked `k in emitted`, which is true for `constructor`, `toString`, `valueOf`, `__proto__` and the rest on every plain object, so `{"key": "max_rows", "max": 5, "constructor": 1}` loaded as `max_rows<=5` (measured on the 0.13.0 package), where the Python implementation refuses it. It reads the emitted constraint's own members now, so the token is refused as `malformed`, in the Python implementation's words
42
+ - **A null quantity passed a metered call.** Under strict metering, `{rows: null}` counted as a declared quantity, though every ceiling reads null as absent; and a context's `calls: null` replaced the guard's own call count, so it passed `new CallLimit(1)` any number of times. Measured on the 0.13.0 package; the check is the same at every tag from 0.1.1. A null quantity is now undeclared: strict metering refuses the call as `unmetered`, and the guard counts a call whose `calls` is null itself. Strict metering reads only the context's own fields, as the ceilings do. An explicit numeric count still wins: the declared-quantity limit the Python implementation's `docs/RED-TEAM.md` describes
43
+ - **Equal member sets re-emitted different bytes.** Members that print alike, such as `"1"` and 1, `"True"` and `true`, or `"None"` and null, kept the order they arrived in, so `one_of: ["1", 1]` re-emitted `["1",1]` and `one_of: [1, "1"]` re-emitted `[1,"1"]`. Measured on the 0.13.0 package; the sort is the same at every tag from 0.1.1. They are ordered by JSON type now, null, boolean, number, then string, the same in the Python implementation
44
+ - **A `one_of` or `not_one_of` that is not an array was read anyway.** null became the empty list and a string its characters, so `not_one_of: null` was an empty deny-list and `one_of: "us"` the allow-list `["s", "u"]`, and a token or a bundle carrying one verified; an object, a number or a boolean threw a TypeError in its own words. Measured on the 0.1.0, 0.1.1, 0.5.0, 0.6.0, 0.7.0, 0.9.0, 0.12.0 and 0.13.0 packages. Each is now malformed, as the draft defines both as an array: `Allow` and `Deny` throw a TypeError naming the list and the key, such as `one_of of constraint 'region' is an object, not an array` (or `null`, `a string`, `a number`, `a boolean`), so a token carrying one is refused as `malformed` and a bundle reports `unreadable_authority` or `unreadable_granted` with that text. The Python implementation raises ValueError with the same text
45
+ - **Unknown constraints were compared as JSON text with only the top-level keys sorted.** Two constraints equal as JSON differed when a nested object listed its keys in another order, so a bundle whose child repeated its parent's unknown constraint with a nested object's keys reordered failed monotonicity, in every release from 0.1.0 through 0.13.0. (A token cannot carry such a reorder: its RFC 8785 bytes sort every level.) An unknown constraint now subsumes only one with the same RFC 8785 bytes: `true` is not 1, `1.0` is 1, and key order is no difference at any depth. A value this build cannot write in RFC 8785, such as an integer past 2^53, is identical to nothing. The Python implementation compares the same way, except for an integral float past 2^53 (see Known differences)
46
+ - **A ceiling coerced a request value of the wrong JSON type.** `<=` let `"50"`, `[50]` and `true` pass a row cap, and every other numeric cap, and `String()` let `["/tmp/x"]` pass the prefix `"/tmp/"` as the text `/tmp/x` and `true` pass the prefix `"t"` as `true`, in every release from 0.1.0 through 0.13.0: measured on the 0.1.0, 0.1.1, 0.5.0, 0.6.0, 0.7.0, 0.9.0, 0.12.0 and 0.13.0 packages, and the five checks are the same at every tag in between. Every built-in ceiling now refuses a request value of the wrong type as `ceiling_exceeded` and never coerces it: a numeric cap takes a number, a prefix and an egress rank take a string, and an allow-list or a deny-list takes a string, a number or a boolean. The message names the value's JSON type and what it could not be compared with: `a string cannot be compared with a maximum; refused`, `an array cannot be compared with a prefix; refused`, `a boolean cannot be compared with an egress rank; refused`, and the membership messages above, in the Python implementation's words. null and an absent field still assert nothing, and every ceiling reads only the context's own fields, so a prefix on a field named `constructor` no longer refuses a context that does not hold one. The Python implementation now refuses such a value too, where it raised, so an allow whose context holds `{"rows": "many"}` fails containment in both
47
+ - **A request context could choose which scoped call limit applied.** `Authority.permits` set the reserved `_scope` only when the context did not carry one, so a context's own `_scope` decided which scoped `CallLimit` applied: after `new CallLimit(1, "crm.read")` had refused a second call, a third carrying `_scope: "other.x"` was allowed, and a call could be charged to another scope's limit instead, in every release from 0.1.0 through 0.13.0. `_scope` is now always the scope being checked, and a context's value is ignored, in `Guard.check`, `VerifiedChain.permits` and `verifyBundle`'s containment check. A `calls` count supplied in the context still wins over the guard's own count: the declared-quantity limit the Python implementation's `docs/RED-TEAM.md` describes
48
+ - **An unknown constraint described itself and denied in other words than the Python implementation.** `describe()` printed it as JSON text, `quota={"key":"quota","type":"x-unknown","max":1}`, and its denial read `unrecognised constraint type for key="quota"; fail-closed`, in every release from 0.1.0 through 0.13.0, so the deny entry a Guard writes for the same call was different bytes from the two implementations. Both now print it as the Python implementation does, `quota={'key': 'quota', 'type': 'x-unknown', 'max': 1}` and `unrecognised constraint type for key='quota'; fail-closed`, except where Known differences says otherwise. A key that is not a string, which the reason's `constraint` recorded as text, is now malformed (see Changed)
49
+ - **A number with a fraction printed in JavaScript's form where the Python implementation prints its repr.** A message quoting a constraint this build refuses read `'min': 0.00001` in 0.13.0, where the Python implementation reads `'min': 1e-05`. A number that has lost its literal now prints as Python's repr of the float, there and in an unknown constraint's `describe()`; an integral one still prints as an integer (see Known differences)
50
+
51
+ ### Known differences
52
+ - A ceiling bound or an unknown constraint value written as an integral number with a fraction or an exponent, such as `100.0` or `1e5`, prints as an integer here, in `describe()` and in a verifier finding (`max_rows<=100`, `100000`), and as a float in the Python implementation (`100.0`, `100000.0`). This build reads the number before it prints it. A bound written as `-0` prints as `-0.0` here and as `0` there. Verdicts and hashes are the same: RFC 8785 writes both as `100`, and both as `0`
53
+ - A list or an object as a `one_of` or `not_one_of` member is accepted here and compared by object identity, so no request value matches it, and a child that repeats it is not narrower than the parent holding it; a lone root token carrying one verifies. The Python implementation refuses it: as `malformed` in a token, and as `unreadable_authority` or `unreadable_granted` in a bundle
54
+ - An unknown constraint holding an integral float at or past 2^53, such as `v: 1e16`, is identical to nothing here, since this build cannot write that number in RFC 8785, so a child that repeats its parent's constraint is not narrower. The Python implementation writes such a float, and there the two subsume each other
55
+ - An unknown constraint whose object has member names that look like integers, such as `"10"` and `"2"`, prints with those members first, in ascending numeric order, in `describe()` and in a verifier finding, since a JavaScript object orders such names that way. The Python implementation prints its members in wire order
56
+ - Whether a character prints as itself or as an escape in a Python-style `repr` follows each runtime's Unicode tables, and the Python implementation's varies across Python versions too. That reaches a message that quotes a key or a constraint through `repr`, such as `type of constraint '<key>' is null, not a string`, and an unknown constraint's `describe()`. A character only the newer table defines prints as itself in one and escaped in the other: U+1CCFA, which Unicode 17 assigns, prints as itself here on Node 22.22 (Unicode 17) and as `\U0001ccfa` in the Python implementation on Python 3.14 (Unicode 16). The members of an allow-list or a deny-list in a finding are ASCII, so they do not vary
57
+
9
58
  ## [0.13.0] - 2026-10-05
10
59
 
11
60
  ### Added
@@ -17,6 +17,12 @@ export declare const SCHEMA_VERSION = 1;
17
17
  export declare const GENESIS: string;
18
18
  /** One line of the ledger. */
19
19
  export type LedgerEntry = Record<string, CJson>;
20
+ /**
21
+ * True when `value` is a JSON object, the one thing a ledger entry can be: what `ceilings.jsonKind`
22
+ * names "an object". null, a string, a number (a `RawNumber` too, which `typeof` calls an object), a
23
+ * boolean and an array are not. The Python implementation asks `isinstance(e, Mapping)`.
24
+ */
25
+ export declare function isLedgerObject(value: unknown): value is LedgerEntry;
20
26
  /** A local destination that receives every entry after the file write. */
21
27
  export interface Sink {
22
28
  write(entry: LedgerEntry): void;
@@ -108,7 +114,15 @@ export declare class AuditLog {
108
114
  anchor(signer: Signer, ts?: number | string): Anchor;
109
115
  /** The chain reproduces AND its head matches a SIGNED anchor. */
110
116
  static verifyAnchor(entries: readonly LedgerEntry[], anchor: Record<string, CJson> | null | undefined, signer: Signer): [boolean, string | null];
111
- /** Recompute the chain. Returns `[ok, firstBadReason]`. */
117
+ /**
118
+ * Recompute the chain. Returns `[ok, firstBadReason]`.
119
+ *
120
+ * An entry that is not a JSON object (a ledger line reading `null`, a string, a number or an
121
+ * array) carries no member, so it is read as an entry with none: a seq gap at its position. A
122
+ * null one threw a TypeError here, out of `attenu-guard verify`. `entries` that are not an array
123
+ * are not a chain: `[false, "entries is a string, not an array"]`, the Python implementation's
124
+ * words, where null threw and a string's characters were read as entries.
125
+ */
112
126
  static verify(entries: readonly LedgerEntry[]): [boolean, string | null];
113
127
  /** Read a `.jsonl` ledger, keeping every number's original literal. */
114
128
  static load(path: string): LedgerEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAQL,KAAK,KAAK,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,OAAO,QAAiB,CAAC;AAEtC,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,MAAM,WAAW,IAAI;IACnB,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED,oDAAoD;AACpD,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;CAClC;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OA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E,GAAG,MAAM,CAMjE"}
package/dist/cjs/audit.js CHANGED
@@ -13,15 +13,25 @@
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.AuditLog = exports.CommittedAuditError = exports.GENESIS = exports.SCHEMA_VERSION = void 0;
16
+ exports.isLedgerObject = isLedgerObject;
16
17
  exports.hashEntry = hashEntry;
17
18
  exports.chainIdOf = chainIdOf;
18
19
  const node_crypto_1 = require("node:crypto");
19
20
  const node_fs_1 = require("node:fs");
20
21
  const node_path_1 = require("node:path");
21
22
  const canonical_js_1 = require("./canonical.js");
23
+ const ceilings_js_1 = require("./ceilings.js");
22
24
  const display_js_1 = require("./display.js");
23
25
  exports.SCHEMA_VERSION = 1;
24
26
  exports.GENESIS = "0".repeat(64);
27
+ /**
28
+ * True when `value` is a JSON object, the one thing a ledger entry can be: what `ceilings.jsonKind`
29
+ * names "an object". null, a string, a number (a `RawNumber` too, which `typeof` calls an object), a
30
+ * boolean and an array are not. The Python implementation asks `isinstance(e, Mapping)`.
31
+ */
32
+ function isLedgerObject(value) {
33
+ return value !== null && typeof value === "object" && !Array.isArray(value) && !(value instanceof canonical_js_1.RawNumber);
34
+ }
25
35
  /** `sha256(prev_hash || canonical(event-without-hash))`, as hex. */
26
36
  function hashEntry(prevHash, payload) {
27
37
  const h = (0, node_crypto_1.createHash)("sha256");
@@ -164,7 +174,9 @@ class AuditLog {
164
174
  }
165
175
  /** The chain reproduces AND its head matches a SIGNED anchor. */
166
176
  static verifyAnchor(entries, anchor, signer) {
167
- const a = anchor ?? {};
177
+ // An anchor that is not a JSON object carries no member, so it is read as one with none, and its
178
+ // signature does not verify; a string's characters were read as its members.
179
+ const a = isLedgerObject(anchor) ? anchor : {};
168
180
  const body = {};
169
181
  for (const k of ["v", "chain_id", "seq", "head", "ts"])
170
182
  body[k] = a[k] ?? null;
@@ -213,11 +225,22 @@ class AuditLog {
213
225
  }
214
226
  return [true, null];
215
227
  }
216
- /** Recompute the chain. Returns `[ok, firstBadReason]`. */
228
+ /**
229
+ * Recompute the chain. Returns `[ok, firstBadReason]`.
230
+ *
231
+ * An entry that is not a JSON object (a ledger line reading `null`, a string, a number or an
232
+ * array) carries no member, so it is read as an entry with none: a seq gap at its position. A
233
+ * null one threw a TypeError here, out of `attenu-guard verify`. `entries` that are not an array
234
+ * are not a chain: `[false, "entries is a string, not an array"]`, the Python implementation's
235
+ * words, where null threw and a string's characters were read as entries.
236
+ */
217
237
  static verify(entries) {
238
+ if (!Array.isArray(entries))
239
+ return [false, `entries is ${(0, ceilings_js_1.jsonKind)(entries)}, not an array`];
218
240
  let prev = exports.GENESIS;
219
241
  let expectedSeq = 0;
220
- for (const e of entries) {
242
+ for (const raw of entries) {
243
+ const e = isLedgerObject(raw) ? raw : {};
221
244
  // An integral number and never a boolean (`integral`), as the schema's integer type
222
245
  // defines: `1.0` is 1, and RFC 8785 writes it as 1, so it hashes as 1. A chain re-hashed
223
246
  // around `"seq": true` or `"seq": 1.5` at index 1 is a seq gap there, as it is to the Python
@@ -1 +1 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/audit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA+CH,8BAKC;AAkRD,8BAMC;AA1UD,6CAAyC;AACzC,qCAAuG;AACvG,yCAAoC;AAEpC,iDASwB;AACxB,6CAAqC;AAIxB,QAAA,cAAc,GAAG,CAAC,CAAC;AACnB,QAAA,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAyBtC,oEAAoE;AACpE,SAAgB,SAAS,CAAC,QAAgB,EAAE,OAAoB;IAC9D,MAAM,CAAC,GAAG,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,MAAM,CAAC,IAAA,6BAAc,EAAC,OAAO,CAAC,CAAC,CAA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IAAA,sBAAO,EAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;QAClC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -58,10 +58,10 @@ export declare class Authority {
58
58
  */
59
59
  readonly scopes: ReadonlySet<string>;
60
60
  /**
61
- * At most one ceiling per `key` (last one wins), sorted by key for a
62
- * deterministic wire form and integrity seal. A dimension with no ceiling is
63
- * unbounded on that dimension unless a parent in the chain bounds it —
64
- * attenuation can only add or tighten bounds, never remove one.
61
+ * One ceiling per `key` (a second one under the same key throws a TypeError),
62
+ * sorted by key for a deterministic wire form and integrity seal. A dimension
63
+ * with no ceiling is unbounded on that dimension unless a parent in the chain
64
+ * bounds it — attenuation can only add or tighten bounds, never remove one.
65
65
  */
66
66
  readonly ceilings: readonly Ceiling[];
67
67
  /** Seconds from issuance. `null` is unbounded (discouraged). */
@@ -75,8 +75,14 @@ export declare class Authority {
75
75
  coversScope(requested: string): boolean;
76
76
  /**
77
77
  * The greatest authority within BOTH `this` and `other` — the attenuation.
78
- * This is the only way a child authority is constructed. It is commutative
79
- * and can only ever shrink relative to either input.
78
+ * This is the only way a child authority is constructed, with `this` the
79
+ * parent and `other` the request. It is commutative and can only ever shrink
80
+ * relative to either input, except in one case, by design (attenu-ops#110):
81
+ * a constraint this build does not define on the parent's side passes down,
82
+ * so the child inherits it, and it denies every action; one in the request
83
+ * under a parent's ceiling of another type is refused with an AuthorityError
84
+ * (reason `not_narrower`), as two different ceiling types under one key are.
85
+ * So `parent.meet(request)` and `request.meet(parent)` differ there.
80
86
  */
81
87
  meet(other: Authority): Authority;
82
88
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"authority.d.ts","sourceRoot":"","sources":["../../src/authority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAA6C,KAAK,KAAK,EAAE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AC,GAAG,EAAE,MAAM,GAAG,SAAS;IAM/B,MAAM,IAAI,aAAa;IAQvB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS;IAiCvC,0CAA0C;IAC1C,QAAQ,IAAI,MAAM;IAMlB,QAAQ,IAAI,MAAM;CAGnB"}
@@ -100,7 +100,10 @@ function ceilingFromWireWhole(c) {
100
100
  "than silently changing which dimension is bounded", "malformed_constraint");
101
101
  }
102
102
  const dropped = Object.keys(input)
103
- .filter((k) => !(k in emitted))
103
+ // The emission's OWN members: `k in emitted` found `constructor`, `toString` and the rest of
104
+ // Object.prototype on every plain object, so a member named like one was ignored, where the
105
+ // Python implementation refuses it (attenu-ops#110).
106
+ .filter((k) => !Object.prototype.hasOwnProperty.call(emitted, k))
104
107
  // `field` is read and then not re-emitted when it equals `key`, because at
105
108
  // that point it is redundant. Absent from the emission does not mean
106
109
  // unread, so exempt it only on EVIDENCE that this ceiling parsed it: the
@@ -118,9 +121,8 @@ function ceilingFromWireWhole(c) {
118
121
  }
119
122
  return ceiling;
120
123
  }
121
- const SCOPE_RE = /^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)*\.(?:[a-z][a-z0-9_-]*|\*)$/;
122
124
  function validateScope(scope) {
123
- if (typeof scope !== "string" || !SCOPE_RE.test(scope)) {
125
+ if (typeof scope !== "string" || !ceilings_js_1.SCOPE_RE.test(scope)) {
124
126
  throw new TypeError(`invalid scope ${(0, display_js_1.pyRepr)((scope ?? null))}: expected lowercase dot-separated segments; ` +
125
127
  "'*' is permitted only as the complete final segment after a dot");
126
128
  }
@@ -135,10 +137,10 @@ class Authority {
135
137
  */
136
138
  scopes;
137
139
  /**
138
- * At most one ceiling per `key` (last one wins), sorted by key for a
139
- * deterministic wire form and integrity seal. A dimension with no ceiling is
140
- * unbounded on that dimension unless a parent in the chain bounds it —
141
- * attenuation can only add or tighten bounds, never remove one.
140
+ * One ceiling per `key` (a second one under the same key throws a TypeError),
141
+ * sorted by key for a deterministic wire form and integrity seal. A dimension
142
+ * with no ceiling is unbounded on that dimension unless a parent in the chain
143
+ * bounds it — attenuation can only add or tighten bounds, never remove one.
142
144
  */
143
145
  ceilings;
144
146
  /** Seconds from issuance. `null` is unbounded (discouraged). */
@@ -149,8 +151,14 @@ class Authority {
149
151
  validateScope(scope);
150
152
  this.scopes = scopes;
151
153
  const byKey = new Map();
152
- for (const c of init.ceilings ?? [])
154
+ for (const c of init.ceilings ?? []) {
155
+ // One constraint per key, on every path (attenu-ops#110): the last one won, silently, so
156
+ // [allow region in [us], deny region not in [rm]] kept only the deny-list.
157
+ if (byKey.has(String(c.key))) {
158
+ throw new TypeError(`two constraints share the key ${(0, display_js_1.pyRepr)(c.key)}; an authority holds one per key`);
159
+ }
153
160
  byKey.set(String(c.key), c);
161
+ }
154
162
  this.ceilings = Array.from(byKey.keys())
155
163
  .sort(canonical_js_1.compareCodePoints)
156
164
  .map((k) => byKey.get(k));
@@ -185,8 +193,14 @@ class Authority {
185
193
  // ---- the lattice ------------------------------------------------------
186
194
  /**
187
195
  * The greatest authority within BOTH `this` and `other` — the attenuation.
188
- * This is the only way a child authority is constructed. It is commutative
189
- * and can only ever shrink relative to either input.
196
+ * This is the only way a child authority is constructed, with `this` the
197
+ * parent and `other` the request. It is commutative and can only ever shrink
198
+ * relative to either input, except in one case, by design (attenu-ops#110):
199
+ * a constraint this build does not define on the parent's side passes down,
200
+ * so the child inherits it, and it denies every action; one in the request
201
+ * under a parent's ceiling of another type is refused with an AuthorityError
202
+ * (reason `not_narrower`), as two different ceiling types under one key are.
203
+ * So `parent.meet(request)` and `request.meet(parent)` differ there.
190
204
  */
191
205
  meet(other) {
192
206
  // Scopes: keep a requested scope only if this side covers it, and keep this
@@ -215,6 +229,19 @@ class Authority {
215
229
  for (const k of keys) {
216
230
  const a = mine.get(k);
217
231
  const b = theirs.get(k);
232
+ if (a !== undefined && b !== undefined && !(0, ceilings_js_1.sameType)(a, b)) {
233
+ // Two ceiling types under one key have no common narrowing, so the delegation is refused
234
+ // as not narrower, and `Guard.delegate` records it as `spawn_denied` (attenu-ops#110). One
235
+ // exception: this side's constraint this build does not define, which denies every action,
236
+ // is kept, so the child inherits it, as 0.13.0 delegated from a parent holding one. A
237
+ // request carrying one under this side's other ceiling is refused: the child would not be
238
+ // narrower (`isNarrowerThan`).
239
+ if (a instanceof ceilings_js_1.UnknownCeiling) {
240
+ ceilings.push(a);
241
+ continue;
242
+ }
243
+ throw new AuthorityError(`constraint ${(0, display_js_1.pyRepr)(k)} has a different ceiling type on each side; neither narrows the other`, "not_narrower", { constraint: k });
244
+ }
218
245
  ceilings.push(a !== undefined && b !== undefined ? a.narrow(b) : (a ?? b));
219
246
  }
220
247
  const ttls = [this.ttl, other.ttl].filter((t) => t !== null);
@@ -247,7 +274,9 @@ class Authority {
247
274
  const selfCeiling = mine.get(k);
248
275
  if (selfCeiling === undefined)
249
276
  return false; // unbounded here where other bounds
250
- if (!otherCeiling.subsumes(selfCeiling))
277
+ // Two ceiling types under one key are not comparable, so not narrower (a custom ceiling's
278
+ // subsumes() need not handle another type).
279
+ if (!(0, ceilings_js_1.sameType)(selfCeiling, otherCeiling) || !otherCeiling.subsumes(selfCeiling))
251
280
  return false;
252
281
  }
253
282
  if (other.ttl !== null) {
@@ -277,14 +306,21 @@ class Authority {
277
306
  .join(", ")}]`,
278
307
  }));
279
308
  }
280
- // Reserved key so scoped ceilings can tell whether they apply.
309
+ // Reserved key so scoped ceilings can tell whether they apply. Always the scope being checked: a
310
+ // `_scope` in the caller's context is ignored, so it can move no call off its own meter or onto
311
+ // another (attenu-ops#110).
281
312
  const cctx = { ...context };
282
- if (!("_scope" in cctx))
283
- cctx["_scope"] = scope;
313
+ cctx["_scope"] = scope;
284
314
  for (const c of this.ceilings) {
285
315
  const decision = c.permits(cctx);
286
- if (!decision.allowed)
316
+ if (decision.allowed)
317
+ continue;
318
+ // A denial with no reason still denies: an empty list read as an allow, so a custom ceiling's
319
+ // bare `Decision.deny([])` let every call through (attenu-ops#110).
320
+ if (decision.reasons.length > 0)
287
321
  reasons.push(...decision.reasons);
322
+ else
323
+ reasons.push(new reasons_js_1.Reason(reasons_js_1.ReasonCode.CEILING_EXCEEDED, { constraint: c.key, message: "denied without a reason" }));
288
324
  }
289
325
  return reasons.length > 0 ? reasons_js_1.Decision.deny(reasons) : reasons_js_1.Decision.allow();
290
326
  }
@@ -1 +1 @@
1
- {"version":3,"file":"authority.js","sourceRoot":"","sources":["../../src/authority.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,iDAAkG;AAClG,6CAAiD;AACjD,+CAKuB;AACvB,6CAA4D;AAE5D;;;;;;;GAOG;AACH,MAAa,cAAe,SAAQ,KAAK;IAC9B,MAAM,CAAS;IACf,MAAM,CAAuB;IAEtC,YAAY,OAAe,EAAE,MAAc,EAAE,SAA+B,EAAE;QAC5E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAVD,wCAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAS,oBAAoB,CAAC,CAAQ;IACpC,MAAM,OAAO,GAAG,IAAA,6BAAe,EAAC,CAAC,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,IAAA,sBAAO,EAAuB,CAAC,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,IAAA,sBAAO,EAAuB,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QACtE,yEAAyE;QACzE,qEAAqE;QACrE,+DAA+D;QAC/D,6EAA6E;QAC7E,4EAA4E;QAC5E,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