Skip to content

feat(cloud-folder): sync mode with rclone (cloud-folder 1.1.0) - #83

Merged
nabil-becker merged 3 commits into
mainfrom
feature/cloud-folder-feature/2
Oct 27, 2026
Merged

nabil-becker merged 3 commits into
mainfrom
feature/cloud-folder-feature/2

Conversation

@nabil-becker

Copy link
Copy Markdown
Owner

What

Step 2 of the cloud-folder Feature (cloud-folder-feature): sync mode. rclone 1.75.2 pinned and checksum-verified; the Feature's own volume for the rclone config (mode 600) and sync state; cloud-folder:login, cloud-folder:sync (bisync), a timer started from postStartCommand, status for sync mode and a shutdown-check that refuses a stop while a sync runs or local changes are unsynced. host mode installs no rclone. Also corrects ADR 0031 and the proposal (bisync's default keeps both versions of a conflict; sharepoint is a choice inside rclone's onedrive backend), and the records since #82.

Why

Unprivileged sync is what works on a cluster that refuses FUSE and needs no Windows host. Step 3 (mount, auto, FUSE on request) follows.

Checklist

New Feature? Follow "Adding a Feature" in CONTRIBUTING.md first (CI matrices, test/_global, README row).

  • Every commit is signed off (Signed-off-by:, DCO) - automatic after task repo:setup
  • version bumped in src/<id>/devcontainer-feature.json (semver): 1.1.0
  • Downloads remain checksum-verified; nothing unverified is piped into a shell (pinned sha256 for 1.75.2, SHA256SUMS for other versions)
  • install.sh is idempotent and does not assume a remoteUser
  • Tests updated (test/<id>/test.sh, scenarios.json) and task test FEATURE=<id> passes: unit tests pass (83 + 136); the Docker scenarios (pinned_version, host_only, sync_local) have not run (no daemon in the devhost), CI is their first run
  • taskfile.yml present and registered via installTaskfile (new Features)
  • task lint passes: every step passes on tracked files; locally the PowerShell step also scans the git-ignored material.ignore/ (psscriptanalyzer-tracked-files)
  • NOTES.md updated if behaviour or options changed, and task docs run so src/<id>/README.md is current

By hand after the release: a real sign-in, a file each way, and a stop mid-sync.

🤖 Generated with Claude Code

devhost agent and others added 3 commits October 27, 2026 18:28
cloud-folder-feature, step 2 of the decided proposal (docs/proposals/cloud-folder.md, ADR 0031):

- rclone 1.75.2 pinned and checksum-verified (amd64, arm64); none in host mode.
- The Feature's own volume holds the rclone config (mode 600), bisync state,
  the timer's PID file and the last-sync record; RCLONE_CONFIG points into it.
- cloud-folder:login (rclone authorize pasted without echo; drive found from
  the site URL; client credentials unverified), cloud-folder:sync (bisync,
  automatic --resync, --max-lock, --resilient --recover, the delete guard,
  conflicts keep both versions), start/stop of one timer loop from
  postStartCommand, status for sync mode, shutdown-check.
- Unit tests with a fake rclone (no token in argv, logs or output); Docker
  scenarios pinned_version, host_only and sync_local.
- ADR 0031 and the proposal corrected: bisync's default keeps both versions,
  and sharepoint is a choice inside the onedrive backend.
- Records since #82.

Co-Authored-By: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
cloud-folder-feature: in sync mode the post-start report handed mountPoint to the
remote user only once a remote was configured, so a container signed in after the
start reported "unwritable" instead of "never synced" (CI, sync_local). The build
now hands the folder to _REMOTE_USER, and every start hands it over whether or not
a remote exists; the scenario checks the folder belongs to the user before sign-in.

Co-Authored-By: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
cloud-folder-feature: the sync_local scenario's "one loop" check counted with
pgrep -f, which also matched the check's own bash -c line and the loop's forked
subshells, so it failed with one loop running (CI on #83). It now counts processes
whose arguments end in "cloud-folder-setup run" and whose parent is not one, and
checks that one is the PID file's; "no loop left" is anchored the same way.

Co-Authored-By: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
@nabil-becker
nabil-becker merged commit 98f67b4 into main Oct 27, 2026
73 checks passed
@nabil-becker
nabil-becker deleted the feature/cloud-folder-feature/2 branch October 27, 2026 19:08
nabil-becker added a commit that referenced this pull request Oct 27, 2026
… (agents 1.0.0, claude-code 1.7.0, devcontainer-cli 1.13.0) (#84)

## What

The agent model (`agent-kind-standard`, `docs/proposals/agents.md`,
decided 2026-10-27): a new `agents` Feature 1.0.0 that reads a
per-repository agent list (`AGENTS_FILE`, default
`.devcontainer/agents.yml`) and gives one verb, `task agents -- <name>`
(`--resume`, `--new`; `agents:up`, `agents:list`, `agents:stop`,
`agents:logs`, `agents:check`). Two kinds: `resident` (runs in the
background, start attaches) and `on-demand` (start opens a new session).
Each CLI ships an adapter; claude-code 1.7.0 ships
`agent-adapter-claude` (find by name and folder, act by id, never `-c`)
and deprecates `claude-host`, `claude-fleet` and `claude-host-pin` ahead
of 2.0. devcontainer-cli 1.13.0 adds `devcontainer:agent` and
`devcontainer:agent:list`; `devcontainer:claude` and the fleet keep
working, deprecated. This repository gets `.devcontainer/agents.yml`
(host on-demand with `--remote-control`) and the Feature in its devhost.
Migration for consumers: `docs/migrations/agents.md`. Also the records
since #83.

## Why

Session pins, the pin hook, claude-host's refusals and join wrappers (a
consumer's `join.sh`) were scripting around a missing concept: the
agent. One list and two kinds make starting any agent the same whatever
its CLI, and replace the requested `CLAUDE_HOST_JOIN`.

## Checklist

New Feature? Follow "Adding a Feature" in
[CONTRIBUTING.md](../CONTRIBUTING.md#adding-a-feature) first (CI
matrices, `test/_global`, README row).

- [x] Every commit is signed off (`Signed-off-by:`, DCO) - automatic
after `task repo:setup`
- [x] `version` bumped in `src/<id>/devcontainer-feature.json` (semver):
agents 1.0.0, claude-code 1.7.0, devcontainer-cli 1.13.0
- [x] Downloads remain checksum-verified; nothing unverified is piped
into a shell (no downloads added)
- [x] `install.sh` is idempotent and does not assume a `remoteUser`
- [ ] Tests updated (`test/<id>/test.sh`, `scenarios.json`) and `task
test FEATURE=<id>` passes: unit tests pass (agents 116, adapter 35,
live-session 181, agent task 13, cloud-folder 83 + 136); the Docker
scenarios have not run (no daemon in the devhost), CI is their first run
- [x] `taskfile.yml` present and registered via `installTaskfile` (new
Features)
- [x] `task lint` passes (in a clean worktree)
- [x] `NOTES.md` updated if behaviour or options changed, and `task
docs` run so `src/<id>/README.md` is current

Still for the Operator on the workstation: whether Remote Control
reaches a background session (the host becomes `resident` then) and what
comes back after a rebuild.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
Co-authored-by: devhost agent <devhost-agent@noreply.invalid>
Co-authored-by: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
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