docs(ui): route the undefined session-id case to the direct seam (RIG-2874) - #1097
Merged
trunk-io[bot] merged 1 commit intoSep 11, 2026
Conversation
…-2874) The record assigned the `getter returns undefined` case to the capture seam, but `captureRequest`'s fetch always throws, so its `rejects.toThrow()` gate cannot tell "threw early" from "reached next" — green on the very defect the case exists to catch. The guard can throw on undefined, so this case needs the direct seam and all three assertions.
rigel-mintaka
added this pull request to stack #1098
September 11, 2026 18:25
|
Compass engineering docs preview: https://compass-ui-rig-2874-record-d.compass-eng-docs.pages.dev Deployed from Changed pages: |
This was referenced Sep 11, 2026
mattwilkinsonn
approved these changes
Sep 11, 2026
|
This pull request was merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack containing 4 PRs:
mainFixes a defect in the frozen design record for the outbound session header.
Matt approved the fix directly. Docs-only; no code changes.
The defect
The record's test-case list assigned the
getter returns undefinedcase tothe capture seam:
That placement is unsafe.
captureRequest's capturingfetchalwaysthrows (
packages/compass-client/src/index.test.ts:93), so the helper gateson
await expect(run(fetch)).rejects.toThrow()(:95). That gate is greenwhether the interceptor threw early or reached
nextnormally — it cannotdistinguish the two. Since the guard can throw on
undefined, routing thiscase onto the capture seam makes the test green on exactly the defect the case
exists to catch.
The record already states this rule correctly for the non-Latin-1 case
(including "Do not 'simplify' this case back onto
captureRequest") andalready requires the triple assertion, where assertion 3 — the awaited result
is the sentinel
nextproduced — is what proves nothing threw. Line 582simply contradicted the record's own rule.
The fix
The
undefinedcase now reads direct seam, all three assertions above,with a short justification in the record's existing voice.
The shipped implementation was already correct — #1055 did not follow the
record here, precisely because the prescription was unsafe. Only the record
needed fixing, so there is no behaviour change and no test change.
Verification
The load-bearing claim was checked at source rather than assumed: the
unconditional
throwis atindex.test.ts:93and therejects.toThrow()gate at
:95.bun tools/design-ledger-gate/index.ts— OK, 311 ledger rows, 132 recordheaders valid (rc=0)
moon run root:markdownlint— rc=0Diff touches one file, 7 insertions / 1 deletion.
RIG-2874