mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-08-11 03:09:57 +00:00
rename: slopsmith → feedBack, byron → got-feedBack (#537)
* Update GitHub repo references from feedback* to feedBack* * rename: slopsmith -> feedBack, byron -> got-feedBack Renames across the entire codebase: - slopsmith/Slopsmith/SLOPSMITH/SlopSmith -> feedBack/FeedBack/FEEDBACK/FeedBack - byron/Byron/Byrongamatos -> got-feedBack/got-feedBack/got-feedBack - /home/byron/ -> /opt/got-feedBack/ - byron@ougsoft.com -> hi@got-feedBack.org - github.com/byrongamatos/ -> github.com/got-feedback/ - com.byron. -> com.got-feedback. - SLOPSMITH_ env vars -> FEEDBACK_ with backward-compat fallback - Protocol/storage strings migrated with read-old/write-new pattern - window.slopsmith JS API -> window.feedBack (canonical) + backward-compat alias Refs: #rename-slopsmith * rename: complete regen against current main + fix backward-compat alias Regenerated the slopsmith->feedBack / byron->got-feedBack rename on top of current main (3 commits had landed since the branch: #572/#554/#574), resolving the four content conflicts in favour of main's newer content (autoplay/auto-exit, accuracy-badge, Virtuoso re-home, feedpak badge). Completion fixes on top of the mechanical rename: - Re-apply rename to post-branch content the original rename never saw: window.slopsmith(.Tour) consumers in lessons.js / notifications.js / onboarding-tour.js, and the matching JS + python tests (autoplay_exit, progression_*, test_feedpak_extension FEEDBACK_* env vars). The test env vars now match server.py (which reads FEEDBACK_SYNC_STARTUP / FEEDBACK_SKIP_STARTUP_TASKS), so the sync-startup test exercises the real path again. - Restore the window.slopsmith backward-compat alias dropped during conflict resolution, and move the bus aliases to AFTER the _feedBackExisting merge block so they reference the fully-assembled object (also fixes the loop_api.test.js API-surface regex, which the original PR latently broke). - Drop the stray empty data/web_library.db (runtime DB lives in CONFIG_DIR) and gitignore it. - Fix stale tone-source test: feed[dB]ack -> fee[dB]ack to match shipped source labels. Verified locally (org CI billing-blocked): JS 819/819 pass; pytest 1669 passed / 1683 collected with 0 import errors; zero residual slopsmith/byron except the two intentional window.slopsmith aliases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * rename: implement advertised backward-compat + prune dead community plugins Address gaps where PR #537's "Backward compatibility" section was advertised but not implemented, and clean up the community plugin list. Env vars (FEEDBACK_* canonical, legacy SLOPSMITH_* honoured): - New lib/env_compat.py (getenv_compat / env_flag_compat) + tests. server.py (_env_flag + all FEEDBACK_* reads), diagnostics_hardware, gp2midi and tailwind_rebuild now resolve the legacy alias, so existing SLOPSMITH_UI / SLOPSMITH_PLUGINS_DIR / etc. deployments keep working. - Fix the rename collapsing plugins/__init__.py and minigames/routes.py from `FEEDBACK_PLUGINS_DIR or SLOPSMITH_PLUGINS_DIR` into a redundant `FEEDBACK_ or FEEDBACK_` (the fallback was silently lost). Storage (app.js update-channel): - Read feedBack-update-channel, fall back to legacy slopsmith-update-channel, and clear the legacy key on write — so a user's update-channel preference survives the rename instead of resetting to "stable". Community plugin list (README): the rename rewrote third-party repo URLs we don't own. Probed every one; their owners never renamed, so: - Restore the 13 live community plugins to their real slopsmith-* names. - Prune 6 that are 404 to the public (topkoa splitscreen/stems, OmikronApex tuner, Jafz2001 nam-rig-builder, DeathlySin song-preview, Erikcb91 shuffle). - Fix a pre-existing Guitar Theory clone-command typo (nam-tone -> guitar-theory). Verified: env_compat 7/7, JS 819/819, pytest 1690 collected / 0 import errors, rename-sensitive + startup suites green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: byrongamatos <xasiklas@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
byrongamatos
parent
a8ad02739a
commit
af2949677a
+20
-20
@@ -15,7 +15,7 @@ from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, Response
|
||||
|
||||
from safepath import safe_join
|
||||
|
||||
log = logging.getLogger("slopsmith.plugins")
|
||||
log = logging.getLogger("feedBack.plugins")
|
||||
|
||||
|
||||
PLUGINS_DIR = Path(__file__).parent
|
||||
@@ -43,7 +43,7 @@ PLUGINS_LOCK = threading.RLock()
|
||||
# registry mutation (the pending seed, _graduate, _mark_failed) re-checks it
|
||||
# under the lock before touching LOADED_PLUGINS / PENDING_PLUGINS. This keeps a
|
||||
# still-running loader from an EARLIER pass — e.g. a "reload plugins" action,
|
||||
# SLOPSMITH_SYNC_STARTUP hot-reload, or test teardown re-invoking load_plugins()
|
||||
# FEEDBACK_SYNC_STARTUP hot-reload, or test teardown re-invoking load_plugins()
|
||||
# while the first pass's background install thread is mid-flight — from
|
||||
# repopulating or duplicating entries after a NEWER pass has already cleared the
|
||||
# registries. Only the latest pass is allowed to publish.
|
||||
@@ -512,7 +512,7 @@ def _capability_warnings(manifest: dict, plugin_id: str) -> tuple[dict, list[dic
|
||||
if isinstance(declaration.get("provider_policy"), dict):
|
||||
clean["provider_policy"] = declaration["provider_policy"]
|
||||
# Declarative per-instance control descriptors a consuming host renders
|
||||
# generically (slopsmith#849). Domain-agnostic: validated for any
|
||||
# generically (feedBack#849). Domain-agnostic: validated for any
|
||||
# capability here and surfaced via /api/plugins; each domain defines how
|
||||
# a value is applied (visualization is the first consumer).
|
||||
if clean_settings:
|
||||
@@ -567,7 +567,7 @@ def _load_plugin_sibling(plugin_id: str, plugin_dir: Path, name: str):
|
||||
import precedence). Mirrors the routes-loading pattern in
|
||||
`load_plugins()` and shares its `sys.modules` cache, so two plugins
|
||||
that each ship `extractor.py` get distinct cached modules instead
|
||||
of stomping each other through `sys.path`. See slopsmith#33."""
|
||||
of stomping each other through `sys.path`. See feedBack#33."""
|
||||
if not isinstance(plugin_id, str) or not plugin_id:
|
||||
raise ValueError(
|
||||
f"load_sibling: plugin_id must be a non-empty string, got {plugin_id!r}"
|
||||
@@ -613,7 +613,7 @@ def _load_plugin_sibling(plugin_id: str, plugin_dir: Path, name: str):
|
||||
# sys.modules entry — same key load_sibling produces
|
||||
# `setdefault` is atomic under the GIL so two threads racing to
|
||||
# create the parent can't overwrite each other's registration.
|
||||
# Spotted by codex/Copilot reviews on PRs for slopsmith#33.
|
||||
# Spotted by codex/Copilot reviews on PRs for feedBack#33.
|
||||
import types
|
||||
new_parent = types.ModuleType(parent_name)
|
||||
new_parent.__path__ = [str(plugin_dir)]
|
||||
@@ -641,14 +641,14 @@ def _warn_on_module_collisions(plugin_specs):
|
||||
"""Scan top-level importable modules across all plugins about to
|
||||
be loaded. Print a warning for any module name shipped by 2+
|
||||
plugins, since bare `import <name>` from those plugins will hit
|
||||
the sys.path-based cache and cross-load (slopsmith#33).
|
||||
the sys.path-based cache and cross-load (feedBack#33).
|
||||
|
||||
Both top-level `.py` files AND top-level packages (directories
|
||||
containing `__init__.py`) are scanned — the same collision
|
||||
pattern applies to either, e.g. one plugin's `extractor.py` vs
|
||||
another plugin's `extractor/__init__.py` both produce a shared
|
||||
`sys.modules['extractor']` entry. Spotted by codex review on
|
||||
PR for slopsmith#33.
|
||||
PR for feedBack#33.
|
||||
|
||||
`routes.py` itself is excluded because the loader already
|
||||
namespaces it as `plugin_{id}_routes`. Top-level dunder files
|
||||
@@ -663,7 +663,7 @@ def _warn_on_module_collisions(plugin_specs):
|
||||
# — that intra-plugin layout is supported by load_sibling
|
||||
# (package form wins, matching CPython precedence) and shouldn't
|
||||
# trip a cross-plugin collision warning. Spotted by codex review
|
||||
# on PR for slopsmith#33.
|
||||
# on PR for feedBack#33.
|
||||
by_name: dict[str, dict[str, set[str]]] = {}
|
||||
for plugin_id, plugin_dir in plugin_specs:
|
||||
try:
|
||||
@@ -700,7 +700,7 @@ def _warn_on_module_collisions(plugin_specs):
|
||||
log.warning(
|
||||
"Module-name collision: %r (%s) is shipped by %d plugins (%s). "
|
||||
"Bare `import %s` may load the wrong file. "
|
||||
"Migrate to context['load_sibling']('%s') — see CLAUDE.md (slopsmith#33).",
|
||||
"Migrate to context['load_sibling']('%s') — see CLAUDE.md (feedBack#33).",
|
||||
name, kind_label, len(by_plugin), ids_quoted, name, name,
|
||||
)
|
||||
|
||||
@@ -745,7 +745,7 @@ def _is_valid_tour_manifest(val) -> bool:
|
||||
def _normalize_export_paths(settings_field, plugin_id: str) -> list[str]:
|
||||
"""Validate and normalize a plugin's `settings.server_files` manifest
|
||||
list into clean POSIX-style relpaths suitable for the settings
|
||||
export/import bundle (slopsmith#113).
|
||||
export/import bundle (feedBack#113).
|
||||
|
||||
Each entry must be a non-empty string with no absolute prefix and
|
||||
no `..` segment. A trailing `/` denotes a directory (recurse on
|
||||
@@ -1118,7 +1118,7 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
|
||||
# Collect plugin directories — user plugins first so they override built-in
|
||||
plugin_dirs = []
|
||||
user_plugins_dir = os.environ.get("SLOPSMITH_PLUGINS_DIR")
|
||||
user_plugins_dir = os.environ.get("FEEDBACK_PLUGINS_DIR") or os.environ.get("SLOPSMITH_PLUGINS_DIR")
|
||||
if user_plugins_dir:
|
||||
user_path = Path(user_plugins_dir)
|
||||
if user_path.is_dir() and user_path != PLUGINS_DIR:
|
||||
@@ -1179,7 +1179,7 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
)
|
||||
|
||||
# Two-pass discovery so we can warn about cross-plugin module-name
|
||||
# collisions BEFORE any plugin's setup runs (slopsmith#33). The
|
||||
# collisions BEFORE any plugin's setup runs (feedBack#33). The
|
||||
# first pass collects (plugin_id, plugin_dir, manifest) tuples in
|
||||
# load order; the second pass actually executes each plugin's
|
||||
# setup with a per-plugin context.
|
||||
@@ -1231,7 +1231,7 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
kept_is_bundled = _is_bundled(kept[1], kept[2]) if kept else False
|
||||
if this_is_bundled and not kept_is_bundled:
|
||||
# The incoming copy is the canonical bundled plugin; the
|
||||
# already-kept copy is user-installed (SLOPSMITH_PLUGINS_DIR
|
||||
# already-kept copy is user-installed (FEEDBACK_PLUGINS_DIR
|
||||
# or cloned directly into plugins/). Bundled always wins —
|
||||
# evict the user copy and fall through to register the
|
||||
# bundled version instead.
|
||||
@@ -1537,7 +1537,7 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
continue
|
||||
|
||||
# Add plugin directory to sys.path so the plugin's bare
|
||||
# `import sibling` keeps working during the slopsmith#33
|
||||
# `import sibling` keeps working during the feedBack#33
|
||||
# transition. New plugins should prefer
|
||||
# `context['load_sibling']('sibling')` instead — see
|
||||
# CLAUDE.md / Plugin System / Backend routes.
|
||||
@@ -1556,13 +1556,13 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
# bijectively encoded by _safe_plugin_id_for_module_name:
|
||||
# `_` -> `_5f_`, `.` -> `_2e_`) so two plugins shipping the
|
||||
# same filename get distinct cached modules. See
|
||||
# slopsmith#33.
|
||||
# feedBack#33.
|
||||
plugin_context = dict(context)
|
||||
plugin_context["load_sibling"] = (
|
||||
lambda name, _pid=plugin_id, _pdir=plugin_dir:
|
||||
_load_plugin_sibling(_pid, _pdir, name)
|
||||
)
|
||||
plugin_context["log"] = logging.getLogger(f"slopsmith.plugin.{plugin_id}")
|
||||
plugin_context["log"] = logging.getLogger(f"feedBack.plugin.{plugin_id}")
|
||||
if callable(plugin_context.get("register_library_provider")):
|
||||
_register_library_provider = plugin_context["register_library_provider"]
|
||||
|
||||
@@ -1709,9 +1709,9 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
# Normalized list of relpaths under CONFIG_DIR that this
|
||||
# plugin opts in to settings export/import. Empty for
|
||||
# plugins that don't declare `settings.server_files`. See
|
||||
# slopsmith#113.
|
||||
# feedBack#113.
|
||||
"_export_paths": _normalize_export_paths(manifest.get("settings"), plugin_id),
|
||||
# Diagnostics opt-in (slopsmith#166): same allowlist semantics
|
||||
# Diagnostics opt-in (feedBack#166): same allowlist semantics
|
||||
# as `_export_paths` but for the troubleshooting bundle.
|
||||
"_diagnostics_paths": _normalize_diagnostics_paths(manifest.get("diagnostics"), plugin_id),
|
||||
"_diagnostics_callable_spec": _parse_diagnostics_callable(manifest.get("diagnostics"), plugin_id),
|
||||
@@ -1800,7 +1800,7 @@ def load_plugins(app: FastAPI, context: dict, progress_cb=None, route_setup_fn=N
|
||||
lambda name, _pid=evicted_id, _pdir=ev_dir:
|
||||
_load_plugin_sibling(_pid, _pdir, name)
|
||||
)
|
||||
ev_context["log"] = logging.getLogger(f"slopsmith.plugin.{evicted_id}")
|
||||
ev_context["log"] = logging.getLogger(f"feedBack.plugin.{evicted_id}")
|
||||
if callable(ev_context.get("register_library_provider")):
|
||||
_ev_register_library_provider = ev_context["register_library_provider"]
|
||||
|
||||
@@ -2053,7 +2053,7 @@ def register_plugin_api(app: FastAPI):
|
||||
"category": p.get("category") if "category" in p else ((p.get("_manifest") or {}).get("category") or None),
|
||||
"icon": p.get("icon") if "icon" in p else ((p.get("_manifest") or {}).get("icon") or None),
|
||||
# `bundled` is reserved metadata flagging plugins that
|
||||
# ship with the default container image (slopsmith#160).
|
||||
# ship with the default container image (feedBack#160).
|
||||
# Surfaced in /api/plugins so the plugin-list UI can
|
||||
# render a "Bundled" badge (lock icon) next to the
|
||||
# plugin name in the settings collapsible.
|
||||
|
||||
Reference in New Issue
Block a user