diff --git a/examples/semantic-vocabulary-drift-smoke.py b/examples/semantic-vocabulary-drift-smoke.py index 687dcd3d0d..3d57f562ab 100755 --- a/examples/semantic-vocabulary-drift-smoke.py +++ b/examples/semantic-vocabulary-drift-smoke.py @@ -150,7 +150,7 @@ "conflicting_values": 18, "conflicting_definitions": 59, "schema_version_same_runtime_forks": 7, - "multi_value_twins": 19, + "multi_value_twins": 13, "multi_value_forks": 4, "multi_value_forks_semantic": 3, "multi_value_fork_definitions": 10, diff --git a/loopx/capabilities/issue_fix/outcome_projection.py b/loopx/capabilities/issue_fix/outcome_projection.py index 4a7a029d2e..d4d0625c6f 100644 --- a/loopx/capabilities/issue_fix/outcome_projection.py +++ b/loopx/capabilities/issue_fix/outcome_projection.py @@ -8,6 +8,7 @@ from ...control_plane.runtime.public_safety import public_safe_compact_text from .metadata_preview import normalise_github_issue_link_reference +from .pr_lifecycle import BRANCH_REPLAN_MERGE_STATES from .repository_commit_evidence import ( ISSUE_FIX_REPOSITORY_COMMIT_EVIDENCE_SCHEMA_VERSION, ) @@ -30,7 +31,6 @@ DELIVERY_VALIDATION_STATUSES = {"passed", "failed", "partial", "not_run"} DELIVERY_OUTCOME_STATUSES = {"in_progress", "completed", "blocked"} -BRANCH_REPLAN_MERGE_STATES = {"BEHIND", "DIRTY"} _REPOSITORY_FINGERPRINT_PATTERN = re.compile(r"sha256:[0-9a-f]{64}") _COMMIT_OID_PATTERN = re.compile(r"[0-9a-fA-F]{40,64}") _RECOVERY_REF_PATTERN = re.compile( diff --git a/loopx/capabilities/issue_fix/pr_gate_reconcile.py b/loopx/capabilities/issue_fix/pr_gate_reconcile.py index 9e4942f959..d8101f857a 100644 --- a/loopx/capabilities/issue_fix/pr_gate_reconcile.py +++ b/loopx/capabilities/issue_fix/pr_gate_reconcile.py @@ -10,7 +10,10 @@ ) from ...control_plane.todos.todo_semantics import todo_item_task_class from ...todos import complete_goal_todo, list_goal_todos -from .pr_lifecycle import build_issue_fix_pr_lifecycle_monitor_packet +from .pr_lifecycle import ( + TERMINAL_PR_STATES, + build_issue_fix_pr_lifecycle_monitor_packet, +) from .pr_lifecycle_rollout import append_pr_merge_rollout_event from .pr_review_ack import ( load_issue_fix_pr_review_ack_receipts, @@ -23,7 +26,6 @@ PR_REVIEW_ACKED_RECONCILIATION_SCHEMA_VERSION = ( "issue_fix_pr_review_acked_reconciliation_v0" ) -TERMINAL_PR_STATES = {"MERGED", "CLOSED"} def _validate_merge_gate(todo: Mapping[str, Any], *, pr_number: int) -> None: diff --git a/loopx/capabilities/issue_fix/repository_context.py b/loopx/capabilities/issue_fix/repository_context.py index e6748ba24f..2730b08e37 100644 --- a/loopx/capabilities/issue_fix/repository_context.py +++ b/loopx/capabilities/issue_fix/repository_context.py @@ -9,7 +9,10 @@ from urllib.parse import urlsplit from ...control_plane.runtime.public_safety import public_safe_compact_text -from .repository_memory import build_issue_fix_repository_memory_hook +from .repository_memory import ( + SUPPORT_ASPECTS, + build_issue_fix_repository_memory_hook, +) ISSUE_FIX_REPOSITORY_CONTEXT_INPUT_SCHEMA_VERSION = ( "issue_fix_repository_context_input_v0" @@ -30,13 +33,6 @@ TRUST_LEVELS = {"authoritative", "verified", "advisory"} FRESHNESS_STATES = {"current", "stale", "unknown"} CONSULTATION_STATES = {"not_applicable", "available", "queried", "unavailable"} -SUPPORT_ASPECTS = { - "architecture", - "ownership", - "change_scope", - "reproduction", - "validation", -} REQUIRED_FIX_ASPECTS = ("change_scope", "reproduction", "validation") MAX_SOURCES = 16 diff --git a/loopx/claude_goal_mode/hooks/goal_state.py b/loopx/claude_goal_mode/hooks/goal_state.py index 16c2c0ad2b..1d0668422d 100644 --- a/loopx/claude_goal_mode/hooks/goal_state.py +++ b/loopx/claude_goal_mode/hooks/goal_state.py @@ -32,8 +32,6 @@ resolve_goal_context, ) -REGISTRY_DIRS = (".loopx", ".goal-harness") # prefer loopx; fall back to legacy - _ARMED_RE = re.compile(r"") diff --git a/loopx/extensions/lark/event_inbox.py b/loopx/extensions/lark/event_inbox.py index 027bb26829..3781cbcc76 100644 --- a/loopx/extensions/lark/event_inbox.py +++ b/loopx/extensions/lark/event_inbox.py @@ -11,6 +11,7 @@ from typing import Any from ...control_plane.work_items.operator_inbox import ( + CAPTURE_SCOPES, OperatorInboxSourceContract, operator_inbox_attention_kind, project_operator_inbox_urgency, @@ -33,7 +34,6 @@ CONFIG_SCHEMA_VERSION = "lark_event_inbox_config_v0" PROCESSED_SCHEMA_VERSION = "lark_event_inbox_processed_v0" MATERIAL_REVIEW_LEDGER_SCHEMA_VERSION = "lark_material_review_ledger_v0" -CAPTURE_SCOPES = {"addressed_only", "configured_chat_all"} MESSAGE_ID_PATTERN = re.compile(r"om_[A-Za-z0-9_-]+") EVENT_ID_PATTERN = re.compile(r"[A-Za-z0-9:_-]{1,200}") SAFE_PROFILE_PATTERN = re.compile(r"[A-Za-z0-9._-]{1,100}") diff --git a/loopx/semantics/vocabulary_v0.json b/loopx/semantics/vocabulary_v0.json index b1fa138ffa..ec7e76eced 100644 --- a/loopx/semantics/vocabulary_v0.json +++ b/loopx/semantics/vocabulary_v0.json @@ -891,13 +891,14 @@ "conflicting_values": 18, "conflicting_definitions": 59, "schema_version_same_runtime_forks": 7, - "multi_value_twins": 19, + "multi_value_twins": 13, "multi_value_forks": 4, "multi_value_fork_definitions": 10, "same_runtime_forks_semantic": 18, "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.", + "multi_value_twins_note": "A twin whose two definitions are the Python and TypeScript owners of one registered cross_runtime vocabulary is required by I3, not drift, and the TypeScript migration RFC governs any reduction of that pair. Every other counted twin is duplicate knowledge: single-source it from its owner instead of raising this budget.", "semantic_meaning": "same_runtime_forks_semantic and conflicting_values_semantic exclude module-local convention names such as SCHEMA_VERSION, COMMAND, or *_LABEL, which every module legitimately names for itself. The remaining names are shared vocabulary, where a duplicate is real drift rather than local naming; the unfiltered totals stay visible in the generated inventory summary.", "multi_value_forks_semantic": 3 },