Skip to content

[HUM-120] Surface the full error cause chain in LogError - #46

Merged
devpg merged 2 commits into
mainfrom
hum-120-logerror-cause-chain
Jun 27, 2026
Merged

[HUM-120] Surface the full error cause chain in LogError#46
devpg merged 2 commits into
mainfrom
hum-120-logerror-cause-chain

Conversation

@devpg

@devpg devpg commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

What

LogError previously logged only the outermost wrap message (tozd's Error()/%+v expose just the top wrap), so the actual root cause — e.g. a Docker connection failure — was invisible in logs. This renders the full unwrapped chain via a new CauseChain(err) helper ("outer: inner: root"), collapsing consecutive duplicate messages that WrapWithDetails produces so the output stays readable.

It also drops the old implementation's redundant double .Err(err) call.

Provenance

Salvaged from an unmerged commit (200e6db, authored 2026-06-17) that was stranded on a local-only branch and never pushed. Cherry-picked clean onto main. The companion HUM-120 docker-context commit was not revived — that feature already landed on main via 462fff4 [HUM-122] Resolve active Docker context in both engine clients.

Verification

  • make test — 2836 tests pass
  • go vet + staticcheck clean on errors/
  • go build ./... clean

🤖 Generated with Claude Code

devpg and others added 2 commits June 27, 2026 00:21
tozd's Error() and %+v only expose the outermost wrap message, so root
causes — e.g. a Docker connection failure behind "starting agent
container" — were invisible to users. Add CauseChain to render the full
unwrapped chain (collapsing the duplicate messages tozd wrappers emit) and
have LogError report it as the error field, alongside the existing
structured details such as captured install.sh stderr.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@devpg
devpg merged commit 54df8bd into main Jun 27, 2026
4 checks passed
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