From deaf8b91df70c75d4e94be9ba7bcd55bb985d649 Mon Sep 17 00:00:00 2001 From: Jatin Garg <48029724+jatgarg@users.noreply.github.com> Date: Wed, 17 May 2023 16:16:49 -0700 Subject: [PATCH] Policy check fix before minor release (#15636) ## Description Policy check fix before minor release --- .../typedSchema/buildViewSchemaCollection.ts | 12 ++- .../typedSchema/schemaBuilder.ts | 6 +- .../typedSchema/typedTreeSchema.ts | 2 +- .../schema-aware/schemaAware.ts | 4 +- .../sequence-field/compose.ts | 28 +++--- .../sequence-field/moveEffectTable.ts | 10 ++- .../sequence-field/rebase.ts | 14 +-- .../sequence-field/sequenceFieldToDelta.ts | 4 +- .../sequence-field/tracker.ts | 7 +- .../feature-libraries/sequence-field/utils.ts | 7 +- .../dds/tree2/src/shared-tree-core/branch.ts | 10 +-- .../tree2/src/shared-tree-core/editManager.ts | 2 +- .../src/shared-tree-core/sharedTreeCore.ts | 2 +- packages/dds/map/src/directory.ts | 2 +- .../src/assertionShortCodesMap.ts | 85 ++++++++++--------- 15 files changed, 112 insertions(+), 83 deletions(-) diff --git a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/buildViewSchemaCollection.ts b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/buildViewSchemaCollection.ts index 6b4a04aab298..dd231ab341e6 100644 --- a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/buildViewSchemaCollection.ts +++ b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/buildViewSchemaCollection.ts @@ -47,7 +47,10 @@ export function buildViewSchemaCollection( for (const [key, field] of library.globalFieldSchema) { // This check is an assert since if it fails, the other error messages would be incorrect. - assert(field.builder.name === library.name, "field must be part by the library its in"); + assert( + field.builder.name === library.name, + 0x6a8 /* field must be part by the library its in */, + ); const existing = globalFieldSchema.get(key); if (existing !== undefined) { errors.push( @@ -59,7 +62,10 @@ export function buildViewSchemaCollection( } for (const [key, tree] of library.treeSchema) { // This check is an assert since if it fails, the other error messages would be incorrect. - assert(tree.builder.name === library.name, "tree must be part by the library its in"); + assert( + tree.builder.name === library.name, + 0x6a9 /* tree must be part by the library its in */, + ); const existing = treeSchema.get(key); if (existing !== undefined) { errors.push( @@ -114,7 +120,7 @@ export function validateViewSchemaCollection(collection: ViewSchemaCollection2): // Validate that all schema referenced are included, and none are "never". for (const [key, field] of collection.globalFieldSchema) { - assert(key === field.key, "field key should match map key"); + assert(key === field.key, 0x6aa /* field key should match map key */); validateGlobalField(collection, field, errors); } for (const [identifier, tree] of collection.treeSchema) { diff --git a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/schemaBuilder.ts b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/schemaBuilder.ts index 70c8f2b8cb29..33678b4a7e10 100644 --- a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/schemaBuilder.ts +++ b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/schemaBuilder.ts @@ -105,7 +105,7 @@ export class SchemaBuilder { t: T, ): TreeSchema { const schema = new TreeSchema(this, name, t); - assert(!this.treeSchema.has(schema.name), "Conflicting TreeSchema names"); + assert(!this.treeSchema.has(schema.name), 0x6ab /* Conflicting TreeSchema names */); this.treeSchema.set(schema.name, schema as TreeSchema); return schema; } @@ -150,7 +150,7 @@ export class SchemaBuilder { field: FieldSchema, ): GlobalFieldSchema { const schema = new GlobalFieldSchema(this, brand(key), field); - assert(!this.globalFieldSchema.has(schema.key), "Conflicting global field keys"); + assert(!this.globalFieldSchema.has(schema.key), 0x6ac /* Conflicting global field keys */); this.globalFieldSchema.set(schema.key, schema); return schema; } @@ -238,7 +238,7 @@ export class SchemaBuilder { } private finalize(): void { - assert(!this.finalized, "SchemaBuilder can only be finalized once."); + assert(!this.finalized, 0x6ad /* SchemaBuilder can only be finalized once. */); this.finalized = true; this.libraries.add({ name: this.name, diff --git a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/typedTreeSchema.ts b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/typedTreeSchema.ts index 75b4087c9da1..d0155378314b 100644 --- a/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/typedTreeSchema.ts +++ b/experimental/dds/tree2/src/feature-libraries/modular-schema/typedSchema/typedTreeSchema.ts @@ -134,7 +134,7 @@ function normalizeField(t: T): NormalizeField return FieldSchema.empty as unknown as NormalizeField; } - assert(t instanceof FieldSchema, "invalid FieldSchema"); + assert(t instanceof FieldSchema, 0x6ae /* invalid FieldSchema */); return t as NormalizeField; } diff --git a/experimental/dds/tree2/src/feature-libraries/schema-aware/schemaAware.ts b/experimental/dds/tree2/src/feature-libraries/schema-aware/schemaAware.ts index 98470e2ac850..ecc92bf27f43 100644 --- a/experimental/dds/tree2/src/feature-libraries/schema-aware/schemaAware.ts +++ b/experimental/dds/tree2/src/feature-libraries/schema-aware/schemaAware.ts @@ -288,13 +288,13 @@ export function downCast( const contextSchema = tree[contextSymbol].schema; const lookedUp = contextSchema.treeSchema.get(schema.name); // TODO: for this to pass, schematized view must have the view schema, not just stored schema. - assert(lookedUp === schema, "cannot downcast to a schema the tree is not using"); + assert(lookedUp === schema, 0x68c /* cannot downcast to a schema the tree is not using */); // TODO: make this actually work const matches = tree[typeSymbol] === schema; assert( matches === (tree[typeSymbol].name === schema.name), - "schema object identity comparison should match identifier comparison", + 0x68d /* schema object identity comparison should match identifier comparison */, ); return matches; } diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/compose.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/compose.ts index f06b19378eba..32b61a27dc65 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/compose.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/compose.ts @@ -180,7 +180,7 @@ function composeMarks( } else if (!markHasCellEffect(newMark)) { const moveInId = getMarkMoveId(baseMark); if (nodeChange !== undefined && moveInId !== undefined) { - assert(isMoveMark(baseMark), "Only move marks have move IDs"); + assert(isMoveMark(baseMark), 0x68e /* Only move marks have move IDs */); getOrAddEffect( moveEffects, CrossFieldTarget.Source, @@ -196,7 +196,10 @@ function composeMarks( const moveOutId = getMarkMoveId(newMark); if (moveInId !== undefined && moveOutId !== undefined) { - assert(isMoveMark(baseMark) && isMoveMark(newMark), "Only move marks have move IDs"); + assert( + isMoveMark(baseMark) && isMoveMark(newMark), + 0x68f /* Only move marks have move IDs */, + ); const srcEffect = getOrAddEffect( moveEffects, CrossFieldTarget.Source, @@ -228,7 +231,7 @@ function composeMarks( } if (moveInId !== undefined) { - assert(isMoveMark(baseMark), "Only move marks have move IDs"); + assert(isMoveMark(baseMark), 0x690 /* Only move marks have move IDs */); getOrAddEffect( moveEffects, CrossFieldTarget.Source, @@ -240,7 +243,7 @@ function composeMarks( } if (moveOutId !== undefined) { - assert(isMoveMark(newMark), "Only move marks have move IDs"); + assert(isMoveMark(newMark), 0x691 /* Only move marks have move IDs */); // The nodes attached by `baseMark` have been moved by `newMark`. // We can represent net effect of the two marks by moving `baseMark` to the destination of `newMark`. @@ -270,7 +273,7 @@ function createModifyMark( return { count: cellId === undefined ? length : 0 }; } - assert(length === 1, "A mark with a node change must have length one"); + assert(length === 1, 0x692 /* A mark with a node change must have length one */); const mark: Modify = { type: "Modify", changes: nodeChange }; if (cellId !== undefined) { mark.detachEvent = cellId; @@ -463,10 +466,13 @@ export class ComposeQueue { } else if (areOutputCellsEmpty(baseMark) && areInputCellsEmpty(newMark)) { // TODO: `baseMark` might be a MoveIn, which is not an ExistingCellMark. // See test "[Move ABC, Return ABC] ↷ Delete B" in sequenceChangeRebaser.spec.ts - assert(isExistingCellMark(baseMark), "Only existing cell mark can have empty output"); + assert( + isExistingCellMark(baseMark), + 0x693 /* Only existing cell mark can have empty output */, + ); let baseCellId: DetachEvent; if (markEmptiesCells(baseMark)) { - assert(isDetachMark(baseMark), "Only detach marks can empty cells"); + assert(isDetachMark(baseMark), 0x694 /* Only detach marks can empty cells */); const baseRevision = baseMark.revision ?? this.baseMarks.revision; const baseIntention = getIntention(baseRevision, this.revisionMetadata); if (baseRevision === undefined || baseIntention === undefined) { @@ -477,7 +483,7 @@ export class ComposeQueue { // (which requires the local changes to have a revision tag)) assert( isNewAttach(newMark), - "TODO: Assign revision tags to each change in a transaction", + 0x695 /* TODO: Assign revision tags to each change in a transaction */, ); return this.dequeueNew(); } @@ -488,7 +494,7 @@ export class ComposeQueue { } else { assert( areInputCellsEmpty(baseMark), - "Mark with empty output must either be a detach or also have input empty", + 0x696 /* Mark with empty output must either be a detach or also have input empty */, ); baseCellId = baseMark.detachEvent; } @@ -584,7 +590,7 @@ export class ComposeQueue { const newMark = this.newMarks.peek(); assert( baseMark !== undefined && newMark !== undefined, - "Cannot dequeue both unless both mark queues are non-empty", + 0x697 /* Cannot dequeue both unless both mark queues are non-empty */, ); const length = Math.min(getMarkLength(newMark), getMarkLength(baseMark)); return { @@ -611,7 +617,7 @@ function areInverseMoves( ): boolean { assert( baseMark.type === "MoveIn" || baseMark.type === "ReturnTo", - "TODO: Handle case where `baseMark` is a detach", + 0x698 /* TODO: Handle case where `baseMark` is a detach */, ); if (baseMark.type === "ReturnTo" && baseMark.detachEvent?.revision === newIntention) { return true; diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/moveEffectTable.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/moveEffectTable.ts index b6d65c10cad9..ac6aad563d75 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/moveEffectTable.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/moveEffectTable.ts @@ -233,7 +233,10 @@ function applyMoveEffectsToDest( }; if (newMark.type === "ReturnTo" && newMark.detachEvent !== undefined) { - assert(effect.count !== undefined, "Should have a count when splitting a mark"); + assert( + effect.count !== undefined, + 0x699 /* Should have a count when splitting a mark */, + ); newMark.detachEvent = { ...newMark.detachEvent, index: newMark.detachEvent.index + effect.count, @@ -308,7 +311,10 @@ function applyMoveEffectsToSource( count: childEffect.count, }; if (newMark.detachEvent !== undefined) { - assert(effect.count !== undefined, "Should specify a count when splitting a mark"); + assert( + effect.count !== undefined, + 0x69a /* Should specify a count when splitting a mark */, + ); newMark.detachEvent = { ...newMark.detachEvent, index: newMark.detachEvent.index + effect.count, diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/rebase.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/rebase.ts index 63c01d79b5be..f57177a58fe5 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/rebase.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/rebase.ts @@ -81,7 +81,7 @@ export function rebase( manager: CrossFieldManager, revisionMetadata: RevisionMetadataSource, ): Changeset { - assert(base.revision !== undefined, "Cannot rebase over changeset with no revision"); + assert(base.revision !== undefined, 0x69b /* Cannot rebase over changeset with no revision */); const baseInfo = base.revision === undefined ? undefined : revisionMetadata.getInfo(base.revision); const baseIntention = baseInfo?.rollbackOf ?? base.revision; @@ -311,7 +311,7 @@ class RebaseQueue { const newMark = this.newMarks.peek(); assert( baseMark !== undefined && newMark !== undefined, - "Cannot dequeue both unless both mark queues are non-empty", + 0x69c /* Cannot dequeue both unless both mark queues are non-empty */, ); const length = Math.min(getMarkLength(newMark), getMarkLength(baseMark)); return { @@ -359,7 +359,7 @@ function rebaseMark( assert( !isNewAttach(rebasedMark), - "A new attach should not be rebased over its cell being emptied", + 0x69d /* A new attach should not be rebased over its cell being emptied */, ); if (isMoveMark(rebasedMark)) { @@ -383,7 +383,7 @@ function rebaseMark( } else if (markFillsCells(baseMark)) { assert( isExistingCellMark(rebasedMark), - "Only an ExistingCellMark can target an empty cell", + 0x69e /* Only an ExistingCellMark can target an empty cell */, ); if (isMoveMark(rebasedMark)) { if (rebasedMark.type === "MoveOut" || rebasedMark.type === "ReturnFrom") { @@ -461,7 +461,7 @@ function makeDetachedMark( return { count: 0 }; } - assert(mark.detachEvent === undefined, "Expected mark to be attached"); + assert(mark.detachEvent === undefined, 0x69f /* Expected mark to be attached */); return { ...mark, detachEvent: { revision: detachIntention, index: offset } }; } @@ -634,7 +634,7 @@ function compareCellPositions( gapOffsetInBase: number, ): number { const baseId = getCellId(baseMark, baseIntention); - assert(baseId !== undefined, "baseMark should have cell ID"); + assert(baseId !== undefined, 0x6a0 /* baseMark should have cell ID */); const newId = getCellId(newMark, undefined); if (baseId.revision === newId?.revision) { return baseId.index - newId.index; @@ -675,7 +675,7 @@ function compareCellPositions( assert( isNewAttach(baseMark), - "Lineage should determine order of marks unless one is a new attach", + 0x6a1 /* Lineage should determine order of marks unless one is a new attach */, ); // `newMark` points to cells which were emptied before `baseMark` was created. diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts index c99bfb19d0b8..a8b316d3d2e3 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts @@ -25,7 +25,7 @@ export function sequenceFieldToDelta( } else { // Inline into `switch(mark.type)` once we upgrade to TS 4.7 const type = mark.type; - assert(type !== NoopMarkType, "Cell changing mark must no be a NoopMark"); + assert(type !== NoopMarkType, 0x6b0 /* Cell changing mark must no be a NoopMark */); switch (type) { case "Insert": { const cursors = mark.content.map(singleTextCursor); @@ -115,7 +115,7 @@ function deltaFromNodeChange( if (change === undefined) { return length; } - assert(length === 1, "Modifying mark must be length one"); + assert(length === 1, 0x6a3 /* Modifying mark must be length one */); const modify = deltaFromChild(change); return isEmptyModify(modify) ? 1 : modify; } diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/tracker.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/tracker.ts index a797a9ce9d17..4d85b433ab83 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/tracker.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/tracker.ts @@ -31,7 +31,7 @@ export class IndexTracker { return; } - assert(!isNoopMark(mark) && !isModify(mark), "These marks have no cell effects"); + assert(!isNoopMark(mark) && !isModify(mark), 0x6a4 /* These marks have no cell effects */); const netLength = outLength - inLength; // If you hit this assert, then you probably need to add a check for it in `isNetZeroNodeCountChange`. @@ -87,7 +87,10 @@ export class GapTracker { if (!markHasCellEffect(mark)) { this.map.clear(); } else { - assert(!isNoopMark(mark) && !isModify(mark), "These marks have no cell effects"); + assert( + !isNoopMark(mark) && !isModify(mark), + 0x6a5 /* These marks have no cell effects */, + ); const revision = mark.revision; // TODO: Remove this early return. It is only needed because some tests use anonymous changes. // These tests will fail (i.e., produce the wrong result) if they rely the index tracking performed here. diff --git a/experimental/dds/tree2/src/feature-libraries/sequence-field/utils.ts b/experimental/dds/tree2/src/feature-libraries/sequence-field/utils.ts index 51e9f3084481..ed6b518660ab 100644 --- a/experimental/dds/tree2/src/feature-libraries/sequence-field/utils.ts +++ b/experimental/dds/tree2/src/feature-libraries/sequence-field/utils.ts @@ -333,7 +333,7 @@ export function tryExtendMark( } if (isExistingCellMark(lhs)) { - assert(isExistingCellMark(rhs), "Should be existing cell mark"); + assert(isExistingCellMark(rhs), 0x6a6 /* Should be existing cell mark */); if (lhs.detachEvent?.revision !== rhs.detachEvent?.revision) { return false; } @@ -1052,7 +1052,10 @@ export function withNodeChange( return changes !== undefined ? { type: "Modify", changes } : mark; case "MoveIn": case "ReturnTo": - assert(changes === undefined, "Cannot have a node change on a MoveIn or ReturnTo mark"); + assert( + changes === undefined, + 0x6a7 /* Cannot have a node change on a MoveIn or ReturnTo mark */, + ); return mark; case "Delete": case "Insert": diff --git a/experimental/dds/tree2/src/shared-tree-core/branch.ts b/experimental/dds/tree2/src/shared-tree-core/branch.ts index 8b99c73ed0a6..9ec7f556d6e2 100644 --- a/experimental/dds/tree2/src/shared-tree-core/branch.ts +++ b/experimental/dds/tree2/src/shared-tree-core/branch.ts @@ -143,7 +143,7 @@ export class SharedTreeBranch exten */ public setHead(head: GraphCommit): void { this.assertNotDisposed(); - assert(!this.isTransacting(), "Cannot set head during a transaction"); + assert(!this.isTransacting(), 0x685 /* Cannot set head during a transaction */); this.head = head; } @@ -322,7 +322,7 @@ export class SharedTreeBranch exten public undo(): [change: TChange, newCommit: GraphCommit] | undefined { assert( this.undoRedoManager !== undefined, - "Must construct branch with an `UndoRedoManager` in order to undo.", + 0x686 /* Must construct branch with an `UndoRedoManager` in order to undo. */, ); // TODO: allow this once it becomes possible to compose the changesets created by edits made // within transactions and edits that represent completed transactions. @@ -345,7 +345,7 @@ export class SharedTreeBranch exten public redo(): [change: TChange, newCommit: GraphCommit] | undefined { assert( this.undoRedoManager !== undefined, - "Must construct branch with an `UndoRedoManager` in order to redo.", + 0x687 /* Must construct branch with an `UndoRedoManager` in order to redo. */, ); // TODO: allow this once it becomes possible to compose the changesets created by edits made // within transactions and edits that represent completed transactions. @@ -410,7 +410,7 @@ export class SharedTreeBranch exten // TODO: We probably can rebase a revertible branch onto a non-revertible branch. assert( branch.undoRedoManager !== undefined, - "Cannot rebase a revertible branch onto a non-revertible branch", + 0x688 /* Cannot rebase a revertible branch onto a non-revertible branch */, ); this.undoRedoManager.updateAfterRebase(sourceCommits, branch.undoRedoManager); } @@ -452,7 +452,7 @@ export class SharedTreeBranch exten // TODO: We probably can merge a non-revertible branch into a revertible branch. assert( branch.undoRedoManager !== undefined, - "Cannot merge a non-revertible branch into a revertible branch", + 0x689 /* Cannot merge a non-revertible branch into a revertible branch */, ); this.undoRedoManager.updateAfterMerge(sourceCommits, branch.undoRedoManager); } diff --git a/experimental/dds/tree2/src/shared-tree-core/editManager.ts b/experimental/dds/tree2/src/shared-tree-core/editManager.ts index 565d1e3de8ed..5e6ba8a6c348 100644 --- a/experimental/dds/tree2/src/shared-tree-core/editManager.ts +++ b/experimental/dds/tree2/src/shared-tree-core/editManager.ts @@ -356,7 +356,7 @@ export class EditManager< public loadSummaryData(data: SummaryData): void { assert( this.isEmpty(), - "Attempted to load from summary after edit manager was already mutated", + 0x68a /* Attempted to load from summary after edit manager was already mutated */, ); this.sequenceMap.clear(); this.trunk.setHead( diff --git a/experimental/dds/tree2/src/shared-tree-core/sharedTreeCore.ts b/experimental/dds/tree2/src/shared-tree-core/sharedTreeCore.ts index b19d800641c3..9e9c070d4a27 100644 --- a/experimental/dds/tree2/src/shared-tree-core/sharedTreeCore.ts +++ b/experimental/dds/tree2/src/shared-tree-core/sharedTreeCore.ts @@ -252,7 +252,7 @@ export class SharedTreeCore extends // Edits should not be submitted until all transactions finish assert( !this.getLocalBranch().isTransacting(), - "Unexpected edit submitted during transaction", + 0x68b /* Unexpected edit submitted during transaction */, ); // Edits submitted before the first attach are treated as sequenced because they will be included diff --git a/packages/dds/map/src/directory.ts b/packages/dds/map/src/directory.ts index 13f7204beef4..7f0f188be995 100644 --- a/packages/dds/map/src/directory.ts +++ b/packages/dds/map/src/directory.ts @@ -1071,7 +1071,7 @@ function isDirectoryLocalOpMetadata(metadata: any): metadata is DirectoryLocalOp /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ function assertNonNullClientId(clientId: string | null): asserts clientId is string { - assert(clientId !== null, "client id should never be null"); + assert(clientId !== null, 0x6af /* client id should never be null */); } /** diff --git a/packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts b/packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts index 1bac83490f23..7a3ecae3977f 100644 --- a/packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts +++ b/packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts @@ -299,8 +299,7 @@ export const shortCodeMap = { "0x177": "Missing delta handler", "0x178": "Missing delta handler on attach", "0x179": "createChannel() with existing ID", - "0x17a": "Channel should be loaded when created!!", - "0x17b": "Channel to be binded should be in not bounded set", + "0x17b": "Channel to be bound should be in not bounded set", "0x17c": "Unexpected attach (local) channel OP", "0x17d": "Unexpected attach channel OP", "0x17e": "Used route does not belong to any known context", @@ -313,16 +312,11 @@ export const shortCodeMap = { "0x185": "Channel not found", "0x189": "Should always be remote because a local dds shouldn't generate ops before loading", "0x18a": "Channel should be loaded to resubmit ops", - "0x18c": "Channel should be loaded to summarize", "0x18d": "Channel should be loaded to take snapshot", - "0x18e": "Channel must not already be loaded when loading", - "0x190": ".attributes blob should be present", "0x192": "Channel should be there if loaded!!", - "0x193": "Channel should be loaded to run GC", "0x194": "Remote channel must be loaded when rebasing op", "0x195": "Remote channel must not be local when processing op", "0x196": "Remote channel must be loaded when resubmitting op", - "0x197": "Remote channel must not already be loaded when loading", "0x198": "Used route should always be an absolute route", "0x19a": "Invalid response value for Fluid object request", "0x19b": "Cannot not create response error on 200 status", @@ -396,8 +390,6 @@ export const shortCodeMap = { "0x201": "Returned odsp snapshot is malformed. No blobs!", "0x203": "Summary handle is undefined", "0x205": "attach() called more than once", - "0x207": "Channel should be defined", - "0x208": "Factory should be undefined before loading", "0x209": "Factory Type should be defined", "0x20a": "register for event on disposed object", "0x20b": "mismatch", @@ -518,7 +510,6 @@ export const shortCodeMap = { "0x2b4": "not connected on sending ops!", "0x2b5": "logic error", "0x2b6": "Missing data store context", - "0x2b7": "Can't validate correctness without GC data from last run", "0x2b8": "Chunk should be set in map", "0x2ba": "batchBegin must fire before batchEnd", "0x2bb": "Instrumented token fetcher with throwOnNullToken = true should never return null", @@ -555,7 +546,6 @@ export const shortCodeMap = { "0x2e0": "lref not a Local Reference", "0x2e1": "Support for plain value types removed.", "0x2e2": "Must only wait for leave message when clientId in quorum", - "0x2e3": "Must have a valid protocol handler instance", "0x2e4": "there should be service config for active connection", "0x2e8": "There should be a store context for the op", "0x2e9": "Must call getLocalState() after applying initial states", @@ -928,33 +918,15 @@ export const shortCodeMap = { "0x4d9": "expected array for a sequence field", "0x4da": "single value provided for an unsupported field", "0x4db": "Non-empty queue should not return two undefined marks", - "0x4dc": "A new attach cannot be at the same position as a base mark", - "0x4dd": "Invalid mark overlap", "0x4de": "Cloned should be same type as input mark", - "0x4df": "Compose base mark should carry revision info", - "0x4e0": "Overshot the target gap", - "0x4e1": "Nested changes should have been moved to the destination of the move/return that detached them", "0x4e2": "Unexpected end of mark queue", - "0x4e3": "Can only split sized marks on input", - "0x4e4": "Should only dequeue output if the next mark has output length > 0", "0x4f3": "Unable to keep track of the base input offset in composite changeset", "0x4f4": "Non-empty queue should return at least one mark", "0x4f5": "A new attach cannot be at the same position as another mark", "0x4f6": "The two marks should be the same size", - "0x4f7": "A conflicted ReturnFrom should have a detachIndex", - "0x4f8": "Only a detach or a reattach can overlap with a non-inert reattach", - "0x4f9": "TODO: support conflict management for other detach marks", - "0x4fa": "Invalid reattach mark overlap", - "0x4fb": "Invalid reattach mark overlap", - "0x4fc": "Unsupported reattach mark overlap", - "0x4fd": "Invalid revive mark overlap", - "0x4fe": "Only a skip-like reattach can overlap with a ReturnFrom", - "0x4ff": "Only a skip-like reattach can overlap with a ReturnFrom", "0x501": "Unknown mark type with net-zero node count change", "0x502": "Compose base mark should carry revision info", "0x503": "Compose base mark should carry revision info", - "0x504": "No new reattach mark to line up", - "0x505": "No base reattach mark to line up", "0x506": "First changeset as inconsistent characterization of detached nodes", "0x507": "Should be loaded only once", "0x508": "Audience must exist when instantiating attribution-providing runtime", @@ -1042,17 +1014,14 @@ export const shortCodeMap = { "0x565": "TODO: Support multiple dependents per key", "0x566": "Cannot modify move destination", "0x567": "Child effects should have size", - "0x568": "Should define count when splitting a mark", "0x569": "Must provide a change composer if modifying moves", "0x56a": "TODO: support updating MoveOut.isSrcConflicted", "0x56b": "Child effects should have size", - "0x56c": "Should define count when splitting a mark", "0x56d": "Inconsistent merge info", "0x56e": "summary upload manager should have been initialized", "0x56f": "Should be loaded only once", "0x570": "Inconsistent state! GC says the data store is deleted, but the data store is not deleted from the runtime.", "0x571": "Attempting to delete unknown dataStore", - "0x572": "Expected sequence map to be the same size as the trunk", "0x573": "Expected branches to be related", "0x576": "branch A and branch B must be related", "0x577": "Expected revision to be valid RevisionTag", @@ -1131,8 +1100,6 @@ export const shortCodeMap = { "0x5c7": "Encoded schema should validate", "0x5c8": "Unexpected kind", "0x5c9": "Incremental Schema during update should be a allow a superset of the final schema", - "0x5ca": "Unsupported ISharedTreeFork implementation", - "0x5cb": "Branch may not be merged while transaction is in progress", "0x5cc": "It is invalid to replace the sequence field with a non array value.", "0x5cd": "It is invalid to replace a value field with undefined", "0x5ce": "more than one top level node in non-sequence filed", @@ -1287,30 +1254,68 @@ export const shortCodeMap = { "0x668": "Version numbers should follow semantic versioning.", "0x669": "tree must be a new SharedTree", "0x66a": "Undo is not yet supported during transactions", - "0x66b": "Undo is not yet supported during transactions", "0x66c": "A modify mark must have length equal to one", "0x66d": "Cannot close a transaction that has already failed. Use abortEdit instead.", "0x66e": "Branch is disposed", - "0x66f": "Expected commit to be on the trunk branch", "0x670": "Branch was registered more than once", "0x671": "Expected branch to be tracked", "0x672": "Expected no registered branches when clearing trunk", - "0x673": "Unexpected edit submitted during transaction", "0x674": "Unexpected transaction is open while applying stashed ops", "0x675": "branches must be related", "0x676": "target commit is not in target branch", "0x677": "The head commit should be based off the undoable commit.", - "0x678": "The rebased head should be based off of the base branch.", "0x679": "token should be present", "0x67a": "IdCompressor should be defined if enabled", "0x67b": "IdCompressor should be defined if enabled", "0x67c": "IdCompressor should be defined if enabled", "0x67d": "IdCompressor should be defined if enabled", "0x67e": "Redo is not yet supported during transactions", - "0x67f": "Redo is not yet supported during transactions", "0x680": "new range must not already exist", "0x681": "count must be positive", "0x682": "coupleInfo must have nodes to couple", "0x683": "Both source and destination fields must be sequence fields.", - "0x684": "destination field proxy must be a field proxy target" + "0x684": "destination field proxy must be a field proxy target", + "0x685": "Cannot set head during a transaction", + "0x686": "Must construct branch with an `UndoRedoManager` in order to undo.", + "0x687": "Must construct branch with an `UndoRedoManager` in order to redo.", + "0x688": "Cannot rebase a revertible branch onto a non-revertible branch", + "0x689": "Cannot merge a non-revertible branch into a revertible branch", + "0x68a": "Attempted to load from summary after edit manager was already mutated", + "0x68b": "Unexpected edit submitted during transaction", + "0x68c": "cannot downcast to a schema the tree is not using", + "0x68d": "schema object identity comparison should match identifier comparison", + "0x68e": "Only move marks have move IDs", + "0x68f": "Only move marks have move IDs", + "0x690": "Only move marks have move IDs", + "0x691": "Only move marks have move IDs", + "0x692": "A mark with a node change must have length one", + "0x693": "Only existing cell mark can have empty output", + "0x694": "Only detach marks can empty cells", + "0x695": "TODO: Assign revision tags to each change in a transaction", + "0x696": "Mark with empty output must either be a detach or also have input empty", + "0x697": "Cannot dequeue both unless both mark queues are non-empty", + "0x698": "TODO: Handle case where `baseMark` is a detach", + "0x699": "Should have a count when splitting a mark", + "0x69a": "Should specify a count when splitting a mark", + "0x69b": "Cannot rebase over changeset with no revision", + "0x69c": "Cannot dequeue both unless both mark queues are non-empty", + "0x69d": "A new attach should not be rebased over its cell being emptied", + "0x69e": "Only an ExistingCellMark can target an empty cell", + "0x69f": "Expected mark to be attached", + "0x6a0": "baseMark should have cell ID", + "0x6a1": "Lineage should determine order of marks unless one is a new attach", + "0x6a3": "Modifying mark must be length one", + "0x6a4": "These marks have no cell effects", + "0x6a5": "These marks have no cell effects", + "0x6a6": "Should be existing cell mark", + "0x6a7": "Cannot have a node change on a MoveIn or ReturnTo mark", + "0x6a8": "field must be part by the library its in", + "0x6a9": "tree must be part by the library its in", + "0x6aa": "field key should match map key", + "0x6ab": "Conflicting TreeSchema names", + "0x6ac": "Conflicting global field keys", + "0x6ad": "SchemaBuilder can only be finalized once.", + "0x6ae": "invalid FieldSchema", + "0x6af": "client id should never be null", + "0x6b0": "Cell changing mark must no be a NoopMark" };