review: simplify session-disambiguation test assertion (staticcheck QF1001) · Entire

review: simplify session-disambiguation test assertion (staticcheck QF1001)

99a3148→main·

dipree·1mo ago·1 file·+2 added/-1 removed

Use a set-membership check instead of negated disjunctions to satisfy staticcheck's De Morgan suggestion.

Sessions

ff9f72c12650View 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-ff9f72c12650/index.html)

Changes

1

842 unmodified lines

843
844
845
846
846
847
848
849
850

842 unmodified lines

if a == b {
        t.Fatalf("both inspectors linked to the same session %q; used-session tracking must keep them distinct", a)
    }
    if !(a == "sess-1" || a == "sess-2") || !(b == "sess-1" || b == "sess-2") {
    valid := map[string]bool{"sess-1": true, "sess-2": true}
    if !valid[a] || !valid[b] {
            t.Errorf("sessions = {%q, %q}, want the two distinct sessions sess-1 and sess-2", a, b)
    }
}

Mcmd/entire/cli/review/manifest_test.go+2/-1