Skip to content

feat(processing): diagnose Handoff and Prompt operation failures (#2126) - #2619

Open
guamiao wants to merge 1 commit into
oceanbase:masterfrom
guamiao:codex/2126-handoff-prompt-diagnostics
Open

guamiao wants to merge 1 commit into
oceanbase:masterfrom
guamiao:codex/2126-handoff-prompt-diagnostics

Conversation

@guamiao

@guamiao guamiao commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Related issue

Part of #2126. This follows the Dream, Handoff, and Evidence classifications merged in #2539.

Rationale

Operators need to distinguish a failed model call, a rejected artifact or demonstration, and a failed database write when Handoff and Prompt operations stop.

Changes

  • Emit bounded artifact.operation.failed diagnostics for Handoff generation, finalization, and commit, and for Prompt demonstration generation, creation, and replacement.
  • Reuse the shared processing error codes and diagnostic fields. Require explicit evidence for context-overflow classification on these paths and bound repeated events per process.
  • Preserve the original exceptions, transaction outcomes, and cancellation behavior. Omit request and artifact contents, database statements, and exception text from the new events.
  • Update the English and Chinese coverage matrices. Cross-family usage-accounting classification remains part of feat(artifacts): unify processing failure classification and safe diagnostics #2126.

User-facing changes

The new operational events are visible in configured logs. HTTP and persisted formats are unchanged.

Validation

  • make check passed on Linux against master 1cb0e75d.
  • Focused Handoff, Prompt, shared diagnostics, runtime processing, and Server/Worker logging regression suite passed 437 tests. One optional exporter test was skipped in the default environment. Rerunning uv run --locked --extra tracing-otlp python -m pytest tests/test_server_logging.py -q -rs passed all 50 logging tests, including the skipped case.
  • Exercised real SQLite rollback and retry, a local model fixture, and spawned Worker logging. An independent Codex agent passed 183 selected tests and found no remaining blocking issues on the reviewed patch.

AI usage statement

OpenAI Codex assisted with implementation, tests, and documentation. A separate Codex agent independently reviewed the change and reran focused tests.

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