Skip to content

Overnight/test harness 2026 04 20#9

Merged
claudenstein merged 4 commits into
mainfrom
overnight/test-harness-2026-04-20
May 2, 2026
Merged

Overnight/test harness 2026 04 20#9
claudenstein merged 4 commits into
mainfrom
overnight/test-harness-2026-04-20

Conversation

@claudenstein

Copy link
Copy Markdown
Owner

No description provided.

Frank Dosk and others added 4 commits April 28, 2026 22:19
- create: defensively re-derive the .torrent output path from the
  root on submit so the dialog never errors out with "Output path
  required" when autofill missed a fast paste / focus quirk.
- downloads: ellipsis-truncate cell labels so long Name values
  stop at the column edge; multi-select via toggle-on-click with
  Select All / Clear toolbar buttons; bulk Pause/Resume/Remove/
  Toggle Index across the selection set; right-click menu pluralises
  every action label by selection count.
- search: wrap each hit card (local/swarm/dht) in a right-click
  menu — Add to downloads, Copy magnet, Copy infohash, Confirm,
  Flag, Copy publisher pubkey when signed.
- companion: full 64-char publisher pubkey rendered selectable +
  monospace + wrap-on-break with an inline Copy button; right-click
  menu on the followed-publishers list.
- companion publisher: tag the on-wire JSON file with the publisher's
  pubkey prefix so each node's index is distinguishable in the
  Downloads list (subscribers locate the payload by path, not
  filename, so this is end-to-end transparent).
- settings: editable Data / Index directories with Browse + Save +
  Reset; persists to <share-root>/config.json which the GUI reads
  on next launch (CLI flags still win).
- engine: fix two bugs that combined to wipe restart progress —
  AddTorrentMetaInfo never called persistAdd (so create-torrent and
  companion-seeded torrents disappeared on restart), and
  RestoreSession never ran VerifyData (so anacrolix never noticed
  on-disk pieces). New verifyOnRestore goroutine kicks a rehash
  for every restored handle. Regression test:
  TestRestoreSessionRehashesOnDiskData.
- about: show a Built row populated from a new main.BuildDate
  ldflag stamped by scripts/build-gui.sh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A freshly-created torrent always rendered at 0% because anacrolix's
default storage roots every torrent at cfg.DataDir. The user picks
a Root somewhere on their disk (~/Documents/...), so when the post-
add VerifyData ran it looked for cfg.DataDir/<info.Name> — which
doesn't exist — and reported zero bytes complete even though the
source bytes were sitting on disk.

New AddTorrentMetaInfoSeedFrom(mi, dataParent) installs a per-
torrent storage.NewFile(dataParent) via TorrentSpec, so anacrolix
locates the file at dataParent/<info.Name>. The GUI's
runCreateTorrent passes filepath.Dir(opts.Root) on the create-
and-seed path. The value is persisted as sessionEntry.DataPath
and reapplied on RestoreSession so a restart doesn't bounce the
row back to 0% by re-adding without the override.

Regression tests:
- TestAddTorrentMetaInfoSeedFromExternalPath  — verifies VerifyData
  reaches 0 missing bytes when source lives outside DataDir.
- TestAddTorrentMetaInfoSeedFromSurvivesRestart — locks in that
  DataPath persists and is reapplied across engine restart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
go-run / IDE launches and the dist/swartznet-gui-dev-linux-amd64
build (which the user runs locally) were still printing
"0.0.1-dev" everywhere. The default tracks the latest released
tag now so unstamped builds carry a meaningful version string;
bump this in the same commit that cuts a release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rors

Audit follow-ups from the production-architecture-rules review.

- Manifest.RemoveHit now drops empty keyword entries; new
  RemoveAllHits(infohash) scrubs every entry that mentions a
  given infohash. Engine.RemoveTorrent calls a new
  Publisher.Retract so a removed torrent's keyword hits stop
  being re-announced on every refresh tick.
- LoadFollowFile returns (int, error). The daemon logs parse /
  open failures via slog so they're visible when stderr is
  io.Discard; behaviour stays fail-closed (empty follow list).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claudenstein
claudenstein merged commit 868c56b into main May 2, 2026
1 check failed
claudenstein pushed a commit that referenced this pull request Jul 19, 2026
Closes the round-4 adversarial backlog; each fix has a regression test that
fails when the fix is neutralized. All touched packages race-clean.

- #10 companion: put the new BEP-46 pointer BEFORE dropping the old seed, so a
  failed put keeps the still-advertised infohash fetchable.
- #7 dhtindex: TOCTOU between off-lock aggregate Refresh and a concurrent
  Retract — added a gen counter + post-distribute re-check so a retracted tree
  isn't left published for a full refresh interval.
- #9 indexer/httpapi/daemon: a malformed query string is now a typed
  ErrBadQuery → HTTP 400 (client fault), not 500; classified at the daemon
  seam via a LocalBadRequest flag (httpapi imports no indexer types).
- #5 companion: publisher GeneratedAt is now strictly monotonic across content
  changes, so a backward wall-clock step no longer trips the follower's replay
  guard and drops legitimate new content.
- #11 companion: an Unfollow racing an in-flight Sync no longer resurrects the
  dedup maps — per-publisher Forget epoch, re-checked under lock in commitDedup.
- #4 engine: persistAdd runs after Add releases e.mu; a racing RemoveTorrent
  could be resurrected — updateGuarded(abort) + Handle.isRemoved() make the
  create happens-before-correct (RemoveTorrent closes h.removed before its
  lock-guarded remove); persistSeedAdd DataPath refinement → updateExisting.
- #8 swarmsearch: initiator/responder txid collision deferred with a fix sketch
  (needs a wire direction bit + the unwired StartSync path) — see DECISIONS T3-8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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