Skip to content

resolve

resolve

Resolve command for Marianne CLI (#361).

Provides mzt resolve — resolve a sheet paused in FERMATA (awaiting a composer decision after retry exhaustion) without hand-crafting marker files. The conductor writes the decision marker and consumes it immediately through the existing fermata poll, so the audit trail (consumed/) and restart safety of the marker mechanism are preserved.

Classes

Functions:

resolve

resolve(job_id=Argument(..., help="The score's run id (job id) with a sheet paused in FERMATA (see `mzt status`)"), sheet_num=Argument(..., help='Sheet number awaiting the decision'), decision=Argument(..., help=f'Decision: {_DECISION_HELP}'), json_output=Option(False, '--json', '-j', help='Output result as JSON'))

Resolve a sheet paused in FERMATA awaiting a composer decision.

When escalation is enabled (--escalation or --self-healing), a sheet that exhausts its retries pauses in FERMATA instead of failing. This command records your decision and the score continues immediately.

Examples:

mzt resolve my-score 3 retry # Re-run sheet 3 from scratch mzt resolve my-score 3 accept # Accept its last attempt mzt resolve my-score 3 skip # Skip it, continue dependents mzt resolve my-score 3 fail # Fail it and its dependents

Source code in src/marianne/cli/commands/resolve.py
def resolve(
    job_id: str = typer.Argument(
        ...,
        help="The score's run id (job id) with a sheet paused in FERMATA (see `mzt status`)",
    ),
    sheet_num: int = typer.Argument(
        ...,
        help="Sheet number awaiting the decision",
    ),
    decision: str = typer.Argument(
        ...,
        help=f"Decision: {_DECISION_HELP}",
    ),
    json_output: bool = typer.Option(
        False,
        "--json",
        "-j",
        help="Output result as JSON",
    ),
) -> None:
    """Resolve a sheet paused in FERMATA awaiting a composer decision.

    When escalation is enabled (--escalation or --self-healing), a sheet
    that exhausts its retries pauses in FERMATA instead of failing. This
    command records your decision and the score continues immediately.

    Examples:
        mzt resolve my-score 3 retry     # Re-run sheet 3 from scratch
        mzt resolve my-score 3 accept    # Accept its last attempt
        mzt resolve my-score 3 skip      # Skip it, continue dependents
        mzt resolve my-score 3 fail      # Fail it and its dependents
    """
    asyncio.run(
        _resolve(
            job_id=job_id,
            sheet_num=sheet_num,
            decision=decision,
            json_output=json_output,
        )
    )