Skip to content

debug record: the routing choice and the hedge verdict are written with their reason #346

Closed

Description

@santoshkumarradha

Parent: #342 (epic #338)

Sub-issue of the decision-lines child. Depends on the foundation child.

What a debugger hits today

The lane choice is made with a composed reason sentence and a scored frontier, and neither reaches disk; only the lane asked for and the lane that served are on the call-log row. The hedge controller reaches a verdict with a reason word and the row keeps the verdict's kind, wait and cost while the reason is dropped on the way to the record. A person seeing "asked lane A, served by lane B" cannot say whether that was a router override, a hedge, or a refusal.

The law

A routing choice and a hedge verdict are written with their reason at the moment they are made.

Fix shape

Two recorder calls: one where the routing choice is built (choice, reason sentence, ordered alternatives), one where the hedge verdict is reached (kind, trigger reason, deadline, and later the winning arm). Both carry the call id.

Replication and acceptance

  • With the switch on, a run against a model with several lanes leaves one routing decision per call with the chosen lane and the reason sentence the picker would have shown.
  • With a low hedge deadline, the trace holds a hedge decision naming the trigger reason and the arm that won; both arms' call-log rows still exist.
  • With the switch off, nothing is written and routing is unchanged.

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