assertCompartmentModule = (allegedModule, path, url) => {
  const { compartment, module, retained, ...extra } = allegedModule;
  assertEmptyObject(
    extra,
    `${path} must not have extra properties, got ${q({
      extra,
      compartment,
    })} in ${q(url)}`,
  );
  assert.typeof(
    compartment,
    'string',
    `${path}.compartment must be a string, got ${q(compartment)} in ${q(url)}`,
  );
  assert.typeof(
    module,
    'string',
    `${path}.module must be a string, got ${q(module)} in ${q(url)}`,
  );
  if (retained !== undefined) {
    assert.typeof(
      retained,
      'boolean',
      `${path}.retained must be a boolean, got ${q(retained)} in ${q(url)}`,
    );
  }
}
@param {Record<string, unknown>} allegedModule
@param {string} path
@param {string} url