Skip to content

Commit d4ced55

Browse files
committed
docs(spec): pin comment states the MEASURED before-red (TS2339/TS2551, no TS2353) (#6523)
The reverse-verification run showed no excess-property error, because the envelope is passed as an annotated variable — the way the engine middleware passes it — not as an inline literal. TS2353 is PR #6511's direction (a caller stating a trimmed envelope); this card's is the READ being blocked. Comment corrected rather than the test reshaped to match the template. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PiRUoQkTSBBmpyXBY3cVn2
1 parent 308e63e commit d4ced55

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

packages/spec/src/contracts/sharing-service.test.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,12 @@ describe('[#6428] ISharingService tri-state write verdict', () => {
530530
* to anything — the old type included — goes red; (2) the SHAPE WITNESS: an
531531
* implementation typed by the contract reads `accessible_org_ids` / `posture`
532532
* / `org_user_ids` / `tabPermissions` with **no `as any`**, which under the old
533-
* signature was TS2339 on each field — that is this file's before-red
534-
* direction, and it is the mirror of PR #6511's, which was TS2353 at a call
535-
* site; (3) the narrow type survives UNCHANGED IN SHAPE, so the convergence
536-
* cannot be undone by widening it back one field at a time.
533+
* signature was TS2339 on each field (TS2551 on `tabPermissions` — tsc
534+
* suggests `permissions`, the very near-miss the narrow type invited) — that
535+
* is this file's before-red direction, and it is the MIRROR of PR #6511's,
536+
* which was TS2353 at a call site stating a trimmed envelope; (3) the narrow
537+
* type survives UNCHANGED IN SHAPE, so the convergence cannot be undone by
538+
* widening it back one field at a time.
537539
*
538540
* NOT PINNED, on purpose, and for exactly the reason PR #6511 recorded: there
539541
* is no `@ts-expect-error` asserting that a `SharingExecutionContext` is
@@ -593,10 +595,15 @@ describe('[#6523] sharing / approval / report enforcement takes the full Executi
593595
};
594596

595597
// The call site, spelled the way `plugin-sharing`'s engine middleware
596-
// spells it: the whole resolved envelope, handed straight down. Written as
597-
// an object LITERAL on purpose — excess-property checking applies to
598-
// literals, so under the old parameter type each of the four keys below
599-
// was additionally a TS2353 error.
598+
// spells it: the whole resolved envelope, resolved once and handed straight
599+
// down as a VARIABLE — not as an inline literal. That is deliberate, and it
600+
// is why reverting this card produces no TS2353 here: excess-property
601+
// checking would fire only on an inline literal, and inline-literal damage
602+
// is PR #6511's direction (a caller stating a trimmed envelope), not this
603+
// one. Here the value was always whole and always assignable; only the
604+
// READ above was blocked. Measured on the revert: 22 errors on this file,
605+
// TS2339/TS2551 on the four reads and TS2344/TS2322 on the identity pins,
606+
// and zero TS2353.
600607
const envelope: ExecutionContext = {
601608
userId: 'usr_1',
602609
tenantId: 'org_plant_a',

0 commit comments

Comments
 (0)