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
7 changes: 3 additions & 4 deletions .claude/skills/porting-to-canyonos/references/preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .claude/skills/porting-to-canyonos/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down Expand Up @@ -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"


Expand Down Expand Up @@ -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:")
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/porting-to-canyonos/validation/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
8 changes: 4 additions & 4 deletions .claude/skills/porting-to-canyonos/validation/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ 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.",
)
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
Expand All @@ -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.",
)
Expand Down Expand Up @@ -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(
Expand Down
14 changes: 7 additions & 7 deletions .claude/skills/porting-to-canyonos/validation/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
Expand Down
Loading