mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
Consciousness effort inherits the Task / Chat effort when unset; pin the retired card helper
Owner decision (16.09, 1=A): an empty OUROBOROS_EFFORT_CONSCIOUSNESS slot now
means the Task / Chat effort, the same way an empty model slot means Main — a
wake-up is an ordinary Main turn and shares its request shape. A set value is
honored; an invalid one is treated as empty. The settings default becomes empty,
the Consciousness segmented field gains a "Same as Task / Chat" option, and the
configuration doc row says so.
Semantic merge fix for PR #970: its static UI contract pinned blockHasWork on
the shouldAlwaysShowTaskCard helper that this branch retired with the
bg-consciousness card kind; the fixture now pins the retired form (the
quick-test failure on 505f6f4ae).
The effort option table folds onto two lines so settings_ui.js stays under the
1000-line ratchet band.
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
This commit is contained in:
parent
505f6f4ae3
commit
3ac880fd97
10 changed files with 29 additions and 23 deletions
|
|
@ -167,7 +167,7 @@ A registry of `config.SETTINGS_DEFAULTS` (exact defaults stay canonical in `conf
|
|||
| OUROBOROS_EFFORT_REVIEW | high | Review effort; reaches plan review as every row's default rung unless the envelope declares `reviewer_effort` |
|
||||
| OUROBOROS_EFFORT_SCOPE_REVIEW | high | Scope-review effort |
|
||||
| OUROBOROS_EFFORT_DEEP_SELF_REVIEW | high | Deep-self-review effort — the surface default; a saved `deep_review` row's own effort outranks it |
|
||||
| OUROBOROS_EFFORT_CONSCIOUSNESS | high | Consciousness effort |
|
||||
| OUROBOROS_EFFORT_CONSCIOUSNESS | (empty) | Consciousness effort; empty = the Task / Chat effort (a wake-up is an ordinary Main turn), a set value is honored |
|
||||
| OUROBOROS_RETURN_REASONING | true | Ask OpenRouter to return reasoning; direct/local request copies strip OpenRouter-only fields |
|
||||
| OUROBOROS_REASONING_SUMMARY | auto | Readable reasoning-summary rendering; presentation-only, never added to history or returned to providers |
|
||||
| OUROBOROS_TASK_IDLE_TIMEOUT_SEC | 900 | Idle timeout — requires absence of real task/subtree progress; the typed in-flight main-LLM row spares only this rail; a settled child result stamps parent progress, because delivery creates immediate integration work and must not coincide with idle termination |
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ SETTINGS_DEFAULTS = {**UPDATE_SETTINGS_DEFAULTS,
|
|||
"OUROBOROS_EFFORT_REVIEW": "high",
|
||||
"OUROBOROS_EFFORT_SCOPE_REVIEW": "high",
|
||||
"OUROBOROS_EFFORT_DEEP_SELF_REVIEW": "high",
|
||||
"OUROBOROS_EFFORT_CONSCIOUSNESS": "high",
|
||||
"OUROBOROS_EFFORT_CONSCIOUSNESS": "", # empty = the Task / Chat effort (a wake-up is an ordinary Main turn)
|
||||
"OUROBOROS_RETURN_REASONING": True,
|
||||
"OUROBOROS_REASONING_SUMMARY": "auto",
|
||||
"GITHUB_TOKEN": "",
|
||||
|
|
|
|||
|
|
@ -54,8 +54,10 @@ def resolve_effort(task_type: str) -> str:
|
|||
key = "OUROBOROS_EFFORT_SCOPE_REVIEW"
|
||||
default = "high"
|
||||
elif t == "consciousness":
|
||||
key = "OUROBOROS_EFFORT_CONSCIOUSNESS"
|
||||
default = "high"
|
||||
# An empty slot is Main's effort (owner decision 16.09, 1=A): a wake-up is an
|
||||
# ordinary Main turn and shares its request shape; a set value is honored (В25=B).
|
||||
raw = str(runtime_setting("OUROBOROS_EFFORT_CONSCIOUSNESS", "") or "").strip().lower()
|
||||
return raw if raw in EFFORT_SCALE else resolve_effort("task")
|
||||
else:
|
||||
# Legacy INITIAL_REASONING_EFFORT is retired; use EFFORT_TASK.
|
||||
key = "OUROBOROS_EFFORT_TASK"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -73,10 +73,14 @@ def test_review_effort_configurable():
|
|||
# Consciousness
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def test_consciousness_effort_default_is_high():
|
||||
"""Default consciousness effort is high-horizon, not cheap helper mode."""
|
||||
def test_consciousness_effort_default_inherits_task_effort():
|
||||
"""An empty consciousness slot is Main's effort: a wake-up is an ordinary Main turn."""
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
assert resolve_effort("consciousness") == "high"
|
||||
assert resolve_effort("consciousness") == resolve_effort("task")
|
||||
with patch.dict(os.environ, {"OUROBOROS_EFFORT_TASK": "xhigh"}, clear=True):
|
||||
assert resolve_effort("consciousness") == "xhigh"
|
||||
with patch.dict(os.environ, {"OUROBOROS_EFFORT_TASK": "xhigh", "OUROBOROS_EFFORT_CONSCIOUSNESS": "bogus"}, clear=True):
|
||||
assert resolve_effort("consciousness") == "xhigh" # an invalid value is treated as empty
|
||||
|
||||
|
||||
def test_consciousness_effort_configurable():
|
||||
|
|
@ -94,4 +98,4 @@ def test_task_type_is_case_insensitive():
|
|||
with patch.dict(os.environ, {}, clear=True):
|
||||
assert resolve_effort("EVOLUTION") == "high"
|
||||
assert resolve_effort("Review") == "high"
|
||||
assert resolve_effort("CONSCIOUSNESS") == "high"
|
||||
assert resolve_effort("CONSCIOUSNESS") == resolve_effort("task")
|
||||
|
|
|
|||
|
|
@ -229,6 +229,11 @@ def test_model_role_resolves_the_consciousness_slots_and_falls_back_to_main():
|
|||
assert model_role_slot_override(meta) is None # an empty slot is Main
|
||||
assert _initial_effort_for({"metadata": meta}, "task") == "low"
|
||||
assert _initial_effort_for({"metadata": {}}, "task") == "medium"
|
||||
# An empty EFFORT slot is Main's effort too (owner decision 16.09, 1=A): the wake shares
|
||||
# Main's request shape; a set value is honored.
|
||||
with mock.patch.dict(os.environ, {"OUROBOROS_MODEL_CONSCIOUSNESS": "", "OUROBOROS_EFFORT_CONSCIOUSNESS": "",
|
||||
"OUROBOROS_EFFORT_TASK": "xhigh"}):
|
||||
assert _initial_effort_for({"metadata": meta}, "task") == "xhigh"
|
||||
# An empty model slot still honors the role's OWN local flag when the owner set it and it
|
||||
# differs from Main's (В25=B: every slot is respected; astra round 4).
|
||||
with mock.patch.dict(os.environ, {"OUROBOROS_MODEL_CONSCIOUSNESS": "", "USE_LOCAL_CONSCIOUSNESS": "true",
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ def test_frontend_evolution_and_consciousness_controls_are_present():
|
|||
assert consciousness["settingsToggleId"] == "s-local-consciousness"
|
||||
assert "modelRolesHost('settings-model-roles')" in settings_ui
|
||||
assert "modelRoles.load(s," in settings
|
||||
assert "OUROBOROS_EFFORT_CONSCIOUSNESS', 'high'" in settings
|
||||
assert "OUROBOROS_EFFORT_CONSCIOUSNESS', ''" in settings # empty = the Task / Chat effort
|
||||
|
||||
|
||||
def test_evolution_checkpoint_records_and_reads(tmp_path):
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ def test_effort_defaults_in_config():
|
|||
assert SETTINGS_DEFAULTS.get("OUROBOROS_EFFORT_REVIEW") == "high"
|
||||
assert SETTINGS_DEFAULTS.get("OUROBOROS_EFFORT_SCOPE_REVIEW") == "high"
|
||||
assert SETTINGS_DEFAULTS.get("OUROBOROS_EFFORT_DEEP_SELF_REVIEW") == "high"
|
||||
assert SETTINGS_DEFAULTS.get("OUROBOROS_EFFORT_CONSCIOUSNESS") == "high"
|
||||
assert SETTINGS_DEFAULTS.get("OUROBOROS_EFFORT_CONSCIOUSNESS") == "" # empty = the Task / Chat effort
|
||||
|
||||
|
||||
def test_review_effort_default_carriers_stay_in_sync():
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const VALUE_FIELDS = [
|
|||
// 6.3: Review / Scope Review efforts are per-slot rows in Agents → Review
|
||||
// lanes now; their global keys remain backend defaults, no longer UI-authored.
|
||||
['s-effort-task', 'OUROBOROS_EFFORT_TASK', 'medium'], ['s-effort-evolution', 'OUROBOROS_EFFORT_EVOLUTION', 'high'],
|
||||
['s-effort-consciousness', 'OUROBOROS_EFFORT_CONSCIOUSNESS', 'high'], ['s-effort-deep-self-review', 'OUROBOROS_EFFORT_DEEP_SELF_REVIEW', 'high'],
|
||||
['s-effort-consciousness', 'OUROBOROS_EFFORT_CONSCIOUSNESS', ''], ['s-effort-deep-self-review', 'OUROBOROS_EFFORT_DEEP_SELF_REVIEW', 'high'],
|
||||
['s-consciousness-autonomy', 'OUROBOROS_CONSCIOUSNESS_AUTONOMY', 'act'],
|
||||
['s-review-enforcement', 'OUROBOROS_REVIEW_ENFORCEMENT', 'advisory'], ['s-task-review-mode', 'OUROBOROS_TASK_REVIEW_MODE', 'auto'], ['s-runtime-mode', 'OUROBOROS_RUNTIME_MODE', 'advanced'],
|
||||
// Shared paid-review-cycle cap (plan review / task acceptance / commit gate);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const EFFORT_FIELDS = [
|
|||
['s-effort-task', 'Task / Chat', 'medium'],
|
||||
['s-effort-evolution', 'Evolution', 'high'],
|
||||
['s-effort-deep-self-review', 'Deep Self-Review', 'high'],
|
||||
['s-effort-consciousness', 'Consciousness', 'high'],
|
||||
['s-effort-consciousness', 'Consciousness', ''], // '' = the Task / Chat effort (a wake-up is a Main turn)
|
||||
];
|
||||
|
||||
// Runtime mode is one axis of the owner policy contract. Keep the Settings
|
||||
|
|
@ -201,22 +201,17 @@ function providerSettingsCard(spec) {
|
|||
// routes, per-model resolution on delegated ones); the adaptation is disclosed
|
||||
// in usage, and a cold route whose provider rejects without naming supported
|
||||
// tiers remains the PR-disclosed limit of the two-send recovery rail.
|
||||
const EFFORT_OPTIONS = [
|
||||
{ value: 'none', label: 'None' },
|
||||
{ value: 'low', label: 'Low' },
|
||||
{ value: 'medium', label: 'Medium' },
|
||||
{ value: 'high', label: 'High' },
|
||||
{ value: 'xhigh', label: 'X-High' },
|
||||
{ value: 'max', label: 'Max' },
|
||||
{ value: 'ultra', label: 'Ultra' },
|
||||
];
|
||||
const EFFORT_OPTIONS = [['none', 'None'], ['low', 'Low'], ['medium', 'Medium'], ['high', 'High'], ['xhigh', 'X-High'], ['max', 'Max'], ['ultra', 'Ultra']]
|
||||
.map(([value, label]) => ({ value, label }));
|
||||
|
||||
function effortField({ id, label, defaultValue }) {
|
||||
// Consciousness may inherit the Task / Chat effort ('' — a wake-up is a Main turn).
|
||||
const options = id === 's-effort-consciousness' ? [{ value: '', label: 'Same as Task / Chat' }, ...EFFORT_OPTIONS] : EFFORT_OPTIONS;
|
||||
return `
|
||||
<div class="settings-effort-card">
|
||||
<label for="${id}">${label}</label>
|
||||
<input id="${id}" type="hidden" value="${defaultValue}">
|
||||
${renderSegmentedField({ target: id, options: EFFORT_OPTIONS })}
|
||||
${renderSegmentedField({ target: id, options })}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue