Six faults, all found on the air this evening and all in the same
feature. The decision trace added here is what found the first one:
one line per period, saying what was on the air and why each station
was refused.
- "worked" was read from the ENTITY's status, which means the country
is in the log on this band and mode. On 10 m, where most countries
are, twenty decodes out of twenty-one were refused as worked — the
watched DXpedition among them. The entity decides what is NEEDED;
the callsign's own slot decides whether calling it is a duplicate.
candidateOf() is split out and tested because one line was wrong for
weeks and nothing could catch it.
- A multi-answer line was read only up to its first message. MSHV
answers two stations in one transmission ("YV5ALI RR73; F4BPO
<HK0/PY8WW> -08") and the second half was a report to us: the engine
saw a station working somebody else and dropped the target at the
moment the DX was answering. The decodes panel already read every
segment.
- The slot after a QSO belongs to our own 73. Handing straight on to
the next station took it, switching the DX call mid-sequence, and
the frame that closes the contact never went out whole.
- A station CALLING US is answered whether or not the log wants
anything from it. It was refused for having nothing to gain, so a
QSO would end, two stations would call, and both were ignored.
- Callability was tested when a station was CHOSEN and never again
while it was held: one picked on its CQ that then answered another
caller went on being called for the whole seven attempts.
- A watched callsign now outranks every station that is not on the
list. Lifted one rung at a time it sat at the bottom with nothing
needed from it, and was never reached on a busy band — the opposite
of what putting it on the list means.
Halt is now a verdict: the station is set aside for the session rather
than released, and the chase list does not override it. The attempts
cap lets the over finish instead of cutting the call that counted it,
and a rest is a rest. Only what the decodes list is SHOWING can be
called — the panel publishes the callsigns it shows, so there is one
definition of "shown" and not two.
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"hamlog/internal/autocall"
|
|
)
|
|
|
|
// The entity's verdict is not the station's.
|
|
//
|
|
// From the air: on 10 m, where most countries are already in the log, the
|
|
// engine refused twenty decodes out of twenty-one as "worked" — a watched
|
|
// DXpedition calling CQ among them — because the ENTITY's status was read as
|
|
// the station's.
|
|
func TestCandidateWorkedIsTheCallsignNotTheEntity(t *testing.T) {
|
|
d := autocall.Decode{Call: "J38DX", Band: "10m", Mode: "FT8", IsNew: true}
|
|
|
|
// Grenada worked on 10 m FT8, this callsign never worked: nothing is needed
|
|
// from it, and calling it is NOT a duplicate.
|
|
c := candidateOf(d, SpotStatus{Status: "worked", WorkedSlot: false})
|
|
if c.Worked {
|
|
t.Error("a station never worked was refused because its entity was")
|
|
}
|
|
if c.Need != autocall.NeedNone {
|
|
t.Errorf("need = %v on a worked entity, want none", c.Need)
|
|
}
|
|
|
|
// The same callsign already in the log on this band and mode IS a duplicate.
|
|
if c := candidateOf(d, SpotStatus{Status: "worked", WorkedSlot: true}); !c.Worked {
|
|
t.Error("a callsign already worked on this band and mode was not flagged")
|
|
}
|
|
|
|
// And a real need still carries through, with the unconfirmed distinction.
|
|
c = candidateOf(d, SpotStatus{Status: "new-band", UnconfStatus: true})
|
|
if c.Need != autocall.NeedBand || !c.Unconfirmed {
|
|
t.Errorf("new-band unconfirmed came through as %v (unconf=%v)", c.Need, c.Unconfirmed)
|
|
}
|
|
}
|