drop new-skill legacy fallbacks; make the simplex-chat pin per-arch
- scheduler: remove the creation_approval and locks.new_skill backward-compat reads (and the locks cleanup in set_category_mode). The tri-state new_skill_creation mode is now the only source of truth. - pins.json: simplex_chat now carries an assets map (x86_64 + aarch64) with per-arch bin_url/sha256; bootstrap selects by uname -m (arm64 -> aarch64). Fixes the Pi (aarch64) fetching the x86_64 binary. - docs/tests updated.
This commit is contained in:
1 parent
c5ee87875f
commit
9ba14fdab0
7 files changed
+30
-56
No files matched your search
@@ -464,10 +464,6 @@ CLI, unit tests (24) + integration tests (2).
|
||||
`creation_approval_requested` / `_approved` / `_denied` / `_timeout` /
|
||||
`_skipped`; the gate is deterministic (a human veto or a config value), not a
|
||||
decision row — the SemIf create doors still make and log the routing decision.
|
||||
The retired boolean `locks.new_skill` is still read (`true` -> deny, `false`
|
||||
-> allow) so a previously locked category never silently reopens, and the
|
||||
retired boolean `creation_approval` is still read as a global fallback
|
||||
(`true` -> ask, `false` -> allow).
|
||||
- **Housekeeping meta skills + per-category new-skill modes** (Oct 2026): a
|
||||
built-in `housekeeping` category of four meta skills that act on the agent's
|
||||
own tree through `ctx.admin` (the scheduler): `delete_skill` (confirm, then
|
||||
@@ -768,7 +764,9 @@ CLI, unit tests (24) + integration tests (2).
|
||||
- All pins are read from the committed `pins.json`: the `engine` block
|
||||
(`semif_repo` public GitHub `TheoLeeCJ/SemIf`, `semif_ref` pinned commit,
|
||||
`gguf_url`/`gguf_sha256`, HF tokenizer `source`/`revision`) and the
|
||||
`simplex_chat` block (`version`, `bin_url`, `sha256`). Per-machine
|
||||
`simplex_chat` block (`version`, and an `assets` map of per-arch
|
||||
`bin_url`/`sha256`; bootstrap selects by `uname -m`, `arm64` normalized to
|
||||
`aarch64`). Per-machine
|
||||
`simplex_chat` ports/display names stay in `config.json`. The python dep pins
|
||||
live in `requirements/staging.txt` (committed, one versioned artifact — every
|
||||
host provisions from it). The agent reads `engine.source`/`revision` from
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"tau": 0.6,
|
||||
"max_reentries": 3,
|
||||
"new_skill_creation": "allow",
|
||||
"_new_skill_creation_comment": "Global new-skill creation mode: \"allow\" (create without asking), \"deny\" (never author new skills/categories), or \"ask\" (author only after the human approves the proposal). A category can override this in data/skills/<category>/config.json with its own \"new_skill_creation\" value; the built-in housekeeping and response categories are always denied in code. Replaces the old boolean creation_approval (still read as true=ask/false=allow) and the boolean locks.new_skill (still read as true=deny/false=allow).",
|
||||
"_new_skill_creation_comment": "Global new-skill creation mode: \"allow\" (create without asking), \"deny\" (never author new skills/categories), or \"ask\" (author only after the human approves the proposal). A category can override this in data/skills/<category>/config.json with its own \"new_skill_creation\" value; the built-in housekeeping and response categories are always denied in code.",
|
||||
"timezone": "",
|
||||
"navigation": {
|
||||
"_comment": "Navigation is two-stage at BOTH levels and the guards are the create doors (no threshold gate). Category: the softmax offers each existing category WITH its description (bare names carried no signal) plus create_category; confirm_category_fit then confirms the winner's scope (phase navigate:category_scope, P(covers) >= category_tau) and a rejected winner authors a new category. The `response` catchall and create_category share a boundary arbitrated by the actionability guard confirm_non_action (phase navigate:actionability, P(non_action) >= action_tau): the closed response tree is reached ONLY when the input is not a request, so a request no skill covers (e.g. \"what is 255 * 12?\") authors instead of getting a canned reply. Leaf: the softmax offers only existing skills; confirm_skill_fit then compares the winner's action to the request (phase navigate:intent, P(same) >= intent_tau) and a mismatch authors a new leaf. All three taus are separate from the top-level tau so tuning reuse-vs-create or actionability does not move run assessment/fidelity. The category check is deliberately permissive: with real descriptions in-scope requests score 0.9-1.0, so a borderline over-cover routes into a plausible category and the leaf guard catches it. A **category** softmax winner at or above `softmax_bypass_tau` (default 0.5) skips the scope confirm (traced `category_scope_bypassed`) — `create_category` is one of its options, so a confident winner really did beat authoring a category. The **leaf** intent guard is never bypassed: the leaf softmax offers only existing skills, so a confident winner is \"best of the wrong lot\", not a match, and the guard is the only leaf-level create door.",
|
||||
|
||||
@@ -9,10 +9,19 @@
|
||||
"revision": "851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a"
|
||||
},
|
||||
"simplex_chat": {
|
||||
"_comment": "Per-arch daemon binaries; bootstrap selects by `uname -m` (x86_64 | aarch64, arm64 normalized to aarch64). The pinned version is the same for every arch.",
|
||||
"version": "v7.0.3",
|
||||
"assets": {
|
||||
"x86_64": {
|
||||
"bin_url": "https://github.com/simplex-chat/simplex-chat/releases/download/v7.0.3/simplex-chat-ubuntu-24_04-x86_64",
|
||||
"sha256": "895fb14cfaa662d1c0947f2f871141fc89680fe3e70bff64c366cbe9e59aa4f0"
|
||||
},
|
||||
"aarch64": {
|
||||
"bin_url": "https://github.com/simplex-chat/simplex-chat/releases/download/v7.0.3/simplex-chat-ubuntu-24_04-aarch64",
|
||||
"sha256": "2d2e62351f11bc51ae659618584722b38ea5a6796b806c9a388ee6e3124c90ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"voice": {
|
||||
"_comment": "Piper TTS voice-training refs used by scripts/voice-train.sh (optional, off-bootstrap): the piper1-gpl training toolchain commit and the medium base checkpoint it fine-tunes from. See docs/VOICE-TRAIN.md.",
|
||||
"piper_train_repo": "https://github.com/OHF-Voice/piper1-gpl.git",
|
||||
|
||||
+12
-4
@@ -109,13 +109,21 @@ fi
|
||||
# --- read pins from the committed pins.json ---------------------------------
|
||||
# The ASCII unit separator (\x1f) delimits fields so an empty value never
|
||||
# shifts the fields after it (space-splitting collapses runs of whitespace).
|
||||
# The simplex-chat binary is per-arch: normalize `uname -m` to a pins key.
|
||||
SIMPLEX_ARCH="$(uname -m)"
|
||||
case "$SIMPLEX_ARCH" in
|
||||
arm64|aarch64) SIMPLEX_ARCH="aarch64" ;;
|
||||
x86_64|amd64) SIMPLEX_ARCH="x86_64" ;;
|
||||
esac
|
||||
IFS=$'\x1f' read -r SEMIF_REPO SEMIF_REF GGUF_URL GGUF_SHA256 HF_SOURCE HF_REV \
|
||||
SIMPLEX_BIN_URL SIMPLEX_SHA256 < <(
|
||||
python3 - "$PINS" <<'PY'
|
||||
python3 - "$PINS" "$SIMPLEX_ARCH" <<'PY'
|
||||
import json, sys
|
||||
pins = json.load(open(sys.argv[1]))
|
||||
arch = sys.argv[2]
|
||||
e = pins["engine"]
|
||||
s = pins.get("simplex_chat", {})
|
||||
asset = (s.get("assets", {}) or {}).get(arch, {})
|
||||
print("\x1f".join([
|
||||
str(e.get("semif_repo", "")),
|
||||
str(e.get("semif_ref", "")),
|
||||
@@ -123,8 +131,8 @@ print("\x1f".join([
|
||||
str(e.get("gguf_sha256", "")),
|
||||
str(e.get("source", "")),
|
||||
str(e.get("revision", "")),
|
||||
str(s.get("bin_url", "")),
|
||||
str(s.get("sha256", "")),
|
||||
str(asset.get("bin_url", "")),
|
||||
str(asset.get("sha256", "")),
|
||||
]))
|
||||
PY
|
||||
)
|
||||
@@ -134,7 +142,7 @@ if [[ -z "$SEMIF_REPO" || -z "$SEMIF_REF" || -z "$GGUF_URL" || -z "$GGUF_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "$SIMPLEX_BIN_URL" || -z "$SIMPLEX_SHA256" ]]; then
|
||||
echo "simplex_chat pins missing in $PINS (bin_url/sha256)" >&2
|
||||
echo "simplex_chat pins missing in $PINS for arch '$SIMPLEX_ARCH' (assets.<arch>.bin_url/sha256)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -80,13 +80,9 @@ NEW_SKILL_MODES = ("allow", "deny", "ask")
|
||||
def normalize_new_skill_mode(value) -> str | None:
|
||||
"""Coerce a configured new-skill mode to one of `NEW_SKILL_MODES`.
|
||||
|
||||
Accepts the mode strings and, for backward compatibility with the retired
|
||||
`locks.new_skill` boolean, maps `True` -> "deny" and `False` -> "allow".
|
||||
Returns None for anything unrecognized so the caller can fall back to the
|
||||
next tier (category override, then the global default).
|
||||
"""
|
||||
if isinstance(value, bool):
|
||||
return "deny" if value else "allow"
|
||||
if isinstance(value, str):
|
||||
mode = value.strip().lower()
|
||||
if mode in NEW_SKILL_MODES:
|
||||
@@ -293,12 +289,9 @@ class Scheduler:
|
||||
)
|
||||
self.defer_questions = False
|
||||
#: Global new-skill creation mode: "allow" (default), "deny", or "ask".
|
||||
#: A category may override it in its category config. The retired
|
||||
#: boolean `creation_approval` is still read as a fallback (True -> ask,
|
||||
#: False -> allow) so an existing config keeps its behaviour.
|
||||
#: A category may override it in its category config.
|
||||
self.new_skill_mode = (
|
||||
normalize_new_skill_mode(config.get("new_skill_creation"))
|
||||
or ("ask" if config.get("creation_approval") else "allow")
|
||||
normalize_new_skill_mode(config.get("new_skill_creation")) or "allow"
|
||||
)
|
||||
fidelity_cfg = codegen_cfg.get("fidelity", {}) or {}
|
||||
self.fidelity_enabled = bool(fidelity_cfg.get("enabled", True))
|
||||
@@ -611,9 +604,7 @@ class Scheduler:
|
||||
and the built-in `housekeeping` category are always `deny` (hard-locked
|
||||
in code). Every other category reads `new_skill_creation` from its
|
||||
category config (`data/skills/<category>/config.json`); when absent it
|
||||
falls back to the global `new_skill_creation` mode. The retired boolean
|
||||
`locks.new_skill` is still honored (True -> deny, False -> allow) so a
|
||||
previously locked category never silently reopens. The mode is
|
||||
falls back to the global `new_skill_creation` mode. The mode is
|
||||
creation-only: existing skills still run, and repair/regen of an
|
||||
existing leaf is allowed.
|
||||
"""
|
||||
@@ -621,10 +612,6 @@ class Scheduler:
|
||||
return "deny"
|
||||
config = self.body_store.read_category_config(category) or {}
|
||||
mode = normalize_new_skill_mode(config.get("new_skill_creation"))
|
||||
if mode is None:
|
||||
mode = normalize_new_skill_mode(
|
||||
(config.get("locks") or {}).get("new_skill")
|
||||
)
|
||||
return mode or self.new_skill_mode
|
||||
|
||||
def _category_locked(self, category: str) -> bool:
|
||||
@@ -2270,8 +2257,6 @@ class Scheduler:
|
||||
if category not in self.tree:
|
||||
return "error", f"no category {category}"
|
||||
config = self.body_store.read_category_config(category) or {}
|
||||
# Drop the retired boolean lock so it cannot shadow the new mode.
|
||||
config.pop("locks", None)
|
||||
if mode:
|
||||
normalized = normalize_new_skill_mode(mode)
|
||||
if normalized is None:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Pure-stdlib tests for the housekeeping meta skills and per-category locks.
|
||||
"""Pure-stdlib tests for the housekeeping meta skills and per-category modes.
|
||||
|
||||
These cover the deterministic mechanics: name resolution, registry/store
|
||||
deletion, tombstones, the lock gate, and the scheduler operations the meta
|
||||
@@ -250,7 +250,7 @@ def test_delete_seed_is_durable(tmp_path):
|
||||
assert all(s.name != "probe" for s in reloaded.tree.get("nextcloud", []))
|
||||
|
||||
|
||||
# ---- locks ----
|
||||
# ---- new-skill modes ----
|
||||
|
||||
|
||||
def test_housekeeping_and_response_are_hard_locked(tmp_path):
|
||||
|
||||
@@ -1314,32 +1314,6 @@ def test_creation_mode_allow_proceeds(tmp_path):
|
||||
assert scheduler.pending_approvals() == []
|
||||
|
||||
|
||||
def test_creation_approval_legacy_boolean_fallback(tmp_path):
|
||||
"""The retired `creation_approval` boolean still maps to ask/allow when the
|
||||
new `new_skill_creation` key is absent."""
|
||||
def build(config):
|
||||
return Scheduler(
|
||||
engine=ScriptedEngine(default="success"),
|
||||
llm=LLMClient(base_url="http://localhost:1/v1", model="test"),
|
||||
log=DecisionLog(str(tmp_path / "decisions.jsonl")),
|
||||
config={
|
||||
"skills": {},
|
||||
"category_registry": str(tmp_path / "categories.json"),
|
||||
"skill_bodies": str(tmp_path / "skills"),
|
||||
"skill_seeds": str(tmp_path / "seeds"),
|
||||
**config,
|
||||
},
|
||||
trace=TraceLog(str(tmp_path / "runs.jsonl")),
|
||||
)
|
||||
|
||||
assert build({"creation_approval": True}).new_skill_mode == "ask"
|
||||
assert build({"creation_approval": False}).new_skill_mode == "allow"
|
||||
# The new key wins when both are present.
|
||||
assert build(
|
||||
{"creation_approval": True, "new_skill_creation": "deny"}
|
||||
).new_skill_mode == "deny"
|
||||
|
||||
|
||||
def test_creation_mode_deny_aborts_without_prompting(tmp_path):
|
||||
"""Global `deny` blocks authoring outright; no approval is posted."""
|
||||
scheduler = _scheduler(tmp_path)
|
||||
|
||||
Reference in new issue
Block a user