Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/skit/src/auth/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use tower::limit::ConcurrencyLimitLayer;

const AUTH_MAX_BODY_BYTES: usize = 64 * 1024;
const AUTH_MAX_CONCURRENCY: usize = 64;
const RELOAD_KEYS_MAX_CONCURRENCY: usize = 1;

/// Request body for login endpoint.
#[derive(Debug, Deserialize)]
Expand Down Expand Up @@ -508,7 +509,8 @@ pub fn auth_router() -> axum::Router<Arc<AppState>> {
)
.route(
"/reload-keys",
post(reload_keys_handler).layer(ConcurrencyLimitLayer::new(AUTH_MAX_CONCURRENCY)),
post(reload_keys_handler)
.layer(ConcurrencyLimitLayer::new(RELOAD_KEYS_MAX_CONCURRENCY)),
);

#[cfg(feature = "moq")]
Expand Down
1 change: 1 addition & 0 deletions docs/public/registry/plugins/parakeet/0.3.0/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"description": "Fast speech-to-text using NVIDIA Parakeet TDT via sherpa-onnx",
"license": "MPL-2.0",
"homepage": "https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3",
"repository": "https://github.com/streamer45/streamkit",
"entrypoint": "libparakeet.so",
"bundle": {
"url": "https://github.com/streamer45/streamkit/releases/download/plugin-parakeet-v0.3.0/parakeet-0.3.0-bundle.tar.zst",
Expand Down
2 changes: 1 addition & 1 deletion scripts/marketplace/build_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def build_manifest(
"license": plugin.get("license"),
"license_url": plugin.get("license_url"),
"homepage": plugin.get("homepage"),
"repository": plugin.get("repository"),
"repository": plugin.get("repo"),
"entrypoint": plugin["entrypoint"],
"bundle": bundle_block,
"compatibility": plugin.get("compatibility"),
Expand Down
2 changes: 1 addition & 1 deletion scripts/marketplace/check_registry_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_manifest_from_plugin(plugin: dict, bundle_block: dict | None) -> dict:
"license": plugin.get("license"),
"license_url": plugin.get("license_url"),
"homepage": plugin.get("homepage"),
"repository": plugin.get("repository"),
"repository": plugin.get("repo"),
Comment thread
staging-devin-ai-integration[bot] marked this conversation as resolved.
"entrypoint": plugin["entrypoint"],
"bundle": bundle_block,
"compatibility": plugin.get("compatibility"),
Expand Down
63 changes: 63 additions & 0 deletions scripts/marketplace/test_build_registry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: © 2025 StreamKit Contributors
# SPDX-License-Identifier: MPL-2.0

"""Unit tests for build_registry and check_registry_versions manifest builders."""

import importlib.util
import pathlib
import sys

import pytest

SCRIPTS_DIR = pathlib.Path(__file__).resolve().parent

# Import build_registry module by path (it has no package structure).
_br_spec = importlib.util.spec_from_file_location(
"build_registry", SCRIPTS_DIR / "build_registry.py"
)
build_registry = importlib.util.module_from_spec(_br_spec)
_br_spec.loader.exec_module(build_registry)

# Import check_registry_versions module by path.
_cr_spec = importlib.util.spec_from_file_location(
"check_registry_versions", SCRIPTS_DIR / "check_registry_versions.py"
)
check_registry_versions = importlib.util.module_from_spec(_cr_spec)
_cr_spec.loader.exec_module(check_registry_versions)


SAMPLE_PLUGIN = {
"id": "test-plugin",
"name": "Test Plugin",
"node_kind": "test_node",
"kind": "native",
"entrypoint": "libtest.so",
"description": "A test plugin",
"license": "MPL-2.0",
"repo": "https://github.com/streamer45/streamkit",
}


class TestBuildManifestRepoField:
"""Regression tests for #307: plugin.yml uses ``repo`` not ``repository``."""

def test_build_manifest_maps_repo_to_repository(self):
manifest = build_registry.build_manifest(SAMPLE_PLUGIN, "1.0.0", bundle_block=None)
assert manifest["repository"] == "https://github.com/streamer45/streamkit"

def test_check_registry_maps_repo_to_repository(self):
manifest = check_registry_versions.build_manifest_from_plugin(
SAMPLE_PLUGIN, bundle_block=None
)
assert manifest["repository"] == "https://github.com/streamer45/streamkit"

def test_build_manifest_omits_repository_when_repo_absent(self):
plugin = {k: v for k, v in SAMPLE_PLUGIN.items() if k != "repo"}
manifest = build_registry.build_manifest(plugin, "1.0.0", bundle_block=None)
assert "repository" not in manifest

def test_check_registry_omits_repository_when_repo_absent(self):
plugin = {k: v for k, v in SAMPLE_PLUGIN.items() if k != "repo"}
manifest = check_registry_versions.build_manifest_from_plugin(plugin, bundle_block=None)
assert "repository" not in manifest
Loading