def METHOD_NAME(registry_path: Path, doc_dir: Path, updates: Sequence[str]):
    """
    Update the URL registry by:
    • Adding new pages
    • Updating page aliases
    """
    # Parse updates
    updates_ = dict(map(parse_page_update, updates))
    # Load previous registry
    with registry_path.open("rt", encoding="utf-8") as fd:
        registry = yaml.safe_load(fd) or {}
    # Expected updates
    missing_updates = set(file for file in registry if not (doc_dir / file).is_file())
    # Update
    invalid_updates = set(updates_)
    redirections = frozenset(chain(*registry.values()))
    for file in glob.iglob("**/*.html", root_dir=doc_dir, recursive=True):
        # Skip redirection pages
        if file in redirections:
            continue
        # Get previous entry and potential update
        old = updates_.get(file)
        if old:
            # Update old entry
            invalid_updates.remove(file)
            entry = registry.get(old)
            if entry is None:
                raise ValueError(f"Invalid update: {file}<-{old}")
            else:
                del registry[old]
                missing_updates.remove(old)
                registry[file] = [e for e in [old] + entry if e != file]
                print(f"[INFO] Updated: “{old}” to “{file}”")
        else:
            entry = registry.get(file)
            if entry is None:
                # New entry
                registry[file] = []
                print(f"[INFO] Added: {file}")
            else:
                # Keep previous entry
                pass
    exit_code = ExitCode.NORMAL
    # Check
    if invalid_updates:
        for update in invalid_updates:
            print(f"[ERROR] Update not processed: {update}")
        exit_code |= ExitCode.INVALID_UPDATES
    if missing_updates:
        for old in missing_updates:
            print(f"[ERROR] “{old}” not found and has no update.")
        exit_code |= ExitCode.MISSING_UPDATES
    if exit_code:
        print(f"[ERROR] Processing interrupted: please fix the errors above.")
        exit(exit_code.value)
    # Write changes
    with registry_path.open("wt", encoding="utf-8") as fd:
        fd.write(f"# WARNING: This file is autogenerated by: {RELATIVE_SCRIPT_PATH}\n")
        fd.write(f"#          Do not edit manually.\n")
        yaml.dump(
            registry,
            fd,
        )