Skip to content

feat: mark_run_skipped, the intentional-skip marker on an agent run - #297

Open
baharedr wants to merge 1 commit into
mainfrom
rius-1917-skip-run
Open

baharedr wants to merge 1 commit into
mainfrom
rius-1917-skip-run

Conversation

@baharedr

Copy link
Copy Markdown

Why

Rius's empty-run detection (CF-05) flags a finished, OK agent run with no LLM or tool call when the agent usually does work. A run that had nothing to do on purpose (empty queue, a guard deciding no work is needed) needs a way to say so. Linear: RIUS-1917.

What

  • rius.mark_run_skipped(reason) marks the current span; Observation.mark_skipped(reason) marks a held one. Both set rius.run.skipped_reason only on a recording AGENT span and return True; any other span (or none) returns False with a debug log, never raises (reliability contract). An empty/whitespace reason raises ValueError, a non-string TypeError.
  • The reason is whitespace-collapsed and cut to 200 characters. It is metadata, not content: it survives capture_content=False and masking. The README section says to keep it operational and never put user input or secrets in it.
  • The key lives in rius/run.py as RUN_SKIPPED_REASON for now. It is planned in rius-semconv (feat: plan rius.run.skipped_reason, the intentional-skip marker on an agent root rius-semconv#121); after this merges, that row flips to shipped, a semconv release follows, and the SDK syncs the generated constant and drops the literal.

Backend side: glassflow/argus-core#782 reads the marker (bounded, sanitized, quoted), excludes marked runs from baselines and reports them as info.

Testing

uv run ruff check ., ruff format --check ., mypy, pytest: 3145 passed. New tests/test_run_skipped.py: current AGENT span, @observe agent, held Observation inside a child span, non-agent span, no span, empty and non-string reasons, oversized reason cut, marker survives content masking.

rius.mark_run_skipped(reason) and Observation.mark_skipped(reason) set
rius.run.skipped_reason on a recording AGENT span, so Rius's empty-run
detection reports a run that had nothing to do on purpose as informational
instead of a warning. The reason is whitespace-collapsed and cut to 200
characters; it is metadata, so it survives capture_content=False. Any other
span is left unmarked and the call returns False.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant