Skip to content

fix: persist runtime probe evidence#1213

Merged
shaun0927 merged 1 commit into
mainfrom
fix/runtime-probe-durable-public
May 25, 2026
Merged

fix: persist runtime probe evidence#1213
shaun0927 merged 1 commit into
mainfrom
fix/runtime-probe-durable-public

Conversation

@Q00
Copy link
Copy Markdown
Owner

@Q00 Q00 commented May 24, 2026

Summary

  • fixes feat(auto): runtime-probe envelope + advisory probe_runner (L3-2) #1190 runtime probe durability by persisting runtime_probe_evidence into AutoPipelineState
  • preserves persisted probe evidence when completed sessions are replayed/resumed
  • adds an opt-in public CLI/MCP runtime probe runner via OUROBOROS_RUNTIME_PROBE_COMMAND for PRODUCT_COMPLETE validation

Verification

  • uv run ruff check src/ouroboros/auto/pipeline.py src/ouroboros/auto/state.py src/ouroboros/auto/adapters.py src/ouroboros/orchestrator/runtime_evidence.py src/ouroboros/cli/commands/auto.py src/ouroboros/mcp/tools/auto_handler.py tests/unit/auto/test_pipeline_runtime_probe_envelope.py
  • uv run pytest tests/unit/auto/test_pipeline_runtime_probe_envelope.py tests/unit/orchestrator/test_runtime_evidence.py -q

Copy link
Copy Markdown
Collaborator

@shaun0927 shaun0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-checked against #1190 (the L3-2 envelope + probe_runner contract) and #1181 (RuntimeEvidence substrate). Three things I verified:

  1. Persistence scope is correctstate.runtime_probe_evidence is per-session, hydrated at the start of run() and replaces the explicit self._last_probe_evidence = () clear. This is not a "leak across AutoPipeline instances" regression because a fresh AutoPipelineState still starts with runtime_probe_evidence=[]; the persistence only kicks in for resume/re-attach of the same logical session, which is exactly the gap #1190 acknowledged ("caches evidence... in the same run").
  2. EnvRuntimeProbeRunner is strictly opt-in — returns () when OUROBOROS_RUNTIME_PROBE_COMMAND is unset, so wiring it whenever complete_product=True is behaviorally identical to the previous probe_runner=None default for any caller that doesn't set the env var. Aligns with #1190's "the caller decides".
  3. RuntimeEvidence.to_dict/from_dict round-trip is safe — explicit type validation for each field, _json_safe_payload handles non-JSON-safe values via default=str fallback, and _validate_loaded rejects malformed entries. from_dict defaulting payload.setdefault("runtime_probe_evidence", []) covers older state files cleanly.

No conflicts with the other open auto PRs since this touches auto/{pipeline,state,adapters}.py, mcp/tools/auto_handler.py, and orchestrator/runtime_evidence.py in additive places — verified against #1196 / #1194 line ranges. Safe to merge.

@shaun0927 shaun0927 merged commit 0f03166 into main May 25, 2026
8 checks passed
@shaun0927 shaun0927 deleted the fix/runtime-probe-durable-public branch May 25, 2026 08:01
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.

2 participants