From 8e017aec67afcc495e456a40657837e0bda7c8ff Mon Sep 17 00:00:00 2001 From: Nick Huo Date: Wed, 9 Sep 2026 15:17:10 -0700 Subject: [PATCH] Align porting-to-canyonos skill's compatibility naming with core The skill's runtime contract docs and validation checks still referred to the pre-rename `ventis` package, `VENTIS_*` env vars, and `ventis-*` Docker resources. Since CAN-255 (17ad707) renamed these to `canyonos_core`, `CANYONOS_*`, and `canyonos-*` throughout canyonos_core/, the skill's capability probe (validation/runtime.py) was importing a module path that no longer exists, silently reporting every gated capability as unavailable. Co-Authored-By: Claude Sonnet 5 --- .../porting-to-canyonos/references/preparation.md | 7 +++---- .../references/runtime-contract.md | 10 +++++----- .claude/skills/porting-to-canyonos/validate.py | 8 ++++---- .../porting-to-canyonos/validation/adapter.py | 2 +- .../porting-to-canyonos/validation/dependencies.py | 2 +- .../porting-to-canyonos/validation/entrypoint.py | 2 +- .../porting-to-canyonos/validation/packaging.py | 8 ++++---- .../porting-to-canyonos/validation/runtime.py | 14 +++++++------- 8 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.claude/skills/porting-to-canyonos/references/preparation.md b/.claude/skills/porting-to-canyonos/references/preparation.md index c49eb8e..b6f79e9 100644 --- a/.claude/skills/porting-to-canyonos/references/preparation.md +++ b/.claude/skills/porting-to-canyonos/references/preparation.md @@ -20,10 +20,9 @@ Use this order: ### Product and runtime names CanyonOS Core is the product name and `canyonos` is its user-facing CLI. The -internal compatibility Python package, environment variables, and Docker -resources retain the `ventis`, `VENTIS_*`, and `ventis-*` names. These are -protocol identifiers, not CLI instructions or branding strings. Do not rename -them, and do not tell users to run the obsolete `ventis` CLI. +internal Python package, environment variables, and Docker resources are +named `canyonos_core`, `CANYONOS_*`, and `canyonos-*`. These are protocol +identifiers, not CLI instructions or branding strings. Do not rename them. ### Artifact boundary diff --git a/.claude/skills/porting-to-canyonos/references/runtime-contract.md b/.claude/skills/porting-to-canyonos/references/runtime-contract.md index 49d26d1..14eff26 100644 --- a/.claude/skills/porting-to-canyonos/references/runtime-contract.md +++ b/.claude/skills/porting-to-canyonos/references/runtime-contract.md @@ -8,9 +8,9 @@ to the runtime. assembly, and cleanup. This is diagnostic background; implementation rules live in `adapter.md`, `manifest.md`, and `preparation.md`. -The product is CanyonOS Core and its user-facing CLI is `canyonos`. -Compatibility identifiers remain `ventis` for the internal Python package, -`VENTIS_*` for runtime variables, and `ventis-*` for Docker resources. +The product is CanyonOS Core and its user-facing CLI is `canyonos`. The +internal Python package, runtime variables, and Docker resources are +`canyonos_core`, `CANYONOS_*`, and `canyonos-*`. Runtime-dependent behavior is expressed as capabilities; run `validate.py` against the target environment instead of inferring support from release history. @@ -116,7 +116,7 @@ Consequences: - The class is module-level and named exactly as configured. - Construction takes no arguments. -- The module name is `VENTIS_AGENT_FILE` with `.py` stripped -- directory +- The module name is `CANYONOS_AGENT_FILE` with `.py` stripped -- directory separators and all -- so an entrypoint at `pkg/agent.py` loads as the module `pkg/agent`, which has no parent package. Relative imports in the entrypoint raise `attempted relative import with no known parent package`; modules it @@ -163,7 +163,7 @@ Avoid modules at the root of the copy named like runtime files, including: ```text future.py -ventis_context.py +canyonos_context.py local_controller.py local_controller_frontend.py redis_client.py diff --git a/.claude/skills/porting-to-canyonos/validate.py b/.claude/skills/porting-to-canyonos/validate.py index 91631f7..9283dc9 100755 --- a/.claude/skills/porting-to-canyonos/validate.py +++ b/.claude/skills/porting-to-canyonos/validate.py @@ -16,7 +16,7 @@ Exit 1 if any ERROR was reported, 0 otherwise. --strict also fails on warnings. Runtime capabilities vary across CanyonOS Core installations. This script probes -the importable `ventis` package directly. A capability-gated check reports +the importable `canyonos_core` package directly. A capability-gated check reports UNAVAILABLE when its behavior cannot be proven. """ @@ -56,7 +56,7 @@ from validation.workflow import check_workflow DEFAULT_CONFIG_PATH = "config/global_controller.yaml" -# ventis/cli.py SOURCE_DIR_NAME -- the duplicated application source. +# canyonos_core/cli.py SOURCE_DIR_NAME -- the duplicated application source. SOURCE_DIR_NAME = "app" @@ -221,8 +221,8 @@ def _wrap(text, width, indent): def print_report(report, artifact_root): caps = report.capabilities - if not caps.get("ventis"): - print("ventis is not importable here -- capability-gated rules are") + if not caps.get("canyonos_core"): + print("canyonos_core is not importable here -- capability-gated rules are") print("reported UNAVAILABLE rather than checked.\n") else: print("CanyonOS Core capabilities detected:") diff --git a/.claude/skills/porting-to-canyonos/validation/adapter.py b/.claude/skills/porting-to-canyonos/validation/adapter.py index 445ff10..88c97a5 100644 --- a/.claude/skills/porting-to-canyonos/validation/adapter.py +++ b/.claude/skills/porting-to-canyonos/validation/adapter.py @@ -54,7 +54,7 @@ def check_adapter(report, agent_yaml_path, agent_block, entry, project_dir): entrypoint_path, 1, f"no class named `{name}` at module level (found: {found})", - "_load_agent does getattr(module, VENTIS_AGENT_NAME) and swallows " + "_load_agent does getattr(module, CANYONOS_AGENT_NAME) and swallows " "the AttributeError. The class name must equal agent.name exactly.", ) return diff --git a/.claude/skills/porting-to-canyonos/validation/dependencies.py b/.claude/skills/porting-to-canyonos/validation/dependencies.py index 4060319..81fdea7 100644 --- a/.claude/skills/porting-to-canyonos/validation/dependencies.py +++ b/.claude/skills/porting-to-canyonos/validation/dependencies.py @@ -144,7 +144,7 @@ def check_requirements_coverage( external = reachable_imports(project_dir, root_path, shadowed_paths) for dotted, (where, lineno) in sorted(external.items()): name = dotted.split(".")[0] - if name in STDLIB_MODULE_NAMES or name == "ventis": + if name in STDLIB_MODULE_NAMES or name == "canyonos_core": continue # Provided by the image itself: the shared runtime is copied flat over # the swept tree. A stub is not listed here -- it replaces a module the diff --git a/.claude/skills/porting-to-canyonos/validation/entrypoint.py b/.claude/skills/porting-to-canyonos/validation/entrypoint.py index 902c3f8..16edc3c 100644 --- a/.claude/skills/porting-to-canyonos/validation/entrypoint.py +++ b/.claude/skills/porting-to-canyonos/validation/entrypoint.py @@ -84,7 +84,7 @@ def check_entrypoint_module(report, source_dir, name, entrypoint): node.lineno, f"the entrypoint's own `from {spelling} import ...` is relative", "_load_agent loads this file with spec_from_file_location(" - "VENTIS_AGENT_FILE.replace('.py', ''), path). That name keeps " + "CANYONOS_AGENT_FILE.replace('.py', ''), path). That name keeps " "the entrypoint's directory separator, so it has no parent " "package and __package__ is empty: every relative import in " "this file raises 'attempted relative import with no known " diff --git a/.claude/skills/porting-to-canyonos/validation/packaging.py b/.claude/skills/porting-to-canyonos/validation/packaging.py index d0682fc..a89d5a7 100644 --- a/.claude/skills/porting-to-canyonos/validation/packaging.py +++ b/.claude/skills/porting-to-canyonos/validation/packaging.py @@ -24,7 +24,7 @@ def check_env_file(report, config, config_path, artifact_dir): config_path, line_of(config, "env_file"), f"`env_file: {declared}` is set, but this CanyonOS Core never reads it", - "No resolve_env_file in the importable ventis package, so the " + "No resolve_env_file in the importable canyonos_core package, so the " "key is silently dropped and the container answers a provider " "credential error on the first request. This port requires the " "`env_file` runtime capability.", @@ -32,7 +32,7 @@ def check_env_file(report, config, config_path, artifact_dir): else: report.unavailable( "V030", - "env_file is not supported by the importable `ventis` runtime. " + "env_file is not supported by the importable `canyonos_core` runtime. " "Credentials have no declared path into a container on this tree.", ) return @@ -43,7 +43,7 @@ def check_env_file(report, config, config_path, artifact_dir): config_path, line_of(config), "no `env_file:` in the config", - "Only runtime-managed VENTIS_* variables are guaranteed without it. " + "Only runtime-managed CANYONOS_* variables are guaranteed without it. " "If the source reads credentials from the environment, the first " "request fails on a provider error.", ) @@ -76,7 +76,7 @@ def check_import_root(report, source_dir, entrypoint_paths): report.unavailable( "V031", "the editable install (`-e .`) is not supported by the importable " - "`ventis` runtime. Only names rooted at /app import inside a container.", + "`canyonos_core` runtime. Only names rooted at /app import inside a container.", ) for path, lineno, name, location in non_flat: report.error( diff --git a/.claude/skills/porting-to-canyonos/validation/runtime.py b/.claude/skills/porting-to-canyonos/validation/runtime.py index 4ec438a..3c76aa8 100644 --- a/.claude/skills/porting-to-canyonos/validation/runtime.py +++ b/.claude/skills/porting-to-canyonos/validation/runtime.py @@ -8,7 +8,7 @@ RUNTIME_FLAT_NAMES = frozenset( { "future.py", - "ventis_context.py", + "canyonos_context.py", "local_controller.py", "local_controller_frontend.py", "redis_client.py", @@ -62,7 +62,7 @@ def _base_requirements(): ] workflow = [*agent, "flask", "sqlalchemy", "psycopg[binary]"] try: - from ventis import stub_generator + from canyonos_core import stub_generator except Exception: # noqa: BLE001 - a broken install must not crash validation return agent, workflow return ( @@ -96,19 +96,19 @@ def _stdlib_names(): def probe_capabilities(): """Probe the installed compatibility runtime behind the CanyonOS CLI.""" capabilities = dict.fromkeys(CAPABILITY_SOURCE, False) - capabilities["ventis"] = False + capabilities["canyonos_core"] = False try: - from ventis import stub_generator + from canyonos_core import stub_generator except Exception: # noqa: BLE001 - unavailable runtime is reported, not fatal return capabilities - capabilities["ventis"] = True + capabilities["canyonos_core"] = True capabilities["editable_install"] = hasattr(stub_generator, "_install_step") capabilities["sweeps_all_files"] = hasattr(stub_generator, "_sweep_project_files") for module_name in ( - "ventis.controller.utils.env_file", - "ventis.utils.env_file", + "canyonos_core.controller.utils.env_file", + "canyonos_core.utils.env_file", ): try: module = importlib.import_module(module_name)