Skip to content

fix: keep the reason when X style capture fails - #388

Closed
hamitarsln wants to merge 1 commit into
tin-computer:mainfrom
hamitarsln:codex/x-style-failure-reason
Closed

hamitarsln wants to merge 1 commit into
tin-computer:mainfrom
hamitarsln:codex/x-style-failure-reason

Conversation

@hamitarsln

Copy link
Copy Markdown
Collaborator

What and why

X style extraction already reports known sampling, integration and billing errors. The failure handler replaces that reason with a generic message.

Save the safe message in the existing operation record and use it when marking the run failed. Unknown errors still hide private provider details. Retrying does not buy another request.

Verification

  • 20 X style tests passed, including known and unknown failures across two attempts.
  • Ruff and diff checks passed.
  • 20 database-dependent X style/draft tests skipped: no test database configured.

Notes

This fixes the missing error reason. It does not fix the underlying connected-account failure or claim a live provider test.

@hamitarsln
hamitarsln requested a review from a team as a code owner October 11, 2026 13:29
Copilot AI balanced review requested due to automatic review settings October 11, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused implementation preserves safe diagnostics, avoids provider-detail leakage, and maintains no-repurchase semantics.

0 open findings

What changed in this PR

Preserves safe X style extraction failure reasons while keeping retries idempotent and unknown provider details private.

Changes:

  • Stores safe failure messages in the model effect receipt.
  • Uses the stored reason when projecting run failure.
  • Adds regression tests and documents the behavior.
File Description
src/​tin_lite/​x_style_activities.py Persists and projects safe failure reasons.
tests/​test_x_style.py Tests known/unknown failures and retry behavior.
docs/​x-workflow.md Documents failure-message handling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@demegire

Copy link
Copy Markdown
Contributor

Superseded by #403, which keeps the X style capture reason through one shared failure classification (founder-fixable vs internal) instead of a per-workflow receipt.

@demegire demegire closed this Oct 12, 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.

3 participants