Add PLAN.md, for work to do, and TEST.md, for tests to run
PLAN.md has what the smoketest runs left open; TEST.md says which scenarios to run when, and what to test by hand on a Mac. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3282857a9f
commit
7ea0ce77bb
@@ -0,0 +1,27 @@
|
|||||||
|
# Plan
|
||||||
|
|
||||||
|
Work to do, roughly in order. Tests to run are in [TEST.md](TEST.md).
|
||||||
|
|
||||||
|
## Backups without Full Disk Access
|
||||||
|
|
||||||
|
Without Full Disk Access, reading some folders makes macOS ask, and restic waits for the answer, which no one gives at night. `system/backup` leaves out the ones the smoketest found: Desktop, Documents, Downloads, `~/Library/Containers`, `~/Library/Group Containers`, `~/Library/Photos` and Photos libraries in `~/Pictures`.
|
||||||
|
|
||||||
|
- [ ] Find the rest on a Mac that's in use. The smoketest VM has no `~/Library/Calendars` or `~/Library/Reminders`, so whether they ask is unknown. Run a backup without Full Disk Access on a Mac with Calendar, Reminders, Contacts and Photos data, and check tccd's log for `AUTHREQ_PROMPTING` from `computer.federated.connector.backup` (see TEST.md).
|
||||||
|
- [ ] Notice a stuck backup. A restic stuck on a prompt ignores TERM, and only KILL stops it. Today a new prompt would hang the backup until someone answers it, with no notification. Consider a time limit, or a notification when a backup has run for hours.
|
||||||
|
|
||||||
|
## SFTP folders
|
||||||
|
|
||||||
|
- [ ] Check on a Mac with macOS 26 whether `pluginkit -m -A -D -p com.apple.fskit.fsmodule` lists macFUSE's module once macFUSE is installed. In the VM it doesn't, even after `pluginkit -a` and `lsregister`. If it doesn't on a Mac either, `fskit_enabled` can never tell. Then `add_sftp` never shows how to turn the extension on. Instead it mounts, waits 30 seconds and only then hints at it. If so, treat "can't tell" as off and show the instructions first, or find another way to tell.
|
||||||
|
|
||||||
|
## Smoketest coverage
|
||||||
|
|
||||||
|
- [ ] Make a VM image that allows apps from identified developers. Without it, `70-apps` skips installing Element, Nextcloud and Tailscale, because the vanilla image allows only App Store apps and only a click can change that. The README says how. The same image could also have macFUSE installed with its extension turned on, so `85-sftp` could test mounting.
|
||||||
|
- [ ] Look out for more timing races like the one in `30-core-local`, where an app opened again while it was still quitting failed with -600. It failed once in three runs.
|
||||||
|
|
||||||
|
## Tidying
|
||||||
|
|
||||||
|
- [ ] `xml_escape` is copied into `configure.d/lib/profile.sh`, `configure.d/20-backup.sh` and `configure.d/60-storage.sh`. Have the two items source `lib/profile.sh` (or move it to a shared lib), so a fix lands once. Bash 3.2 kept the backslash in `${s//&/\&}` in all three.
|
||||||
|
|
||||||
|
## Open questions
|
||||||
|
|
||||||
|
- The first smoketest run on a Mac couldn't ssh to its first three VMs ("No route to host"), then could. That fits macOS asking for Local Network access for the terminal app, but it wasn't confirmed. If it happens again, `smoketest/run` now shows ssh's error and points to System Settings > Privacy & Security > Local Network.
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# Tests
|
||||||
|
|
||||||
|
What to run, and when. Work still to do is in [PLAN.md](PLAN.md).
|
||||||
|
|
||||||
|
## The smoketest
|
||||||
|
|
||||||
|
`smoketest/run` runs each scenario in a fresh macOS VM with Tart. How it works, and each scenario, are in [smoketest/README.md](smoketest/README.md). It tests the working copy, including uncommitted changes, except `05-install`, which also installs what's on Gitea.
|
||||||
|
|
||||||
|
| When | Run |
|
||||||
|
|------|-----|
|
||||||
|
| After changing a file | the scenarios that use it: `smoketest/run 60` or `smoketest/run 50 60` |
|
||||||
|
| Before pushing | `smoketest/run` (the quick tier: everything but `70-apps`) |
|
||||||
|
| After pushing | `smoketest/run 05`, which installs the published version |
|
||||||
|
| Before telling people to update | `smoketest/run --tier all`, which takes about an hour |
|
||||||
|
|
||||||
|
| Changed | Scenarios |
|
||||||
|
|---------|-----------|
|
||||||
|
| any script (bash 3.2, tools macOS lacks) | `00` |
|
||||||
|
| `install.sh`, `update` | `05` |
|
||||||
|
| `configure`, `configure.d/lib/` | `10`, and the scenarios of the items that use the lib |
|
||||||
|
| `configure.d/lib/json.sh`, `keychain.sh` | `20` |
|
||||||
|
| `configure.d/10-core.sh`, `lib/profile.sh` | `30` |
|
||||||
|
| `configure.d/lib/mdns.sh` | `40` |
|
||||||
|
| `sandbox/`, `configure.d/30-agents.sh`, `50-ai-servers.sh`, `lib/agents.sh` | `50` |
|
||||||
|
| `configure.d/20-backup.sh`, `system/backup*` | `60` |
|
||||||
|
| `configure.d/lib/apps.sh` | `70` (with `--tier all`), `85` |
|
||||||
|
| `configure.d/60-storage.sh`, `lib/smb.sh`, `system/storage-mount` | `80`, `85` |
|
||||||
|
| `configure.d/lib/sftp.sh` | `85` |
|
||||||
|
|
||||||
|
### Expected skips
|
||||||
|
|
||||||
|
These are `skip` lines, not failures. Each needs a click in System Settings:
|
||||||
|
|
||||||
|
- `30`: installing the profile
|
||||||
|
- `60`: Full Disk Access for Federated Backup
|
||||||
|
- `70`: installing Element, Nextcloud and Tailscale, as the vanilla image allows only App Store apps
|
||||||
|
- `80`: mounting a real SMB share
|
||||||
|
- `85`: turning on macFUSE's extension, and so mounting over SFTP
|
||||||
|
|
||||||
|
### When it goes wrong
|
||||||
|
|
||||||
|
- **"Couldn't ssh to the VM ... No route to host":** your terminal app may not be allowed on the local network: System Settings > Privacy & Security > Local Network.
|
||||||
|
- **A scenario stops making progress:** run it again with `--keep`, ssh in (the run prints how) and look at what's running: `ps -axo pid,etime,command`. Two causes so far:
|
||||||
|
- A command waiting on a macOS privacy prompt that no one answers. Look for `AUTHREQ_PROMPTING` in tccd's log: `sudo log show --last 10m --predicate 'process == "tccd"' | grep AUTHREQ_PROMPTING`
|
||||||
|
- A command that never ends and ignores TERM, like `sshfs` with macFUSE's extension off.
|
||||||
|
- **Leftover VMs**, from a run that was stopped: `tart list`, then `tart stop` and `tart delete` each `connector-smoke-...` one. Each takes about 27 GB.
|
||||||
|
|
||||||
|
## By hand, on a Mac
|
||||||
|
|
||||||
|
macOS allows these only with a click, so test them on a Mac, or on a VM kept with `--keep`. Start from `configure` unless it says otherwise.
|
||||||
|
|
||||||
|
### Core
|
||||||
|
|
||||||
|
- [ ] `configure core`, then in System Settings > Profiles choose "Federated Core (...)" and Install. Mail, Calendar and Contacts work against a real Core. `configure core` then says the profile is installed.
|
||||||
|
- [ ] A Core password with `&`, `<`, `>`, `"` or `'` in it reaches Mail unchanged.
|
||||||
|
- [ ] Superpanel opens from Applications, with the Core's icon.
|
||||||
|
- [ ] Nextcloud's sign-in in the browser, then `configure core` notices the account.
|
||||||
|
|
||||||
|
### Backup
|
||||||
|
|
||||||
|
- [ ] Give Federated Backup Full Disk Access. `configure backup` says it can read all your files, and the next backup (`restic snapshots`, then `restic ls latest`) includes Desktop, Documents and Downloads.
|
||||||
|
- [ ] Without Full Disk Access, on a Mac with Photos, Calendar, Reminders and Contacts data: a backup finishes with no prompt, and there's a notification about Full Disk Access. If it stalls, find the folder with tccd's log as above, and add it to PLAN.md.
|
||||||
|
- [ ] Restore a file, as in README.md's "Restoring from a backup".
|
||||||
|
|
||||||
|
### Storage
|
||||||
|
|
||||||
|
- [ ] Mount a real SMB share: the sign-in window, "Remember this password in my keychain", and whether a server without a share offers a list of shares. It mounts again after logging out and in.
|
||||||
|
- [ ] Turn on macFUSE's extension (System Settings > General > Login Items & Extensions > File System Extensions) and mount an SFTP folder with `configure storage`. It comes back after sleep.
|
||||||
|
- [ ] With the extension off, `configure storage` gives up on an SFTP folder within about 30 seconds and says to turn macFUSE on.
|
||||||
|
- [ ] Note whether `pluginkit -m -A -D -p com.apple.fskit.fsmodule` lists macFUSE (see PLAN.md).
|
||||||
|
|
||||||
|
### Apps
|
||||||
|
|
||||||
|
- [ ] With "App Store & Known Developers" allowed, `configure` installs Element, Nextcloud and Tailscale.
|
||||||
|
- [ ] With only "App Store" allowed, it refuses and says this Mac only allows apps from the App Store, not that the app isn't notarized.
|
||||||
|
- [ ] Tailscale's VPN approval.
|
||||||
|
|
||||||
|
### Sandboxed agents
|
||||||
|
|
||||||
|
- [ ] A sandboxed agent (e.g. `opencode`, run in a project folder) can run `mktemp` and `mktemp -d`, write in its project, and reach allowed sites. It can't read `~/.ssh` or the keychains, or write elsewhere in your home folder.
|
||||||
|
- [ ] `configure ai-servers` allows a server on the network, and the agent reaches it. Before that, it can't.
|
||||||
Reference in New Issue
Block a user