mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
* [W7] Add possibilities_matrix_enabled feature flag (default off) * [W7] Add _work_appears_done predicate (status+commits+PR+ACs+no-open-findings) * [W7] Add CI-green quality proxy for the fast path (local fallback on no-CI) * [W7] Add work-already-done fast path in i_am_done (slimmed gates, no rich plan) * [W7] Add WORK_ALREADY_DONE prompt state * [W7] Make fast path mypy-clean (cast to helpers for _resolve_ci_status; typed mock locals) * [W7] Extract _all_criteria_addressed to bring _work_appears_done under xenon B --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
28 lines
948 B
Python
28 lines
948 B
Python
"""Possibilities matrix (work-already-done fast path) is gated by a default-off
|
|
config flag, registered as a panel-tunable feature flag (the #487 lesson)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from unittest import mock
|
|
|
|
from roboco.config import Settings
|
|
from roboco.services.settings import FEATURE_FLAGS, validate_setting
|
|
|
|
|
|
def test_possibilities_matrix_disabled_by_default() -> None:
|
|
assert Settings().possibilities_matrix_enabled is False
|
|
|
|
|
|
def test_possibilities_matrix_reads_env_var() -> None:
|
|
with mock.patch.dict(os.environ, {"ROBOCO_POSSIBILITIES_MATRIX_ENABLED": "true"}):
|
|
assert Settings().possibilities_matrix_enabled is True
|
|
|
|
|
|
def test_possibilities_matrix_flag_registered_in_feature_flags() -> None:
|
|
assert "possibilities_matrix_enabled" in [key for key, _ in FEATURE_FLAGS]
|
|
|
|
|
|
def test_possibilities_matrix_flag_validates_as_bool() -> None:
|
|
validate_setting("possibilities_matrix_enabled", "true")
|