Skip to content

The agent that grows with you

refactor(tools): drop test-only merge_skill/skill_trees_of_root aliases and unused re-exports

Teknium9737d9d86cd2
diff --git a/tests/tools/test_skills_sync_client.py b/tests/tools/test_skills_sync_client.py
index fd9b71fb013..a6fdcdb8845 100644
--- a/tests/tools/test_skills_sync_client.py
+++ b/tests/tools/test_skills_sync_client.py
@@ -430,22 +430,22 @@ class TestObjectBuilding:
class TestMergeDecision:
def test_no_change(self):
- assert ssc._merge_skill("b", "b", "b") == "either"
+ assert ssc.merge_skill("b", "b", "b") == "either"
def test_ours_only_changed(self):
- assert ssc._merge_skill("b", "o", "b") == "ours"
+ assert ssc.merge_skill("b", "o", "b") == "ours"
def test_theirs_only_changed(self):
- assert ssc._merge_skill("b", "b", "t") == "theirs"
+ assert ssc.merge_skill("b", "b", "t") == "theirs"
def test_both_converged(self):
- assert ssc._merge_skill("b", "x", "x") == "either"
+ assert ssc.merge_skill("b", "x", "x") == "either"
def test_true_overlap(self):
- assert ssc._merge_skill("b", "o", "t") == "overlap"
+ assert ssc.merge_skill("b", "o", "t") == "overlap"
def test_deleted_both(self):
- assert ssc._merge_skill(None, None, None) == "none"
+ assert ssc.merge_skill(None, None, None) == "none"
# ---------------------------------------------------------------------------
@@ -683,7 +683,7 @@ class TestSyncManifest:
# The manifest is a root-level BLOB, not a skill subtree, so the skill
# walk must not surface it as a skill.
- trees = ssc._skill_trees_of_root(client, root_hash)
+ trees = ssc.skill_trees_of_root(client, root_hash)
assert "sync-manifest" not in trees
assert set(trees) == {"alpha", "devops/beta"}
diff --git a/tools/skills_sync_client.py b/tools/skills_sync_client.py
index 1f8f6218188..f4e784794ce 100644
--- a/tools/skills_sync_client.py
+++ b/tools/skills_sync_client.py
@@ -18,19 +18,14 @@ from pathlib import Path, PurePosixPath
from typing import Any, Callable, Dict, List, Optional, Tuple
from tools.skills_sync_client_wire import ( # noqa: F401 (re-exports)
- ARTIFACT_TYPE_SKILL, DEFAULT_MAX_OBJECT_BYTES, KIND_BLOB, KIND_COMMIT, KIND_TREE, MODE_DIR,
- MODE_EXEC, MODE_FILE, SYNC_MANIFEST_ENTRY_NAME, SYNC_MANIFEST_TYPE, SYNC_MANIFEST_VERSION,
- WIRE_VERSION, ObjectSet, SyncClient, SyncConflict, SyncError, _check_version,
- assemble_root_from_skill_trees, build_commit, build_root_tree, build_sync_manifest_bytes,
- build_tree, canonical_json_bytes, materialize_tree, merge_skill, nest_skill_tree,
- parse_sync_manifest, read_manifest_of_root, read_ref_hash, root_tree_of_commit,
- skill_trees_of_root, wire_address)
+ DEFAULT_MAX_OBJECT_BYTES, KIND_BLOB, KIND_COMMIT, KIND_TREE, MODE_EXEC, MODE_FILE, ObjectSet,
+ SyncClient, SyncConflict, SyncError, _check_version, assemble_root_from_skill_trees, build_commit,
+ build_root_tree, build_sync_manifest_bytes, build_tree, canonical_json_bytes, materialize_tree,
+ merge_skill, nest_skill_tree, parse_sync_manifest, read_manifest_of_root, read_ref_hash,
+ root_tree_of_commit, skill_trees_of_root, wire_address)
logger = logging.getLogger(__name__)
-_merge_skill = merge_skill
-_skill_trees_of_root = skill_trees_of_root
-
# Gate claim (NAS's wire name; means "Nous admin" / Permissions.ADMIN_ACCESS). The bearer comes
# from resolve_nous_runtime_credentials(); its payload is decoded unverified to read this.
NOUS_ADMIN_CLAIM = "tool_gateway_admin"
@@ -577,8 +572,6 @@ def sync_status() -> Dict[str, Any]:
# Imported last: skills_sync_client_org reads this module's state lazily.
from tools.skills_sync_client_org import ( # noqa: E402,F401 (re-exports)
- ORG_DIR_NAME, _ORG_CAS_MAX_ATTEMPTS, _clear_active_org_marker, _org_baseline_path,
- _read_org_baseline, _read_org_head, _skill_dir_fingerprint, _write_active_org_marker,
- _write_org_baseline, _write_org_provenance, list_locally_modified_org_skills,
- list_org_skill_names, maybe_pull_org_skills, org_head_ref, org_skill_is_locally_modified,
- propose_skill, pull_org_skills, resolve_org_identity)
+ ORG_DIR_NAME, _skill_dir_fingerprint, _write_org_baseline, list_locally_modified_org_skills,
+ list_org_skill_names, maybe_pull_org_skills, org_skill_is_locally_modified, propose_skill,
+ pull_org_skills, resolve_org_identity)