Problem
The public made run submit interface still requires low-level gate/ref/SHA inputs and does not own the complete user-facing operation. A consumer such as Consigliere should not have to coordinate an ambiguous sequence of resolving the gate, pushing a ref, recovering a run ID, and guessing whether durable submission succeeded.
Required implementation
Add a high-level command:
made run submit --json --repo <task-worktree>
The command must:
- Resolve and canonicalize the repository/worktree path.
- Resolve the associated Made gate and verify it is managed by the current
MADE_HOME.
- Resolve the exact current branch and HEAD SHA.
- Reject detached HEAD or unsupported identity unless explicitly supported and documented.
- Resolve the previous gate-ref SHA or zero SHA safely.
- Reserve or recover one durable submission identity keyed by gate/ref/input SHA.
- Push the exact commit/ref through the Made gate.
- Ensure the durable submission record exists before reporting success.
- Wait boundedly for the exact run record to become queryable.
- Return structured data including:
- run ID
- repository ID
- branch
- input SHA
- protocol version
- status-schema version
- config-schema version
- state
- Repeating the command for the same gate/ref/SHA must return the same run ID.
- If Push succeeded but response delivery or run materialization was interrupted, return an explicit recoverable partial-submission result and support idempotent recovery.
- The consumer must never invent its own run ID.
- Keep lower-level gate/ref/SHA interfaces internal or clearly marked as advanced hook/testing surfaces.
- Do not alter Made’s merge authority boundary.
Acceptance criteria
- One command gives Consigliere an exact durable run ID.
- Successful response always corresponds to queryable durable run state.
- Same submission is idempotent across retries, process failures, and daemon restarts.
- A daemon interruption cannot create two runs for one gate/ref/SHA identity.
- Branch and input SHA in the response exactly match the submitted worktree.
- Unsafe/detached repository identity fails clearly.
- Partial submission is recoverable without scanning run history.
Required tests
- normal worktree submission
- same-submission retry
- push succeeds, client response is lost
- daemon restarts during submission
- concurrent duplicate submissions
- detached HEAD rejection
- wrong/unmanaged gate rejection
- branch changes during submission
- gate ref already at the same SHA
- exact response-schema validation
- no consumer-supplied run ID required
Problem
The public
made run submitinterface still requires low-level gate/ref/SHA inputs and does not own the complete user-facing operation. A consumer such as Consigliere should not have to coordinate an ambiguous sequence of resolving the gate, pushing a ref, recovering a run ID, and guessing whether durable submission succeeded.Required implementation
Add a high-level command:
The command must:
MADE_HOME.Acceptance criteria
Required tests