feat: support custom server deployment drafts

This commit is contained in:
npc0-hue
2026-07-24 16:56:28 +08:00
parent 292b380f3c
commit 220ef91a8e
36 changed files with 1520 additions and 85 deletions
@@ -0,0 +1,22 @@
## ADDED Requirements
### Requirement: Run executes protected custom lifecycle plans under declared policy
The system SHALL dispatch custom lifecycle commands only to a Run endpoint that advertises deployment-plan support and the selected execution policy. Run MUST perform local path, executable, timeout, and port preflight before executing a write or process action.
#### Scenario: Run accepts an argv custom start plan
- **WHEN** a compatible Run claims a custom start job using argv execution mode
- **THEN** it receives the protected working directory and arguments only through the leased execution input and reports a safe preflight result
### Requirement: Shell interpretation is explicit
The system SHALL require an explicit shell kind for a shell command string and MUST NOT infer shell interpretation from command text. The system MUST reject shell execution when the selected Run policy does not allow that shell kind.
#### Scenario: Disallowed shell command
- **WHEN** an operator selects a shell command mode unsupported by the assigned Run
- **THEN** dispatch fails with a safe policy error and does not execute the command
### Requirement: Run reports redacted phase progress
The Run contract SHALL report only a defined deployment phase, percent, and safe message or error code. It MUST NOT return raw host paths, raw command text, raw credentials, or direct socket values.
#### Scenario: Preflight path failure
- **WHEN** a configured working directory is unavailable on Run
- **THEN** Run reports a `preflight` failure with a safe reason without echoing the supplied absolute path