@htilabs/platform-common-models 0.42.0 → 0.42.1

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.
package/README.md CHANGED
@@ -16,6 +16,24 @@ Package exports are organized into a public root API and a small number of
16
16
  dedicated subpaths (`/validation`, `/cvcs`) — consult `package.json` for the
17
17
  authoritative `exports` map.
18
18
 
19
+ ## share-resolver / 0.42.1 (behaviour fix)
20
+
21
+ A row is OUTSIDE a governing list only when neither it nor anything beneath
22
+ it is covered. 0.42.0 withheld a GROUPING as a unit when the list named only
23
+ its rows (`instrument_summary` named through `summary_lap`): the grouping
24
+ landed in `excludedItems`, and `shareRowCeiling` then dropped the named rows
25
+ with it — Thread's inside-ceiling adoption found the `risk_only_handoff`
26
+ preset's seven screen summaries refused by the ceiling built from that very
27
+ preset. Now the uncovered rows are withheld each at their own grain and the
28
+ named ones stand. Same rule for the legacy cell chain's list, a field-group
29
+ limit (`infoScopeItems`) and the team ceiling's list.
30
+
31
+ **Consumers:** `excludedItems` / `teamExcludedItems` changed shape. A code is
32
+ withheld when it or an ancestor is listed; a grouping is listed only when
33
+ nothing beneath it is covered, so a grouping code's absence no longer means
34
+ the whole grouping may leave. For a send decision read `shareRowCeiling` +
35
+ `rowsOverCeiling`, never a grouping-code check against `excludedItems` alone.
36
+
19
37
  ## share-resolver / 0.42.0 (additive)
20
38
 
21
39
  0.42.0 (Kickoff 13, GDR § 5.79 "ONE resolver per runtime") ships THE share
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DAuhe0cd.js';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DQEoFVL2.js';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DAuhe0cd.cjs';
1
+ import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-DQEoFVL2.cjs';
2
2
  import * as mongoose from 'mongoose';
3
3
  import { HydratedDocument, Connection, Model } from 'mongoose';
4
4
 
package/dist/index.cjs CHANGED
@@ -17131,6 +17131,9 @@ function resolveShare(input) {
17131
17131
  let excludedReason = null;
17132
17132
  const teamExcludedItems = [];
17133
17133
  let teamExcludedReason = null;
17134
+ const outside = (covered) => items.filter(
17135
+ (r) => !covered(r) && !items.some((d) => d !== r && covered(d) && scope.ancestorsOf(d).includes(r))
17136
+ );
17134
17137
  const addExcluded = (rows, why) => {
17135
17138
  for (const r of rows)
17136
17139
  if (!floorItems.includes(r) && !excludedItems.includes(r))
@@ -17166,7 +17169,7 @@ function resolveShare(input) {
17166
17169
  }
17167
17170
  if (allowed && !req && groupCeiling !== null && !scopeListStrictlyCovers(scope, groupCeiling, g)) {
17168
17171
  addExcluded(
17169
- items.filter((r) => !scopeListCovers(scope, groupCeiling, g, r)),
17172
+ outside((r) => scopeListCovers(scope, groupCeiling, g, r)),
17170
17173
  "Outside the payload for this purpose"
17171
17174
  );
17172
17175
  }
@@ -17177,17 +17180,16 @@ function resolveShare(input) {
17177
17180
  }
17178
17181
  if (allowed && !req && polScopeBinds && !scopeListStrictlyCovers(scope, govList, g)) {
17179
17182
  addExcluded(
17180
- items.filter((r) => !scopeListCovers(scope, govList, g, r)),
17183
+ outside((r) => scopeListCovers(scope, govList, g, r)),
17181
17184
  `Outside what the \u201C${govName}\u201D policy allows for this purpose`
17182
17185
  );
17183
17186
  }
17184
17187
  const govRows = polScopeBinds ? own3(govItems, g) : void 0;
17185
17188
  if (allowed && !req && isStringList2(govRows)) {
17186
17189
  const keep = new Set(govRows);
17190
+ const kept = (r) => keep.has(r) || scope.ancestorsOf(r).some((a) => a !== g && keep.has(a));
17187
17191
  addExcluded(
17188
- items.filter(
17189
- (r) => !keep.has(r) && !scope.ancestorsOf(r).some((a) => a !== g && keep.has(a))
17190
- ),
17192
+ outside(kept),
17191
17193
  `Outside what the \u201C${govName}\u201D policy allows for this purpose`
17192
17194
  );
17193
17195
  }
@@ -17200,15 +17202,13 @@ function resolveShare(input) {
17200
17202
  const why = `Outside what your team's \u201C${tcNamed?.name}\u201D policy allows`;
17201
17203
  const outRows = /* @__PURE__ */ new Set();
17202
17204
  if (tcScope !== null && !scopeListStrictlyCovers(scope, tcScope, g)) {
17203
- for (const r of items)
17204
- if (!scopeListCovers(scope, tcScope, g, r)) outRows.add(r);
17205
+ for (const r of outside((x) => scopeListCovers(scope, tcScope, g, x))) outRows.add(r);
17205
17206
  }
17206
17207
  const tcRows = own3(tcItems, g);
17207
17208
  if (isStringList2(tcRows)) {
17208
17209
  const keep = new Set(tcRows);
17209
- for (const r of items)
17210
- if (!keep.has(r) && !scope.ancestorsOf(r).some((a) => a !== g && keep.has(a)))
17211
- outRows.add(r);
17210
+ const kept = (r) => keep.has(r) || scope.ancestorsOf(r).some((a) => a !== g && keep.has(a));
17211
+ for (const r of outside(kept)) outRows.add(r);
17212
17212
  }
17213
17213
  for (const r of outRows)
17214
17214
  if (!floorItems.includes(r) && !excludedItems.includes(r))