# inspect: clearer end-of-run trail confirmation (posted+link / nothing to report)

`b8fa10c`→[main](/content/gh/entireio/cli/commits/main/index.html)·

dipree·1mo ago·2 files·+112 added/-2 removed

When a trail-output run finishes, it now confirms one of:
- posted: the hook prints 'Posted the review verdict to trail #N as a finding.' + 'View the trail: <link>' (already in place), or
- nothing to report: 'Nothing to report, so nothing was posted to the trail.' (reworded from the vague 'no review output produced'), or
- unavailable / error: kept-local / 'Could not post ...' notices.

Local-mode and cancelled runs stay silent about the trail. Adds TestMaybePostReviewToTrail covering all branches (local silent, posted via hook, nothing-to-report skip+confirm, error surfaced, cancelled silent).

## Sessions

30b78df00de8View transcript

[?\ Checkout the hand off doc that I just added.Pi·Opus 4.8·2 steps](/content/gh/entireio/cli/session/019eca64-8c2c-7b00-90c6-3aa49738c497#timeline-30b78df00de8/index.html)

## Changes

2

- cmd/entire/cli/review

- Mcmd.go+3/-2
  - Aposttrail_test.go+109

```plaintext
1315 unmodified lines

1316
1317
1318
1319
1319
1320
1321
1322
1323
1323
1324
1325
1326
1327
1328
1329

1315 unmodified lines

verdict = combinedReviewNarratives(summary)
}
if verdict == "" {
    fmt.Fprintln(out, "Nothing to post to the trail (no review output produced).")
    fmt.Fprintln(out, "Nothing to report, so nothing was posted to the trail.")
    return
}
if deps.PostReviewToTrail == nil {
    fmt.Fprintln(out, "Trail output is not available here; keeping the review local.")
    fmt.Fprintln(out, "Trail output is not available here; the review was kept local.")
    return
}
// On success the hook prints its own confirmation and trail link.
if err := deps.PostReviewToTrail(ctx, out, profileName, verdict); err != nil {
    fmt.Fprintf(out, "Could not post the review to the trail: %v\n", err)
}
```

Mcmd/entire/cli/review/cmd.go+3/-2

```go
package review

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"io"
	"strings"
	"testing"

reviewtypes "github.com/entireio/cli/cmd/entire/cli/review/types"
)

func postTrailSummary(narrative string) reviewtypes.RunSummary {
	var buf []reviewtypes.Event
	if narrative != "" {
		buf = []reviewtypes.Event{reviewtypes.AssistantText{Text: narrative}}
	}
	return reviewtypes.RunSummary{
		AgentRuns: []reviewtypes.AgentRun{{
			Name:   "claude-code",
			Status: reviewtypes.AgentStatusSucceeded,
			Buffer: buf,
		}},
	}
}

func TestMaybePostReviewToTrail(t *testing.T) {
	t.Parallel()

t.Run("local mode never posts and stays silent about the trail", func(t *testing.T) {
		t.Parallel()
		var out bytes.Buffer
		called := false
		deps := Deps{PostReviewToTrail: func(context.Context, io.Writer, string, string) error {
			called = true
			return nil
		}}
		maybePostReviewToTrail(context.Background(), &out, deps, ReviewOutputLocal, "general", postTrailSummary("a finding"), "")
		if called {
				
t.Error("local mode must not post to the trail")
		}
		if out.Len() != 0 {
			t.Errorf("local mode should print nothing about the trail, got %q", out.String())
		}
	})

t.Run("trail mode with output posts the verdict via the hook", func(t *testing.T) {
		...
	})

// Additional test cases...
}
```

Acmd/entire/cli/review/posttrail_test.go+109
