feature-factory 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/WORKFLOW.md CHANGED
@@ -132,8 +132,10 @@ remainder.
132
132
  - With no admitted mode token, omit `--mode`; existing `factory init` records
133
133
  `interactive`.
134
134
 
135
- Those three compatibility phrases name init command stems, not runnable invocations. The selected
136
- fresh-run invocation is fully qualified in Step 0 and ends with `--repo "$RUN_REPO"`.
135
+ Those three compatibility phrases name init command stems, not runnable invocations. The one runnable
136
+ fresh-run invocation is the fully qualified command block in Step 0; copy that block rather than
137
+ assembling init from the phrases here. It is the single factory invocation whose repository flag is
138
+ `--repo "$O"`, and it ends with `--json`.
137
139
 
138
140
  Repeated copies of one mode token are idempotent: the skill consumes them all and this workflow
139
141
  selects that mode once. A mode token the skill did not admit, standing after the first request token,
@@ -675,11 +677,19 @@ present and every other result is a lookup error; either refuses before init.
675
677
 
676
678
  An explicit `PR_BASE` wins. Otherwise require the symbolic branch in the configured operator worktree;
677
679
  detached, missing, escaping, or unprovable worktree state is refused by init. Request one fresh sandbox
678
- with the operator repository as `--repo`, command first and repository flag last, and include issue and
679
- admitted mode flags only when present:
680
+ by running exactly the command below, command first, including each bracketed flag only when its value
681
+ is present. Do not reconstruct this command from prose anywhere in this document: the block is the only
682
+ shape, and every host skill carries it verbatim because a driver must run it before this file exists.
683
+
684
+ Two properties of it are not guesses. Init is the one factory command whose repository flag is the
685
+ operator repository `$O` rather than `$RUN_REPO`, because `RUN_REPO` does not exist until this response
686
+ binds it. And `--json` is mandatory and terminal: without it a successful init still changes state and
687
+ publishes `run.json`, but this workflow binds paths only from a JSON response, repeating init is
688
+ forbidden, and the run can then do nothing but stop -- a live sandbox with `status: running` and no
689
+ driver, which is the worst outcome this document has.
680
690
 
681
691
  ```sh
682
- INIT_RESPONSE="$(factory init "$R" --branch "$FEATURE_BRANCH" [--worktree "$WORKTREE"] [--pr-base "$PR_BASE"] [--issue "$KEY"] [--mode "$MODE"] --repo "$O" --json)"
692
+ INIT_RESPONSE="$(factory init "$R" --branch "$FEATURE_BRANCH" [--worktree "$WORKTREE"] [--pr-base "$PR_BASE"] [--issue "$KEY"] [--mode "$MODE"] [--max-retries "$MAX_RETRIES"] --repo "$O" --json)"
683
693
  ```
684
694
 
685
695
  The init request pre-reserves the deterministic sandbox, performs exactly one
@@ -2105,6 +2115,9 @@ Never re-do a side effect the manifest shows already done — ticket creation, p
2105
2115
  answer; do not work around it by editing state.
2106
2116
  - **Bounded loops.** `max_retries` per slice and per step, recorded as attempts. On exhaustion mark
2107
2117
  `blocked` or `partial` with a reason and stop. A bounded loop parks top-level needs-human; explicit resume may repark it if the external cause remains unfixed.
2118
+ Qualified status reports the run's `max_retries`, so the budget a run is actually bounded by is
2119
+ observable rather than assumed: a forwarded `--max-retries` that never reached the manifest is visible
2120
+ as a different number instead of silently running at the default.
2108
2121
  - **Draft PR only.** Never merge, force-push, or close tickets. Humans merge.
2109
2122
  - **Scope discipline and no fabrication.** Flag out-of-scope work at the next gate. Never invent paths,
2110
2123
  keys, versions, or test passes — if the evidence is thin, say so and ask.
package/bin/factory.js CHANGED
@@ -953,6 +953,11 @@ const HANDLERS = {
953
953
  mode: run.mode,
954
954
  branch: run.branch,
955
955
  pr_base: run.pr_base ?? null,
956
+ // Reported, not defaulted: `max_retries` is a required schema-validated positive integer, so an
957
+ // absent value is an invalid manifest that never reaches here. An operator forwarding
958
+ // `--max-retries` previously had no way to confirm the budget took effect -- init recorded it and
959
+ // nothing read it back.
960
+ max_retries: run.max_retries,
956
961
  publishing_identity: run.publishing_identity ?? null,
957
962
  park_snapshot: run.status === "needs-human" ? observedParkSnapshot(resolve(flags.repo ?? process.cwd()), runId, runDir) : null,
958
963
  pr_draft: run.pr_draft ?? true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feature-factory",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "Durable, observed control plane for /feature runs. Host-agnostic: no opencode dependency.",
5
5
  "type": "module",
6
6
  "license": "MIT",