Skip to content

fix(plugins): retain observed results after cleanup failures - #211

Closed
yxflc11 wants to merge 2 commits into
mainfrom
codex/plugin-timeout-stability
Closed

yxflc11 wants to merge 2 commits into
mainfrom
codex/plugin-timeout-stability

Conversation

@yxflc11

@yxflc11 yxflc11 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

A durable Work plugin call could receive and validate its response, then lose that observation when MCP session cleanup failed or the operation deadline expired during cleanup. Preserve the observation for the existing immutable ToolResults save/verification path. Caller cancellation and missing responses remain unknown and recovery never resends the effect.

Add fixed failure-stage and timeout diagnostics without endpoint URLs, credentials, arguments, response content or raw exception text. This does not change timeout limits, permission gates, database schema or retry policy.

The historical main failure at 612ccd4 took 9.70s and had no observed plugin effect, but its logs omitted the underlying exception. Its exact cause remains unconfirmed; the reproducible cleanup defect is not presented as that failure's established root cause.

Acceptance journey

  1. Use a real disposable PostgreSQL database and official MCP loopback server.
  2. Observe a tool/resource response, inject cleanup failure or expire the operation deadline, then read the stored response and recover without another call.
  3. Inject pre-dispatch timeout, caller cancellation, lost response and receipt-storage failure; retain unknown without resend.

Open-source research

  • Research reuse: docs/research/python-plugins.md
  • Reuse scope: repair Work plugin observation retention and add bounded diagnostics to existing effect recovery.
  • Unchanged assumptions: MCP 1.29.0, HTTPX 0.28.1 and HTTPCore 1.0.9 remain pinned; Server authority, existing SQL/ToolResults receipts and lookup-only reconciliation are unchanged. No new protocol, dependency or persistence structure.
  • Source copied or substantially adapted: no

Verification

  • npm run check: passed; final Turbo results reuse the preceding successful run.
  • packages/harness/scripts/quality.sh: passed.
  • OPENBOT_TEMPORAL_TEST_PYTHON=... npm run test:control:python: passed; 1,077 control tests + 1,597 Worker tests, 3 skips (optional base Temporal modules and retained-history replay input).
  • Original read-grant test: 12 local rounds, 24 passing cases before the fix.
  • Cleanup-timeout regression: failed before the fix, passed after it; official integration covers all new cases.
  • macOS arm64 with synthetic providers/owned PostgreSQL; this is not a new Linux or cross-language Temporal replay qualification.
  • Owned test containers cleaned; no application installation or production-data change.

Security impact

  • No new privilege or external side effect
  • No credentials or private user data included
  • Unknown outcomes remain fail-closed; logs contain only closed stage/category names.

Documentation and compatibility

  • User-visible claims distinguish implemented, experimental, and planned behavior
  • English documentation and maintained Chinese translation updated
  • Cross-platform impact explicitly bounded by actual evidence

AI or automation assistance

  • Tools/models used: Codex, local CLI, official GitHub API and repository test harnesses.
  • Human-reviewed areas and evidence: user reported the main CI failure; this fix awaits PR review and hosted CI. No merge is authorized.

@yxflc11

yxflc11 commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this Python-only draft because its implementation files were retired by P5 (#222). The current TypeScript implementation was inspected: Work already retained ordinary parsed observations, but the shared withPlugin wrapper still allowed Client.close() failures to overwrite callback results/original errors, including signal expiry during cleanup. The minimal current-Server replacement is #228 (two production lines plus six regression cases). The new cases failed before the fix and pass after it; full npm run check and the real TS UI journey (12/12) passed. No retired Python files are restored.

@yxflc11 yxflc11 closed this Oct 10, 2026
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