Skip to content

Commit 6165953

Browse files
committed
chore(gates): drop the implementedBy row marker and its check
The webdriver rows were the only rows naming another branch; they now have a driver, so the field, its ownership filter, and the gate assertion that only webdriver rows could carry it have no remaining use. Every row must now have a driver file.
1 parent 8ccc60a commit 6165953

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

‎packages/contracts/src/dispatch-disclosure.fixtures.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export type DispatchDisclosureRow = {
2121
dispatched: DispatchDisclosure;
2222
/** Direct iOS selector tap rows: whether the failure delegates to the tree path, which taps again. */
2323
fallsBack?: boolean;
24-
/** A branch that ships this row's producer; the row is not owned here until it merges. */
25-
implementedBy?: string;
2624
};
2725

2826
const REPO_ROOT = fileURLToPath(new URL('../../../', import.meta.url));
@@ -34,8 +32,7 @@ export const DISPATCH_DISCLOSURE_TABLE_PATH = path.join(
3432

3533
/**
3634
* The test file that drives each row through its real producer, keyed by row-id prefix; the
37-
* longest matching prefix owns the row. A row naming `implementedBy` has no owner until that branch
38-
* lands. Each driver file runs one test per owned row with the loop `for (const row of <ROWS>) {`
35+
* longest matching prefix owns the row. Each driver file runs one test per owned row with the loop `for (const row of <ROWS>) {`
3936
* followed by `test(\`${row.id}`, which {@link DISPATCH_DISCLOSURE_ROW_LOOP} matches.
4037
*/
4138
export const DISPATCH_DISCLOSURE_DRIVER_OWNERS: Readonly<Record<string, string>> = {
@@ -74,7 +71,7 @@ export function parseDispatchDisclosureTable(tableText: string): DispatchDisclos
7471
return JSON.parse(tableText) as DispatchDisclosureRow[];
7572
}
7673

77-
/** The rows the given driver file owns, less those another branch ships. */
74+
/** The rows the given driver file owns. */
7875
export function dispatchDisclosureRowsOwnedBy(
7976
driverFileUrl: string,
8077
tableText: string,
@@ -84,8 +81,7 @@ export function dispatchDisclosureRowsOwnedBy(
8481
.split(path.sep)
8582
.join('/');
8683
return parseDispatchDisclosureTable(tableText).filter(
87-
(row) =>
88-
row.implementedBy === undefined && dispatchDisclosureDriverOwner(row.id) === driverFile,
84+
(row) => dispatchDisclosureDriverOwner(row.id) === driverFile,
8985
);
9086
}
9187

‎packages/contracts/src/dispatch-disclosure.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ test('dispatch-disclosure rows are unique and use the declared vocabulary', () =
4141
assert.ok(DISPATCH_VALUES.includes(row.dispatched), row.id);
4242
assert.ok(row.trigger.trim().length > 0, row.id);
4343
assert.equal(row.fallsBack !== undefined, row.id.startsWith('maestro-direct.'), row.id);
44-
if (row.implementedBy !== undefined) assert.ok(row.id.startsWith('webdriver.'), row.id);
4544
}
4645
});
4746

48-
test('every row without implementedBy has a driver file, and every owner prefix owns a row', () => {
47+
test('every row has a driver file, and every owner prefix owns a row', () => {
4948
const rows = parseDispatchDisclosureTable(
5049
fs.readFileSync(DISPATCH_DISCLOSURE_TABLE_PATH, 'utf8'),
5150
);
5251
const unowned = rows
53-
.filter((row) => row.implementedBy === undefined)
5452
.filter((row) => dispatchDisclosureDriverOwner(row.id) === undefined)
5553
.map((row) => row.id);
5654
assert.deepEqual(unowned, []);

0 commit comments

Comments
 (0)