diff --git a/examples/semantic-vocabulary-drift-smoke.py b/examples/semantic-vocabulary-drift-smoke.py index d23bad3061..33aa60ed72 100755 --- a/examples/semantic-vocabulary-drift-smoke.py +++ b/examples/semantic-vocabulary-drift-smoke.py @@ -145,8 +145,8 @@ 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, @@ -154,7 +154,7 @@ "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 diff --git a/loopx/control_plane/goals/goal_frontier/__init__.py b/loopx/control_plane/goals/goal_frontier/__init__.py index bb42ee15ea..b403a96fb0 100644 --- a/loopx/control_plane/goals/goal_frontier/__init__.py +++ b/loopx/control_plane/goals/goal_frontier/__init__.py @@ -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, @@ -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: diff --git a/loopx/control_plane/goals/goal_frontier/long_todo_chain.py b/loopx/control_plane/goals/goal_frontier/long_todo_chain.py index 8b6d0df0bd..dd506e0fff 100644 --- a/loopx/control_plane/goals/goal_frontier/long_todo_chain.py +++ b/loopx/control_plane/goals/goal_frontier/long_todo_chain.py @@ -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 ) diff --git a/loopx/control_plane/todos/frontier_revision.py b/loopx/control_plane/todos/frontier_revision.py index f76febcb92..6bf1a659ad 100644 --- a/loopx/control_plane/todos/frontier_revision.py +++ b/loopx/control_plane/todos/frontier_revision.py @@ -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", diff --git a/loopx/semantics/vocabulary_v0.json b/loopx/semantics/vocabulary_v0.json index bc8a41835b..203c8ddf9f 100644 --- a/loopx/semantics/vocabulary_v0.json +++ b/loopx/semantics/vocabulary_v0.json @@ -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.",