"""Truthful executable verification groups for composed Todo2-9 capabilities."""

from __future__ import annotations

from dataclasses import dataclass


@dataclass(frozen=True, slots=True)
class GroupSeed:
    id: str
    capabilities: tuple[str, ...]
    cwd: str
    test_paths: tuple[str, ...]
    source_paths: tuple[str, ...]
    isolation_policy: str = "fresh_subprocess; compatible_group"


_GATEWAY_WEEKLY = (
    "tests/gateway/test_nutrition_weekly_dispatcher.py",
    "tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py",
    "tests/gateway/test_nutrition_weekly_dispatcher_host_matrix.py",
    "tests/gateway/test_nutrition_weekly_dispatcher_lifecycle.py",
    "tests/gateway/test_nutrition_weekly_operations.py",
    "tests/gateway/test_nutrition_weekly_operations_registry_identity_r7.py",
    "tests/gateway/test_nutrition_weekly_operations_topic59.py",
    "tests/gateway/test_nutrition_weekly_operations_topic59_failures.py",
    "tests/gateway/test_nutrition_weekly_operations_topic59_r2.py",
    "tests/gateway/test_nutrition_weekly_operations_topic59_r2_slots.py",
    "tests/gateway/test_nutrition_weekly_operations_topic59_telegram.py",
    "tests/gateway/test_nutrition_weekly_owner_draft.py",
    "tests/gateway/test_nutrition_weekly_owner_draft_authority.py",
    "tests/gateway/test_nutrition_weekly_owner_draft_model.py",
    "tests/gateway/test_nutrition_weekly_owner_draft_r3.py",
    "tests/gateway/test_nutrition_weekly_reminder_bootstrap_boundary_r7.py",
    "tests/gateway/test_nutrition_weekly_reminder_bootstrap_r6.py",
    "tests/gateway/test_nutrition_weekly_reminder_bootstrap_race_r7.py",
    "tests/gateway/test_nutrition_weekly_reminder_boundaries.py",
    "tests/gateway/test_nutrition_weekly_reminder_ownership_r8.py",
    "tests/gateway/test_nutrition_weekly_reminder_runtime.py",
    "tests/gateway/test_nutrition_weekly_reminder_threat_boundary_r8.py",
    "tests/gateway/test_nutrition_weekly_reminder_transfer_r9.py",
)
_PROFILE_WEEKLY = (
    "tests/test_weekly_operations.py",
    "tests/test_weekly_operations_ancestor_integrity.py",
    "tests/test_weekly_operations_authority.py",
    "tests/test_weekly_operations_authority_r4.py",
    "tests/test_weekly_operations_commit_outcome.py",
    "tests/test_weekly_operations_correlation.py",
    "tests/test_weekly_operations_correlation_authority_r2.py",
    "tests/test_weekly_operations_correlation_transactions_r2.py",
    "tests/test_weekly_operations_customer_authority_r2.py",
    "tests/test_weekly_operations_cutoff.py",
    "tests/test_weekly_operations_descriptor_authority_r3.py",
    "tests/test_weekly_operations_global_history.py",
    "tests/test_weekly_operations_handoff_transaction.py",
    "tests/test_weekly_operations_initialization.py",
    "tests/test_weekly_operations_integrity.py",
    "tests/test_weekly_operations_lifecycle.py",
    "tests/test_weekly_operations_lifecycle_cancellation_r6.py",
    "tests/test_weekly_operations_lifecycle_r2.py",
    "tests/test_weekly_operations_lifecycle_r3.py",
    "tests/test_weekly_operations_lifecycle_runtime.py",
    "tests/test_weekly_operations_owner_binding.py",
    "tests/test_weekly_operations_parent_capability.py",
    "tests/test_weekly_operations_publication_races.py",
    "tests/test_weekly_operations_registration_r5.py",
    "tests/test_weekly_operations_registration_r6.py",
    "tests/test_weekly_operations_registration_recovery_r5.py",
    "tests/test_weekly_operations_registry_bootstrap_r6.py",
    "tests/test_weekly_operations_repair_capability.py",
    "tests/test_weekly_operations_repair_publication.py",
    "tests/test_weekly_operations_signal_critical.py",
    "tests/test_weekly_operations_summary.py",
    "tests/test_weekly_operations_summary_authority.py",
    "tests/test_weekly_operations_summary_boundaries.py",
    "tests/test_weekly_operations_summary_integrity.py",
    "tests/test_weekly_operations_summary_weight_trend.py",
    "tests/test_weekly_operations_topology.py",
)
_GATEWAY_SOURCES = (
    "gateway/platforms/nutrition_weekly_operations_config.py",
    "gateway/platforms/nutrition_weekly_reminder.py",
    "gateway/platforms/nutrition_weekly_operations.py",
    "gateway/platforms/nutrition_weekly_owner_draft.py",
    "gateway/platforms/nutrition_weekly_dispatcher.py",
)

GROUPS = (
    GroupSeed(
        "todo2-6-8-9-compatible-gateway",
        (
            "todo2-default-off-weekly-operations-authority",
            "todo5-reminder-and-missed-lifecycle",
            "todo6-privacy-safe-topic59-projector",
            "todo8-grounded-monday-owner-draft",
            "todo9-production-dispatcher-integration",
        ), ".", _GATEWAY_WEEKLY, _GATEWAY_SOURCES,
    ),
    GroupSeed(
        "todo3-4-7-profile-weekly-complete",
        (
            "todo3-append-only-day-status-sidecar",
            "todo4-checkin-correction-correlation",
            "todo7-seven-calendar-day-aggregate",
        ), "dualcoach/profile", _PROFILE_WEEKLY, (
            "dualcoach/profile/checkin_cli/weekly_operations_store.py",
            "dualcoach/profile/checkin_cli/weekly_operations_correlation.py",
            "dualcoach/profile/checkin_cli/weekly_operations_summary.py",
        ),
    ),
    GroupSeed(
        "todo3-4-7-profile-summary",
        (
            "todo3-append-only-day-status-sidecar",
            "todo4-checkin-correction-correlation",
            "todo7-seven-calendar-day-aggregate",
        ), "dualcoach/profile", (
            "tests/test_customer_reporting.py", "tests/test_weekly_operations.py",
            "tests/test_weekly_operations_summary.py",
            "tests/test_weekly_operations_summary_integrity.py",
            "tests/test_weekly_operations_summary_authority.py",
            "tests/test_weekly_operations_summary_boundaries.py",
        ), (
            "dualcoach/profile/checkin_cli/weekly_operations_store.py",
            "dualcoach/profile/checkin_cli/weekly_operations_correlation.py",
            "dualcoach/profile/checkin_cli/weekly_operations_summary.py",
        ),
    ),
    GroupSeed(
        "todo5-6-8-provider-unknown-restart-race",
        (
            "todo5-terminal-reminder-provider-authority",
            "todo6-terminal-topic59-provider-authority",
            "todo8-bounded-owner-provider-authority",
        ), ".", (
            "tests/gateway/test_nutrition_weekly_operations_topic59_failures.py::test_unknown_and_known_send_outcomes_are_terminal_without_replacement",
            "tests/gateway/test_nutrition_weekly_operations_topic59_failures.py::test_unknown_and_known_edit_outcomes_are_terminal_without_replacement",
            "tests/gateway/test_nutrition_weekly_owner_draft_r3.py::test_unknown_initial_is_terminal_across_restart_and_concurrency",
            "tests/gateway/test_nutrition_weekly_owner_draft_r3.py::test_unknown_correction_is_terminal_without_third_call",
            "tests/gateway/test_nutrition_weekly_reminder_bootstrap_race_r7.py::test_registry_swap_during_bootstrap_fails_after_retained_fd_recheck[1]",
        ), (
            "gateway/platforms/nutrition_weekly_operations.py",
            "gateway/platforms/nutrition_weekly_owner_draft.py",
            "gateway/platforms/nutrition_weekly_reminder_bootstrap.py",
        ),
    ),
    GroupSeed(
        "todo8-nutrition-coaching-owner-lifecycle",
        ("todo8-grounded-monday-owner-draft",), ".",
        ("tests/gateway/test_nutrition_coaching.py",),
        ("gateway/platforms/nutrition_coaching.py",),
    ),
    GroupSeed(
        "todo9-production-dispatcher-host-matrix",
        ("todo9-production-dispatcher-integration",), ".", (
            "tests/gateway/test_nutrition_weekly_dispatcher.py",
            "tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py",
            "tests/gateway/test_nutrition_weekly_dispatcher_host_matrix.py",
            "tests/gateway/test_nutrition_weekly_dispatcher_lifecycle.py",
        ), (
            "gateway/platforms/nutrition_weekly_dispatcher.py",
            "gateway/platforms/nutrition_weekly_dispatcher_transport.py",
        ),
    ),
    GroupSeed(
        "todo5-r10-allocation-interruption",
        ("todo5-r10-allocation-line-ownership",), ".",
        ("tests/gateway/test_nutrition_weekly_reminder_allocation_r10.py",),
        ("gateway/platforms/nutrition_weekly_reminder_resources.py",),
        "fresh_subprocess; isolated_r10; never_compose_with_r11",
    ),
    GroupSeed(
        "todo5-r11-close-interruption",
        ("todo5-r11-owned-fd-close-reconciliation",), ".",
        ("tests/gateway/test_nutrition_weekly_reminder_close_r11.py",),
        ("gateway/platforms/nutrition_weekly_reminder_resources.py",),
        "fresh_subprocess; isolated_r11; never_compose_with_r10",
    ),
)