Skip to content

feat(api): a failed task's error_detail is the documented failure reason (#545) - #1373

Merged
athvin merged 1 commit into
mainfrom
feat/545-task-failure-reason
Nov 28, 2026
Merged

athvin merged 1 commit into
mainfrom
feat/545-task-failure-reason

Conversation

@athvin

@athvin athvin commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #545

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Narrowed as the ticket's product context proposes. task_instance.error_detail is documented in the contract as why a try failed, read from GET …/jobs/{job_id}/tasks. pg_task_instances asserts that a failed try's error_detail, error_class and exit_code reach that route.

Why

A customer whose run fails needs the reason through the API. The route already served the fields, but nothing documented them as the answer or proved a real failure reaches them. Product decision recorded in the field description: raw pod logs are not served, because they can carry record values (PII boundary). Persisted log tails would be a separate, optional operator ticket; none is filed because no consumer exists.

Proof

make check exit 0. Real-Postgres pg_task_instances: passed. Regenerated entities, OpenAPI (internal + public), TS types, MCP manifest, envelopes and developer reference.

Risk & rollback

Description-only contract change; no behaviour change. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-29T02:26:26Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: — c87d997, rust 46203375141 + frontend 46203375110 success
  • images built, or correctly never ran because nothing that goes into
    an image changed: — success, run 46203375140
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: — run 46203715279 success (the next deploy, which carries c87d997); a contract description changed, no behaviour
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: — infra, devcontainer, marketing preview success on c87d997
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: — Per-stage job logs route #545 CLOSED by feat(api): a failed task's error_detail is the documented failure reason (#545) #1373 via automation
  • follow-ups are open for everything deferred here — numbers: — none; raw pod logs are deliberately not served (PII boundary), recorded in the field description
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: — the failure-reason answer is the tasks route's error_detail; api-contract launch-readiness lists it in the recovery table (API: restore a dataset's results to an earlier run, and document the recovery operations #530)

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

🤖 Generated with Claude Code

…son (#545)

The tasks route already serves error_detail, error_class and exit_code for
every try. The contract now says error_detail is why the try failed, and
that raw pod logs are not served (they can carry record values).
pg_task_instances asserts a failed try's reason, class and exit code reach
GET …/jobs/{job_id}/tasks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin
athvin merged commit c87d997 into main Nov 28, 2026
49 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 28, 2026 23:48 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 391812a9 Deployed Nov 28, 2026 by athvin via remove closed PR previews #129
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.

Per-stage job logs route

2 participants