You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added configurable device upload directory with scoped full wipe
8
+
9
+
## Background / Issue
10
+
Users needed to deploy files into a specific directory on the target MicroPython device instead of always syncing to the device root. The existing full-sync wipe behavior also cleared the whole filesystem root, which was too broad once per-project upload directories are introduced.
11
+
12
+
## Actions / Outcome
13
+
- Approach 1: Added `device_upload_dir` to config defaults, parser, saver, and interactive wizard -> users can persist upload target directory via `init/config` without manual TOML edits.
14
+
- Approach 2: Extended planner to accept `remote_base_dir` and prefix upload/delete remote paths while setting full-mode wipe target to that directory -> deployment operations are now scoped to configured destination.
15
+
- Approach 3: Extended backend and executor to pass wipe target directory through to `mpremote` cleanup script, including path normalization and `/flash` compatibility handling -> full-mode cleanup no longer requires wiping device root when a target directory is configured.
16
+
- Approach 4: Updated README and expanded regression tests across config/cli/planner/executor/backend/docs checks -> behavior is documented and protected by automated coverage.
17
+
- Final approach: Combined config + planning + execution + docs + tests in one change set -> enabled directory-scoped uploads and safer full-sync semantics.
18
+
19
+
## Lessons / Refinements
20
+
- Scope-sensitive deployment behavior should be modeled in plan objects first, then propagated into execution to keep logic auditable and testable.
21
+
- For embedded targets, destructive operations must default to least-surprise scope (target directory) when user intent is explicit.
22
+
23
+
## Related Commit Message
24
+
feat(sync): support configurable device upload directory
0 commit comments