Skip to content
6 changes: 3 additions & 3 deletions examples/semantic-vocabulary-drift-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@
TWIN_ROOT_ANCHOR = "loopx/control_plane"
TWIN_BUDGET_ANCHOR = 43
BUDGET_ANCHOR = {
"same_runtime_forks": 20,
"same_runtime_fork_definitions": 47,
"same_runtime_forks": 18,
"same_runtime_fork_definitions": 41,
"conflicting_values": 18,
"conflicting_definitions": 59,
"schema_version_same_runtime_forks": 7,
"multi_value_twins": 13,
"multi_value_forks": 4,
"multi_value_forks_semantic": 3,
"multi_value_fork_definitions": 10,
"same_runtime_forks_semantic": 13,
"same_runtime_forks_semantic": 11,
"conflicting_values_semantic": 0,
}
# Budgets for the legacy should-run decision fields, anchored the same way so a
Expand Down
10 changes: 7 additions & 3 deletions loopx/control_plane/goals/goal_frontier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
from ...agents.profile import agent_profile_requires_vision
from ...agents.runtime_model import peer_work_key, select_peer_for_work
from ...runtime.time import parse_timestamp
from ...todos.contract import normalize_todo_replan_obligation_id
# Refs #4447: the todo contract owns this vocabulary; import it instead of
# restating the literal in every module that classifies a Todo.
from ...todos.contract import (
TODO_TASK_CLASS_ADVANCEMENT,
TODO_TASK_CLASS_MONITOR,
normalize_todo_replan_obligation_id,
)
from ...todos.todo_semantics import (
todo_advancement_frontier_counts,
todo_item_is_watch_only_monitor,
Expand Down Expand Up @@ -99,8 +105,6 @@
MONITOR_NO_CHANGE_STREAK_TRIGGER = "monitor_no_change_streak"
VISION_PROFILE_MISSING_TRIGGER = "required_agent_vision_missing"
TODO_SUCCESSION_GAP_TRIGGER = TODO_SUCCESSION_WARNING_REASON_CODE
TODO_TASK_CLASS_ADVANCEMENT = "advancement_task"
TODO_TASK_CLASS_MONITOR = "continuous_monitor"


def safe_non_negative_int(value: Any) -> int:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


LONG_TODO_CHAIN_TRIGGER = "long_todo_chain"
TODO_TASK_CLASS_ADVANCEMENT = "advancement_task"
LONG_TODO_CHAIN_FRONTIER_REVISION_SCHEMA_VERSION = (
TODO_FRONTIER_REVISION_SCHEMA_VERSION
)
Expand Down
9 changes: 7 additions & 2 deletions loopx/control_plane/todos/frontier_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
from typing import Any

from ..effect_runtime import effect_runtime_result
from .contract import normalize_todo_claimed_by, normalize_todo_excluded_agents
# Refs #4447: the todo contract owns this vocabulary; import it instead of
# restating the literal in every module that classifies a Todo.
from .contract import (
TODO_TASK_CLASS_ADVANCEMENT,
normalize_todo_claimed_by,
normalize_todo_excluded_agents,
)
from .todo_semantics import todo_item_task_class


TODO_FRONTIER_REVISION_SCHEMA_VERSION = "todo_frontier_revision_v0"
TODO_FRONTIER_REVISION_INDEX_SCHEMA_VERSION = "todo_frontier_revision_index_v0"
TODO_TASK_CLASS_ADVANCEMENT = "advancement_task"

FRONTIER_REVISION_FIELDS = (
"todo_id",
Expand Down
6 changes: 3 additions & 3 deletions loopx/semantics/vocabulary_v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,15 +886,15 @@
},
"inventory_ratchets": {
"meaning": "Counts read from the generated inventory. A same-runtime fork is one constant name with one value defined in two or more modules of the same runtime; a conflicting value is one name with different values. Both the number of affected names and the number of definitions are budgets, so a third spelling of an already-conflicting name is still a regression.",
"same_runtime_forks": 20,
"same_runtime_fork_definitions": 47,
"same_runtime_forks": 18,
"same_runtime_fork_definitions": 41,
"conflicting_values": 18,
"conflicting_definitions": 59,
"schema_version_same_runtime_forks": 7,
"multi_value_twins": 13,
"multi_value_forks": 4,
"multi_value_fork_definitions": 10,
"same_runtime_forks_semantic": 13,
"same_runtime_forks_semantic": 11,
"conflicting_values_semantic": 0,
"multi_value_meaning": "Enums, named closed sets, Literal aliases, and TypeScript as-const arrays are vocabulary exactly as a NAME = \"value\" constant is, so they get the same collision rule. One name defined in two modules with identical values is a twin; with different values it is a fork. The semantic multi-value-fork budget excludes only names declared in scope_declarations.",
"multi_value_forks_note": "The 4 counted forks include SOURCE_SURFACES, whose four definitions are four CLI commands each listing its own data sources; that is bounded-context reuse of one name, not drift. It stays in the budget until M0.5 adds a scope field (RFC Section 5) and must not be removed by renaming.",
Expand Down