Skip to content

feat!: drop the default wiki; a working tree remembers its own - #32

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/generic-wiki
Nov 11, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/generic-wiki

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

wikisync no longer assumes Appropedia. The first pull into an empty folder
needs --host (and --path if api.php isn't under /w/). After that, pull
and push in the folder use the wiki recorded in .wikisync/manifest.json, and
refuse a different --host or --path.

Behaviour

Case Result
First pull, no --host --host is required for a working tree with no pages yet, exit 2
Later pull, push or refresh in the same folder uses the recorded wiki; no flags needed
A different --host or --path there this working tree tracks pages from …; use a separate --dir, exit 2
Bare pull in an empty folder still "nothing to pull", exit 2
push in an empty folder still "no local changes to push", exit 0
Tree pulled by 0.2.1 keeps working without --host (it already records its wiki)

Trees from before this change could mix wikis. In that case --host picks one.

Also

  • Help text, code comments, README and docs use wiki.example.org. The README
    keeps one factual line: tested against MediaWiki 1.45 in CI, and used against
    Appropedia.
  • just test-live needs WIKISYNC_TEST_HOST. A required run without it fails
    rather than skips. The Docker run is unaffected: it passes
    WIKISYNC_TEST_API_URL.
  • CHANGELOG has an Unreleased "Changed" entry with the one-line migration. The
    version bump to 0.3.0 follows in its own PR.

Verification

  • core.ResolveWiki tests cover: an empty tree, the recorded wiki, refusing
    another host or path, and a mixed tree. CLI tests cover the exit codes, and
    that pull and push connect to the tree's wiki. All CLI tests use a local
    fake server through a newClient seam, so none reach the network.
  • Breaking each rule separately (7 mutations: no-host check, mismatch check,
    recorded path, mixed tree, exit code, push and pull ignoring the tree's wiki)
    fails its target test.
  • Run end to end, read-only, against Appropedia with the built binary. A first
    pull without --host was refused (2). With --host it pulled. A second
    pull, a full refresh and a push preview then worked without --host. Another
    --host was refused (2). A tree pulled earlier with 0.2.1 previewed a push
    with no --host.

wikisync assumed Appropedia when --host was left out. The first pull
into an empty folder now needs --host (and --path if api.php isn't
under /w/). After that, pull and push in the folder use the host and
path already recorded in .wikisync/manifest.json, and refuse a
different --host or --path, so a tree only ever talks to one wiki.

Trees pulled by earlier versions already record their wiki and keep
working without --host. A bare pull in an empty folder still reports
nothing to pull, and a push there still reports nothing to push.

Help text, docs and examples use wiki.example.org. The live
integration test needs WIKISYNC_TEST_HOST instead of defaulting to
Appropedia.

BREAKING CHANGE: `wikisync pull "Page"` into a new folder needs
`--host www.appropedia.org` to reach Appropedia.
@CameronBrooks11
CameronBrooks11 merged commit 71bf744 into main Nov 11, 2026
8 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/generic-wiki branch November 11, 2026 01:53
CameronBrooks11 added a commit that referenced this pull request Nov 11, 2026
Prepares v0.3.0: the version constant becomes 0.3.0 so --version matches
the tag, and the CHANGELOG's Unreleased section becomes 0.3.0. Changes
since v0.2.1: #32 (no default wiki; a working tree remembers its own)
and #25 (docs and the Pages site). The tag is pushed after this merges.
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