8f21873d45
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2.7 KiB
2.7 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-profile-opt-in | Per-profile reclamation opt-in | done | 1 | plan.md | ../../specs/executors/requirements/remote-task-directory-reclamation.md |
|
../../specs/executors/system-design/remote-task-directory-reclamation.md |
Task 02: Per-profile reclamation opt-in
Summary
Add the ssh_reclaim_task_dir executor-profile setting and plumb it into launch
metadata as an authoritative key, so the profile is the only thing that can
enable reclamation and the default everywhere is disabled.
Scope
MetadataKeySSHReclaimTaskDir = "ssh_reclaim_task_dir"inexecutor_backend.go.- Entry in
persistentMetadataKeysso the value reachesExecutorRunning.Metadataand survives a backend restart. - Entry in
profileConfigAuthoritativeKeysinorchestrator/executor/executor_state.go— notprofileConfigPassthroughKeys. - A reader helper treating only the exact string
"true"as enabled.
Exclusions
- No settings UI (task 04).
- No consumption of the flag (task 03).
Implementation acceptance conditions
- A profile with no
ssh_reclaim_task_dirkey, an empty value, or any value other than"true"resolves to disabled. - A task supplying
ssh_reclaim_task_dir: "true"in its own metadata while the profile has no value resolves to disabled — the authoritative projection overwrites it. This has a dedicated regression test. - The value round-trips through
ExecutorRunning.Metadatapersistence and is readable after a simulated restart.
Verification
make -C apps/backend test ARGS='-run "TestApplyProfileConfigToMetadata|TestSSHReclaim" ./internal/orchestrator/executor/... ./internal/agent/runtime/lifecycle/...'
make -C apps/backend lint
Files likely touched
apps/backend/internal/agent/runtime/lifecycle/executor_backend.goapps/backend/internal/orchestrator/executor/executor_state.go- Test files alongside both.
Dependencies
None.
Inputs
- System design section
Per-profile setting. - The existing
ssh_workdir_root/ssh_shellauthoritative-key comment inexecutor_state.go, which states the redirect-vector rationale this key shares.
Risks
Placing the key in the passthrough list instead of the authoritative list would let task metadata enable a destructive operation. The regression test in condition 2 is the guard.
Safety
No deletion path is reachable from this task.
Output contract
Set status to done, tick the box in plan.md, and report the key name,
lists it was added to, and tests run.