Skip to content

feat: QSO logging to Wavelog (FR-LOG-01..04, 07, 08) - #253

Merged
dc0sk merged 9 commits into
mainfrom
feat/wavelog-core
Oct 27, 2026
Merged

dc0sk merged 9 commits into
mainfrom
feat/wavelog-core

Conversation

@dc0sk

@dc0sk dc0sk commented Oct 27, 2026

Copy link
Copy Markdown
Owner

This builds QSO logging to Wavelog through API v2, to design v0.4 (as built, in #252, which this PR stacks on). The lookup (FR-LOG-05) and the spot prefill (FR-LOG-06) come in a next PR.

What it adds:

  • k4-log, a new crate with no HTTP stack. It holds:
    • the band table, equal to Wavelog's GetBand edges (source credited);
    • the ADIF mode/submode mapping (FT4 and JS8 under MFSK);
    • power in watts per range, split, and UTC times with seconds;
    • URL normalisation (DC0SK's …/api/v2 form), with HTTPS required except to loopback;
    • Secret, whose Debug output shows only the last four characters;
    • the reply classifier, keyed on error.code;
    • the queue directory: one atomic file per QSO and one sender;
    • ADIF export for held entries.
  • app/src/wavelog.rs, the transport and the worker. Timeouts are set per phase, so a failure says whether the request may have reached the server. Redirects are never followed. The token is read only in this file (structural test).
  • app/src/log_ui.rs and Settings → LOGGING:
    • the LOG strip under the AF recorder (call, RST, name, comment, digital mode for DATA, a typed frequency when no radio is connected), plus a line showing what will be logged;
    • the tab: URL, token (keychain I/O off the UI thread), operator, station location, Test, the queue with its held entries, send now, and save as ADIF.

Evidence:

  • Workspace: 657 passed, 0 failed. Clippy (all features, and kpod) is clean. The gate is OK: R3 passes without the FR-LOG waivers, and R6 is unchanged.
  • Unit and mock-server tests: the 18 k4-log tests and 16 app tests are listed in ledger 4.58. Every new test was sabotage-verified, 19 planted breaks in all, each turning its own test red. One sabotage first didn't compile and was redone.
  • Against the local Wavelog (#[ignore], run with K4_WAVELOG_URL/K4_WAVELOG_TOKEN; refuses any host but loopback):
    • Test, then a log, then a read-back through the ADIF export: MFSK/FT4, 20m, Hz, TX_PWR, and the seconds;
    • a first-try duplicate is held.
  • On screen (--demo, private Xvfb, private D-Bus session): a QSO logged from the strip reached Wavelog as Gap #5: diversity + sub-RX enable #11, with the right fields.

Found and fixed along the way, each now with a test:

  • ureq 3.3 reports SendRequest while waiting for a reply, so a send-phase timeout counts as "may have reached".
  • A keychain save on the UI thread froze the window.
  • The Test needed a station location, which is what it fetches.
  • The settings tabs no longer fit; the row now wraps.
  • The demo snapshot didn't fill radio.

Not tested here: the real DARC server. The first real QSO is DC0SK's, on the radio.

Merge after #252, which is this PR's base.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk

Simon Keimer and others added 7 commits October 27, 2026 10:55
…ly classes, queue directory, ADIF (FR-LOG-01/03/04/08)

Core of design v0.3, pure and hardware-free. The app wiring follows on this
branch before the PR: until the app uses the crate, the gate's R6 flags its
17 public functions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…ip (FR-LOG-01/02/03/04/07)

wavelog.rs: the HTTP transport (per-phase timeouts so a failure says whether
the request may have reached the server; no redirects; the token read only
here, for the header and the secret store) and the worker that owns the queue
and its sender lock, sends in order, retries with back-off, pauses or holds
as k4-log's classifier says, and runs the Test (status in both path forms,
token scopes/owner/expiry, station locations).

log_ui.rs: the log strip under the AF recorder (call, RST, name, comment,
digital mode for DATA, frequency typed when no radio is connected) and the
LOGGING settings tab (URL normalised once -- changing it deletes the token --,
token, operator, station location, Test, queue with held entries, send now,
save held as ADIF). The worker is reconfigured only when the setup changes.

Mock-server tests: logged; a resend after a lost reply logs once (found that
ureq 3.3 reports SendRequest while waiting for a reply, so only resolve/connect
timeouts count as not reached); a first-try duplicate held; forbidden holds,
a bad token pauses until a new setup; unreachable backs off; a redirect
pauses; the Test; one sender per queue; the token only in the header.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…s queued but by the Log action (FR-LOG-01)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…the new one (FR-LOG-04)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…a ADIF (mode/submode, band, Hz, power, seconds), first-try duplicate held (FR-LOG-01/02/04/08)

Ignored by default; run with K4_WAVELOG_URL/K4_WAVELOG_TOKEN against
tools/wavelog-test. Refuses any host but this computer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…ation is chosen; settings tabs wrap

Found on screen (demo, private D-Bus session):
- saving the token blocked the window for the D-Bus timeout when no keyring
  answered; store and removal now run on a thread like the password's, with
  a structural test keeping blocking calls out of log_ui.rs;
- the Test needed a full setup, station location included, but the Test is
  what lists the locations -- a fresh setup could never start; it now takes
  its own URL and token (the worker test starts without a setup);
- eleven settings tabs no longer fit the 900 px window and BACKUP was
  squeezed into a column of letters; the tab row wraps.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…ower before a call is typed; demo snapshot fills radio; docs: FR-LOG built (SRS 0.97, design v0.4 as built, ledger, CHANGELOG), FR-LOG-07 traced, waivers removed

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
Simon Keimer and others added 2 commits October 27, 2026 12:00
…tate (apply_radio_state), pinned by a test; provenance of the date-test literals

From the review of this round's lessons: filling the demo's radio by hand was a
second copy that could drift again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…oincidence explained, the --no-verify slip recorded

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
@dc0sk
dc0sk changed the base branch from feat/wavelog-logging to main October 27, 2026 14:59
@dc0sk dc0sk closed this Oct 27, 2026
@dc0sk dc0sk reopened this Oct 27, 2026
@dc0sk
dc0sk merged commit 905dd33 into main Oct 27, 2026
5 checks passed
@dc0sk
dc0sk deleted the feat/wavelog-core branch October 27, 2026 15:14
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