refactor(onboard): consolidate desired-state authorities
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Ownership
@cv owns this issue.
Do not start, assign, or submit this work unless @cv transfers ownership in this issue.
## Problem
Onboard, rebuild, resume, and channel mutation can derive the same desired state from different sources.
The lifecycle map identifies split ownership for messaging intent, target resolution, conflict policy, and policy persistence.
## Desired behavior
- The registry-persisted messaging plan is authoritative for an existing sandbox.
- One target-resolution policy defines when current input can replace recorded intent.
- One declarative conflict policy serves onboard, rebuild, and channel mutation.
- One policy-persistence owner reconciles create-time, live, and channel changes.
- A persisted plan stores logical bindings only. Apply-time code binds credentials and live capabilities.
## Change boundary
Consolidate one decision authority in each PR.
Keep interactive prompt policy at the caller when prompt behavior differs.
Do not define a public plugin or lifecycle SDK.
## Security
Persist no credential values.
Reject a target or binding conflict before an external or destructive effect.
## Validation
- Test source precedence for onboard, resume, rebuild, and channel mutation.
- Test conflict parity across callers.
- Test registry and session reconciliation after a successful apply.
- Test failure before mutation when recorded and current intent conflict.
## Completion
Each listed desired-state decision has one owner and one tested precedence policy.
Contributor guide
Assessment
This issue has not been assessed yet.