Skip to content

[codex] Improve runtime reliability and validation workflows#7

Merged
huisezhiyin merged 3 commits into
mainfrom
codex/continuous-runtime-recall-hook
May 12, 2026
Merged

[codex] Improve runtime reliability and validation workflows#7
huisezhiyin merged 3 commits into
mainfrom
codex/continuous-runtime-recall-hook

Conversation

@huisezhiyin
Copy link
Copy Markdown
Owner

@huisezhiyin huisezhiyin commented May 9, 2026

Summary

This PR extends the current runtime reliability and validation workflow work with two targeted resilience fixes:

  • auto-finish now survives readonly user-cache asset paths when writing activation feedback back into assets.
  • Milvus lock diagnosis now safely self-heals stale dead-pid metadata instead of repeatedly surfacing the same stale-lock warning.

It also includes a focused validation pass over candidate backlog and unproven assets so the new prior/constraint assets have real help signals, not just stored inventory.

What changed

  • runtime/cli/main.py
    • _apply_activation_feedback() now returns both activation_feedback and any write_warnings.
    • asset effectiveness writes now use the same workspace fallback path logic as other user-cache outputs.
    • auto-finish and explicit feedback both surface fallback warnings instead of failing on PermissionError.
  • runtime/storage/milvus_store.py
    • milvus_lock_summary() now clears stale dead-pid lock metadata when no real flock owner exists.
    • lock summaries expose stale_metadata_cleared so doctor/status can distinguish self-healed stale metadata from live locks.
  • tests/test_cli_flow.py
    • adds a regression test for readonly primary user-cache asset writes during auto-finish feedback persistence.
  • tests/test_milvus_store.py
    • adds stale-lock self-heal coverage and verifies live lock metadata is preserved.

Why

The recent review loop exposed two recurring runtime quality gaps:

  1. save/feedback flows could still fail even after fallback support existed for trace/episode/dashboard outputs.
  2. Milvus stale lock files could keep polluting diagnostics long after the owning process was gone.

Fixing both makes the runtime more robust and makes daily review output more trustworthy.

Validation

  • python3 -m unittest tests.test_cli_flow.CliFlowTests.test_cli_auto_finish_falls_back_when_feedback_asset_write_hits_primary_user_cache_root tests.test_cli_flow.CliFlowTests.test_cli_auto_finish_falls_back_when_primary_memory_root_is_unwritable tests.test_cli_flow.CliFlowTests.test_cli_auto_finish_records_activation_help_feedback_for_later_runs tests.test_cli_flow.CliFlowTests.test_cli_auto_finish_persists_asset_effectiveness_summary
  • python3 -m unittest tests.test_milvus_store.MilvusStoreLockTests
  • EXPCAP_STORAGE_PROFILE=user-cache EXPCAP_HOME=$HOME/.expcap scripts/expcap doctor --workspace "$PWD"

Runtime impact

  • Milvus remains healthy after the self-heal change.
  • Proof coverage improved through the follow-up validation pass.
  • The remaining doctor warning is operational backlog only: candidate_review_queue has 20 pending items.

@huisezhiyin huisezhiyin changed the title [codex] Trigger progressive recall from failed post-tool hooks [codex] Improve runtime reliability and validation workflows May 12, 2026
@huisezhiyin huisezhiyin marked this pull request as ready for review May 12, 2026 03:40
@huisezhiyin huisezhiyin merged commit 66472d3 into main May 12, 2026
@huisezhiyin huisezhiyin deleted the codex/continuous-runtime-recall-hook branch May 12, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant