Repository navigation
Commit 13f533a
* test(approvals): measurement harness for the #10153 manager org screen (no fix)
Pins the CURRENT behaviour so the premise and the tiering question are
reproducible: the manager branch resolves across the organization boundary,
the sibling position expansion is screened (and is not reject-everything),
team is not screened either, and a sole cross-org manager approver under
onEmptyApprovers: 'fail' opens today while a screened type in the identical
shape throws NO_APPROVERS.
No fix is implemented. The card tripped its re-tiering wire (Clause-2) and is
handed back for dispatch at the required tier.
Part of #10153
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
* test(approvals): pin the #10153 harness fake engine to ObjectQL's write dispatch
check:engine-double-contract flagged the harness double's delete()/update() as
looser than the engine they stand in for. Route both through
assertEngineDeleteDispatch / assertEngineUpdateDispatch and record the new
pinned coverage in the retained ledger, as the gate's own remedy prescribes.
Part of #10153
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
* fix(approvals): screen the `manager` approver to the request's organization (#10153)
`lookupManager` read `sys_user.manager_id` with no organization argument while
every other graph-shaped approver expansion is handed the directory org. Since
`sys_user` carries no `organization_id`, a `manager_id` crossing an organization
boundary routed the approval to an out-of-tenant approver.
The screen is a `sys_member` membership test, applied only when the fact is
present and negative: a manager with membership rows, none in the request's
organization, is dropped; absent membership rows, a failed read, or a request
with no organization leave routing exactly as it was.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
* fix(approvals): type the membership read and re-point the double ledger at the renamed pin file
The #4918 ratchet grandfathers `approval-service.ts` for its EXISTING
query-options erasures only, so the new `sys_member` read carries no `as any`.
The engine-double ledger follows the harness file's rename — same two pinned
doubles, no coverage lost.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
* test(approvals): narrow the openNodeRequest union so the pins type-check in the hidden layer
`plugin-approvals` excludes `**/*.test.ts` from its tsconfig, so
`pnpm --filter @objectstack/plugin-approvals typecheck` never read this file and
reported exit 0 over it. `check:type-check-debt --re-measure` did: the pins
billed TEST_DEBT 21 raw TS2339/TS18048, all from reading `pending_approvers`
straight off `ApprovalRequestRow | ApprovalNodeAutoOutcome`.
Narrowed through an `opened()` helper that REFUSES the auto-approval arm rather
than casting past it — every probe asserts something about an opened request, so
an auto-approval reaching one is a wrong answer that must say so. Re-measured:
the package is back to its frozen 348, contributing 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent adbcbfd commit 13f533a
4 files changed
Lines changed: 426 additions & 3 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
Lines changed: 104 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
989 | 994 | | |
990 | 995 | | |
991 | 996 | | |
| |||
1339 | 1344 | | |
1340 | 1345 | | |
1341 | 1346 | | |
1342 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1343 | 1377 | | |
1344 | 1378 | | |
1345 | 1379 | | |
1346 | 1380 | | |
1347 | 1381 | | |
1348 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1349 | 1386 | | |
1350 | 1387 | | |
1351 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1352 | 1453 | | |
1353 | 1454 | | |
1354 | 1455 | | |
| |||
0 commit comments