Skip to content

Commit da8ba9a

Browse files
authored
build: tag untagged asserts for 2.90.0 release (#26607)
## Summary - Tags all untagged assert shortcodes in preparation for the 2.90.0 client release. - Generated by `pnpm run policy-check:asserts`. ## Merge Priority This PR should merge **before** the version bump PR.
1 parent 1d7a94f commit da8ba9a

6 files changed

Lines changed: 26 additions & 17 deletions

File tree

packages/dds/sequence/src/intervals/sequenceInterval.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,15 @@ export class BaseSequenceInterval implements SequenceInterval, ISerializableInte
307307
* Whether this interval overlaps the provided numerical positions.
308308
*/
309309
public overlapsPos(_bstart: number, _bend: number): boolean {
310-
assert(false, "overlapsPos not supported on BaseSequenceInterval");
310+
assert(false, 0xcd7 /* overlapsPos not supported on BaseSequenceInterval */);
311311
}
312312

313313
public clone(): BaseSequenceInterval {
314-
assert(false, "clone not supported on BaseSequenceInterval");
314+
assert(false, 0xcd8 /* clone not supported on BaseSequenceInterval */);
315315
}
316316

317317
public union(_b: BaseSequenceInterval): BaseSequenceInterval {
318-
assert(false, "union not supported on BaseSequenceInterval");
318+
assert(false, 0xcd9 /* union not supported on BaseSequenceInterval */);
319319
}
320320

321321
protected verifyNotDispose(): void {
@@ -858,7 +858,7 @@ export function createTransientIntervalFromSequence(
858858
endPos !== undefined &&
859859
startSide !== undefined &&
860860
endSide !== undefined,
861-
"start and end cannot be undefined because they were not passed in as undefined",
861+
0xcda /* start and end cannot be undefined because they were not passed in as undefined */,
862862
);
863863

864864
const startSlidingPref = startReferenceSlidingPreference(

packages/dds/tree/src/shared-tree/treeCheckout.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
505505
this.labelTreeNode = node;
506506
} else {
507507
const current = this.currentLabelNode();
508-
assert(current !== undefined, "Expected current label node to exist");
508+
assert(current !== undefined, 0xcdb /* Expected current label node to exist */);
509509
current.sublabels.push(node);
510510
}
511511
}
@@ -525,7 +525,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
525525
let node: LabelTree = this.labelTreeNode;
526526
while (node.sublabels.length > 0) {
527527
const lastChild = node.sublabels[node.sublabels.length - 1];
528-
assert(lastChild !== undefined, "Expected label tree node to have children");
528+
assert(lastChild !== undefined, 0xcdc /* Expected label tree node to have children */);
529529
if (lastChild === this.mostRecentlyClosedLabelNode) {
530530
break;
531531
}
@@ -553,7 +553,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
553553
// Temporarily mark node as closed so currentLabelNode() returns its parent.
554554
this.mostRecentlyClosedLabelNode = node;
555555
const parent = this.currentLabelNode();
556-
assert(parent !== undefined, "Expected parent label node to exist");
556+
assert(parent !== undefined, 0xcdd /* Expected parent label node to exist */);
557557
parent.sublabels.pop();
558558
// Point to the parent's new last child (guaranteed closed if it exists),
559559
// or undefined if the parent has no more children.

packages/dds/tree/src/text/textDomainFormatted.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class StringArray extends sf.array("StringArray", [() => FormattedTextAsTree.Str
238238
break;
239239
}
240240
default: {
241-
fail("Unsupported node type in text array", () => `${cursor.type}`);
241+
fail(0xcde /* Unsupported node type in text array */, () => `${cursor.type}`);
242242
}
243243
}
244244
cursor.exitNode();

packages/framework/react/src/text/formatted/quillFormattedView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,10 @@ const FormattedTextEditorView = React.forwardRef<
360360
// The docs for retain imply this is always a number, but the type definitions allow a record here.
361361
// It is unknown why the type definitions allow a record as they have no doc comments.
362362
// For now this assert seems to be passing, so we just assume its always a number.
363-
assert(typeof op.retain === "number", "Expected retain count to be a number");
363+
assert(
364+
typeof op.retain === "number",
365+
0xcdf /* Expected retain count to be a number */,
366+
);
364367
// Convert UTF-16 retain count to codepoint count
365368
const retainedStr = content.slice(utf16Pos, utf16Pos + op.retain);
366369
const cpCount = codepointCount(retainedStr);

packages/runtime/container-runtime/src/opLifecycle/duplicateBatchDetector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ export class DuplicateBatchDetector {
6666
if (otherSequenceNumber !== undefined) {
6767
assert(
6868
this.batchIdsBySeqNum.get(otherSequenceNumber) === batchId,
69-
"batchIdToSeqNum and seqNumToBatchId should be in sync for duplicate",
69+
0xce0 /* batchIdToSeqNum and seqNumToBatchId should be in sync for duplicate */,
7070
);
7171
return { duplicate: true, otherSequenceNumber };
7272
}
7373

7474
// Now we know it's not a duplicate, so add it to the tracked batchIds and return.
7575
assert(
7676
!this.batchIdsBySeqNum.has(sequenceNumber),
77-
"seqNumToBatchId and batchIdToSeqNum should be in sync",
77+
0xce1 /* seqNumToBatchId and batchIdToSeqNum should be in sync */,
7878
);
7979

8080
// Add new batch

packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,6 @@ export const shortCodeMap = {
12021202
"0x92e": "Unknown node ID",
12031203
"0x933": "Inverse schema changes should never be transmitted",
12041204
"0x934": "Expected effect to cover entire mark",
1205-
"0x935": "Invalid write version for FieldBatch codec",
12061205
"0x936": "authHeader should not be null or empty",
12071206
"0x93a": "Snapshot sequence number is missing",
12081207
"0x93c": "id compressor should be enabled",
@@ -1371,8 +1370,6 @@ export const shortCodeMap = {
13711370
"0xa31": "Batch must have at least one message",
13721371
"0xa32": "Batch must have at least one message",
13731372
"0xa33": "clientId (from stateHandler) could only be undefined if we've never connected, but we have a CSN so we know that's not the case",
1374-
"0xa34": "Should have found the batchId in batchIdBySeqNum map",
1375-
"0xa35": "batchIdsAll and batchIdsBySeqNum should be in sync",
13761373
"0xa3a": "Presence received signal without clientId",
13771374
"0xa3c": "Already have entry for key in map",
13781375
"0xa3d": "Partial batch should have exactly one message",
@@ -1765,9 +1762,7 @@ export const shortCodeMap = {
17651762
"0xc20": "snapshot tree not found for one of tree's summarizables",
17661763
"0xc21": "Forest summary content missing in snapshot",
17671764
"0xc22": "Not tracking a summary",
1768-
"0xc23": "Tracked summary properties must be available when tracking a summary",
17691765
"0xc24": "Already tracking a summary",
1770-
"0xc25": "Tracked summary properties must not be available when ready to track",
17711766
"0xc27": "incremental decoder not available for incremental field decoding",
17721767
"0xc2c": "The data store should be locally visible when generating attach summary",
17731768
"0xc2d": "logger would be in sessionIdOrLogger in this codepath",
@@ -1932,5 +1927,16 @@ export const shortCodeMap = {
19321927
"0xcd3": "equality should be symmetric",
19331928
"0xcd4": "identicalCompatibility should have equivalent stored schema",
19341929
"0xcd5": "destinationField should be unhydrated since we're in the else branch of isHydrated() check",
1935-
"0xcd6": "Expect coordinatorResult to be defined"
1930+
"0xcd6": "Expect coordinatorResult to be defined",
1931+
"0xcd7": "overlapsPos not supported on BaseSequenceInterval",
1932+
"0xcd8": "clone not supported on BaseSequenceInterval",
1933+
"0xcd9": "union not supported on BaseSequenceInterval",
1934+
"0xcda": "start and end cannot be undefined because they were not passed in as undefined",
1935+
"0xcdb": "Expected current label node to exist",
1936+
"0xcdc": "Expected label tree node to have children",
1937+
"0xcdd": "Expected parent label node to exist",
1938+
"0xcde": "Unsupported node type in text array",
1939+
"0xcdf": "Expected retain count to be a number",
1940+
"0xce0": "batchIdToSeqNum and seqNumToBatchId should be in sync for duplicate",
1941+
"0xce1": "seqNumToBatchId and batchIdToSeqNum should be in sync"
19361942
};

0 commit comments

Comments
 (0)