Files
seal-use/wsl-infra
gitea d9328cc97f Rename ops/ to wsl-infra/ and drop the in-repo enterprise config dir
- ops/ never said what it holds; wsl-infra/ carries the systemd release-sync and backup scripts that run on the WSL host
- remove enterprises/: the loader only reads ~/.config/seal-use/enterprises, so the in-repo dir (examples + local copies) was dead config; AGENTS/README/SECURITY no longer reference it, the .gitignore whitelist is gone, and doctor's local.json comment points at the global dir
- docs update: SECURITY custom-linter scope narrowed to the global dir; rule-lint.md documents the manifest-driven plaintext exposure
2026-09-30 17:05:50 +08:00
..

Seal Use Infrastructure Operations

Release promotion

GitHub Actions is responsible only for building and publishing the GitHub Release. On WSL, seal-use-release-sync.timer polls the latest release every 15 minutes and promotes it in this order:

  1. seal-use-darwin-arm64.tar.gz
  2. checksums.txt
  3. the remaining archives
  4. raw platform binaries

The Homebrew tap is updated immediately after the first two assets are present in Gitea and the macOS arm64 checksum is available. The remaining assets are idempotent retries and do not make a valid Homebrew installation unavailable.

The WSL worker uses its local mihomo listener at http://127.0.0.1:7897 only for GitHub. It does not enable TUN or expose a LAN listener. Local Gitea traffic stays direct through 127.0.0.1:3001.

The WSL mihomo service is defined by systemd/mihomo.service. Its runtime config is a private copy of the selected mac15 Clash profile at /home/dev/.config/mihomo/config.yaml; the profile is not committed. The WSL copy retains internal DNS settings but removes DNS listeners, so mihomo only opens its loopback proxy port.

Useful WSL commands:

systemctl status seal-use-release-sync.timer
systemctl start seal-use-release-sync.service
journalctl -u seal-use-release-sync.service -n 100 --no-pager
systemctl status mihomo.service

Credentials are stored as 0600 files under ~/.config/seal-use/; they must never be committed or printed.

Cross-host health check

From mac15, run:

./ops/infra-healthcheck.sh

It emits JSON checks for mac15, the Mac15-to-WSL Tailscale/SSH path, WSL, Windows, mac13, and Aliyun, including the release-sync timer state and the last successful Gitea/Homebrew promotion. The script is read-only; a failed check does not restart or mutate any service.

Workspace backups

The repository is the source of truth. After the ops changes are committed to main, back up the tracked ops/ directory to each machine's global workspace:

./ops/backup-workspace-scripts.sh

Each run creates a commit-named snapshot under ~/Workspace/ops-backups/seal-use/ on mac15 and mac13, and under ~/workspace/ops-backups/seal-use/ on WSL and Aliyun. Each snapshot includes a manifest with its source commit and backup time. Only tracked ops/ files are copied; private runtime configuration and credentials are excluded. Run the backup command again after changing operational scripts or service templates.