Syncing wekan/wekan cloned the whole GitHub repository - 365,000 objects,
500 MB - into .tools/wekan-github, although it is this checkout
(~/repos/wekan on Linux, ~/Documents/repos/wekan on macOS,
Downloads\repos\wekan on Windows). Only the destination mirrors
(wekan-gitlab, wekan-codeberg ...) need checkouts of their own.
The source's branches and tags are fetched into this checkout instead,
under the private namespace refs/mirror-source/<source>/, which already
holds nearly every object: 1.7 seconds for 1,278 refs, measured. That
namespace is not a branch; the working tree and local main are untouched,
so unpushed local commits never reach a mirror. The fetched refs are
deleted again in a finally, after the push and also when the fetch, the
push or the merge-preserving retry fails.
tests/activeForgeMirror.test.cjs and tests/mirrorGitDirectories.test.cjs
run syncGit against a stand-in checkout (WEKAN_MIRROR_SOURCE_CHECKOUT for
the CLI), assert that GitHub's wekan is not cloned, that only the
destination is, and that the source refs are cleared - also after a failed
fetch.
Thanks to xet7 !
Alert 564 (regex injection): releases/platform-native-packages.mjs compiled
its command-line platform and arch into a RegExp. The canvas package names
are now compared as strings. The upload naming of attachments and avatars,
the attachment rename popup and tools/mirror-menu.mjs built a RegExp from a
file extension or a name the same way; they use literal suffix and prefix
checks now. tests/noUnescapedDynamicRegExp.test.cjs parses every source file
and fails on a RegExp built from a value that is not escaped, unless the
site is listed with the reason its values are constants.
Alert 563 (incomplete escaping): name.replace('/', '%2F') replaced only the
first slash. registryPackagePath() replaces every one and refuses anything
that is not an npm package name. Seven tests escaped a regex the same
first-only way; 'g++'.replace('+', '\\+') let "- g+" pass a guard. They use
the complete escapeRegExp, and tests/noIncompleteRegExpEscaping.test.cjs
fails on any string-pattern replace that performs an escape.
Alert 562 (ReDoS): the CasaOS reverse-domain id pattern in
tests/platformTemplates.test.cjs let '.' be matched by both groups, so
'0.0.0...!' backtracked exponentially. Each separator now belongs to one
group, and the test runs CodeQL's attack string against it.
Thanks to GitHub CodeQL and xet7 !
The CLI test expected the fresh-clone path, but the mirror tool looked for
an existing checkout under the real .tools directory, so the test failed
on any machine that had .tools/wekan-gitlab. WEKAN_MIRROR_TOOLS_DIR now
relocates the checkouts and the test points it at its own temporary
directory.
Thanks to xet7 !
Honor the commented Codeberg registry entry even with stale saved settings. Create missing WeKan source and destination clones under the checkout-relative .tools directory, keeping fetched mirror refs out of the primary checkout. Cover fresh clones, paths with spaces, saved settings, failure handling and existing checkout protections with injected commands.
Thanks to xet7 !
Bound attachment requests and defer long rate-limit cooldowns while preserving rate-limit state. Recover missing public links from the closest historical capture, retain provenance, and skip optional failures so remaining content synchronization continues.
Synchronize Git to all active destinations before collecting source content. Reuse the local archive for concurrent destination processes, show combined per-mirror issue and release counters, and retain separate mirror-named logs. Stop content writes after archive failure and preserve restart checkpoints.
Use the shared log-directory reservation for organization reports and update remaining path examples. Verify report paths with offline organization fixtures.
Thanks to xet7 !
Use operation/YYYY-MM-DD_HH-MM-SS for Unix and Windows build logs, mirror launcher and data reports, translation push reports, conformance and speed diagnostics. Preserve earlier same-second runs with reserved suffixes. Keep record timestamps in their existing data format.
Path and collision fixtures, build progress and parity, mirror launcher and Transifex suites pass. Shell syntax checks pass; Windows execution was not available. Update the internal release preflight inventory used by parity checks.
Thanks to xet7 !
Fetch missing parent issues and pull metadata through the existing rate-limited API client. Preserve page checkpoints on failure and retry missing pull metadata after interruption. Report logs after menu sync/check operations and command exit while retaining exit status. Offline collector, menu and shell launcher regressions pass.
Thanks to xet7.
Review saved scanning alerts 537 and 539. Make exact archive-host validation explicit, restrict executable dispatch and run Windows targets through the existing Node engine without cmd.exe command strings. Preserve preview flags and all archive/resume behavior. Twenty-five focused mirror test entries pass; native Windows and remote CodeQL rescanning remain unverified.
Thanks to xet7.
Add organization management and per-destination namespaces to the shared Unix and Windows mirror menu. Discover all accessible repositories, create missing mirrors, retain PR conversations when issues are disabled, and copy enabled wiki history and portable Projects V2 data.
Archive linked media, files and webpage HTML per comment under host/organization/repository directories. Preserve old versions, generate static HTML and CSV catalogues, and support offline rebuilding from CSV. Attach archived files to corresponding destination comments where supported.
Honor GitHub and destination rate-limit headers, persistent cooldowns and bounded retries. Public GitHub REST reads fall back without a token. Add offline regressions and a static browser test; 1,014 Node suites pass, with final targeted checks passing. Chromium and Firefox static checks pass; local WebKit requires unavailable ICU 74.
Thanks to xet7.
Preserve the existing launcher retry behavior: failed source inventory stops synchronization, but a local archive failure records an overall failure and still attempts supported data on every selected destination. Extend the injected-command regression to verify all targets run without live remote writes.
Thanks to xet7 !
Resolve relative GitLab, Codeberg and SourceForge attachment paths against the original forge in destination text and persistent archive discovery. Recognize current GitLab project upload URLs, preserve original JSON metadata and exclude arbitrary websites from downloads. Offline link and archive regressions pass.
Thanks to xet7 !
Default to GitHub as source and GitLab, Codeberg and SourceForge as mirrors. Share the six-action menu across Unix and Windows, save source and active destinations in .tools/mirror/settings.txt, and delegate synchronization to individual forge launchers. Support native source inventories and GitHub destinations, preserve original provenance and isolate source archives. Compare Git ancestry and inventory missing metadata without remote writes in check mode. Verify menu interaction, adapters, retries, settings validation and archive isolation with offline fixtures.
Thanks to xet7 !
Keep complete source files under .tools/mirror/issues/<number>, pulls/<number> and releases/<version>. Persist metadata, comments, reviews, patches, GitHub-hosted attachments, binaries and source archives. Rename removed or changed versions with old-YYYY-MM-DD_HH-MM-SS prefixes; preserve existing copies on download failures and retry on later runs.
Archive once before per-target synchronization, reuse verified release files and guard concurrent archive writers. Preserve destination main commits through the existing merge fallback without force or ref deletion. Exclude disabled GitHub Discussions, projects and wiki. Document the design and verify retention, retries, API pagination and launcher behavior with offline fixtures.
Thanks to xet7 !
Repair Tools menu dispatch and run separate GitLab, Codeberg and SourceForge launchers through a shared engine on Unix and Windows. Read one paginated GitHub snapshot for all mirrors, match issue/comment provenance and release tags, and retry missing conversations and binary assets after partial runs. Preserve destination text and copy Git branches/tags without force or deletions. SourceForge uses Tracker tickets and SFTP release files; projects and wiki are excluded. Add offline API, retry, pagination, multipart upload and launcher regressions plus setup/scope documentation.
Install Git, SSH/SCP/SFTP, curl, jq, Node and Go prerequisites with native Debian/Ubuntu, Fedora, Brew and Windows package mappings. Use native Go builds for missing forge CLIs, verified current Go archive bootstrap for older Unix toolchains, repository-local binaries and refreshed PATH. Report remaining missing tools and failure status without stopping later attempts. Add SourceForge to the Windows mirror targets. Offline Unix, PowerShell, architecture, checksum and menu regressions pass; no remote mirroring, uploads or publishing ran.
Thanks to xet7 !
Renames rebuild-wekan.sh -> build.sh, rebuild-wekan.bat -> build.bat, and the
guard test tests/rebuildWekanDevServer.test.cjs -> tests/buildDevServer.test.cjs,
and updates every reference across the repo: the docs (Build-from-source, Windows,
Sandstorm, Raspberry Pi, virtual-appliance, Debugging, Developer-Documentation,
FerretDB, OpLog, Rclone, Emoji, Multiverse roadmap, Security remediation, Tests),
README.md, CONTRIBUTING.md, CLAUDE.md, package.json (test:unit:node), the release
scripts (release-all.sh, fix-changelog-hashes.sh, node-update.sh), the disabled
playwright workflow, playwright.config.js, the REST spec comment, tools/forge-mirror.js,
and the CHANGELOG. The menu and every option are unchanged; only the filename and
its references. The website has no references.
Thanks to xet7 !
Add two menu options to rebuild-wekan.sh and rebuild-wekan.bat:
1. Install forge CLI tools — gh, glab, tea, git-bug, and the unified
git-pkgs/forge, via the detected package manager or `go install`.
2. Mirror a repo from GitHub to GitLab/Codeberg/Forgejo/Gitea — pick source
and target by number (e.g. "1 3" = GitHub -> Codeberg). Code (all
branches/tags) is pushed with `git push --mirror`; issues, PRs and CI
workflow syntax are handled by a new cross-platform Node engine,
tools/forge-mirror.js, which:
* creates only the issues/PRs MISSING at the target (drives the
authenticated gh/glab/tea CLIs, de-dups by title, dry-run by default);
* converts GitHub Actions YAML for the target — an annotated
.forgejo/workflows/ copy flagging Forgejo/Gitea incompatibilities
(hashFiles, permissions, continue-on-error, complex runs-on), or a
.gitlab-ci.yml scaffold + guide pointing at GitLab's official converter.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>