Overnight/test harness 2026 04 20#9
Merged
Conversation
- 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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.