Skip to content

call log: the one call that failed keeps its request and reply beside its error, without a switch #350

Closed

Description

@santoshkumarradha

Parent: #343 (epic #338)

Sub-issue of the defaults child. Touches the provider call seam; lands after #286 and #334.

What a debugger hits today

With the switch off, a failed model call leaves a row with a status and a clipped error sentence and nothing else. The request that failed and whatever reply came back are gone. The person reruns hoping to reproduce it, which #335 shows does not always work.

The law

The one call that failed keeps its request and reply beside its error, without a switch.

Fix shape

Each model call holds its request bytes and its assembled reply in one buffer. On any failure end (a refusal, a cut, a decode error, a transport error) the buffer is written as one body file in a failures folder under the state root, named by the call id, bounded to a count of recent failures with the oldest removed whole. On success the buffer is dropped. No authorization header or key is written. A failed compile keeps its last reply the same way.

Replication and acceptance

  • With every switch off, point a run at a model that refuses (or an invalid model slug): the failures folder gains one file holding the request and the error body, named by the call id on the call-log row.
  • With the count set to three, a fourth failure removes the oldest file.
  • A successful run adds nothing to the folder.
  • A failed run with every switch off leaves exactly the failing call's request, response and error, and nothing else: no other call's body, no tool events, no decision lines.
  • The key's value and any authorization header are absent from every file in the folder.

Drafted with CodeAF · reviewed and owned by the author

Activity

  1. added
    feature
    area:logging
    on Sep 2, 2026
  2. santoshkumarradha commented on Sep 10, 2026

    @santoshkumarradha
    MemberAuthor

    Consolidated into the epic #338. This issue's law, fix shape, replication and acceptance are reproduced in full in the epic's consolidated plan (comment on #338, 2026-09-10), under the pull request that now carries it — nothing is lost, and this issue stays readable.

    Why the children were folded back: the epic split into a foundation child, three decision-family children and a failure-evidence child so separate lanes could take them. Four weeks on, one lane took the foundation and the tree carried nine open issues describing what is now a handful of call sites each. The verified state at dev@95a0d0a9b is that internal/trace's Recorder.Call, Recorder.Tool and Recorder.Decision have zero callers outside the package's own tests — the shapes are all built and correct, and no feeder is wired, so AFORGE_DEBUG=1 today writes a run header and nothing else. That is one lane's work in three pull requests, not nine issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:loggingfeature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions