@frankzhang2026/opencode-android-orchestrator 1.0.5 → 1.1.0
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/CHANGELOG.md +67 -0
- package/README.md +76 -15
- package/dist/config/queue-policy.d.ts.map +1 -1
- package/dist/config/queue-policy.js +1 -2
- package/dist/config/queue-policy.js.map +1 -1
- package/dist/doctor/index.d.ts.map +1 -1
- package/dist/doctor/index.js +14 -3
- package/dist/doctor/index.js.map +1 -1
- package/dist/doctor/installation.d.ts +1 -1
- package/dist/doctor/installation.d.ts.map +1 -1
- package/dist/doctor/installation.js +10 -1
- package/dist/doctor/installation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/installer/adaptive-templates.d.ts +4 -1
- package/dist/installer/adaptive-templates.d.ts.map +1 -1
- package/dist/installer/adaptive-templates.js +38 -13
- package/dist/installer/adaptive-templates.js.map +1 -1
- package/dist/installer/android-project.d.ts +3 -1
- package/dist/installer/android-project.d.ts.map +1 -1
- package/dist/installer/android-project.js.map +1 -1
- package/dist/installer/capabilities-script.d.ts +2 -0
- package/dist/installer/capabilities-script.d.ts.map +1 -0
- package/dist/installer/capabilities-script.js +77 -0
- package/dist/installer/capabilities-script.js.map +1 -0
- package/dist/installer/gradle-verification.d.ts.map +1 -1
- package/dist/installer/gradle-verification.js +13 -6
- package/dist/installer/gradle-verification.js.map +1 -1
- package/dist/installer/init.d.ts.map +1 -1
- package/dist/installer/init.js +2 -1
- package/dist/installer/init.js.map +1 -1
- package/dist/installer/opencode-config.d.ts +3 -3
- package/dist/installer/opencode-config.js +1 -1
- package/dist/installer/project-capabilities.d.ts +35 -0
- package/dist/installer/project-capabilities.d.ts.map +1 -0
- package/dist/installer/project-capabilities.js +82 -0
- package/dist/installer/project-capabilities.js.map +1 -0
- package/dist/installer/upgrade.d.ts.map +1 -1
- package/dist/installer/upgrade.js +9 -1
- package/dist/installer/upgrade.js.map +1 -1
- package/dist/queue/cli.d.ts.map +1 -1
- package/dist/queue/cli.js +32 -5
- package/dist/queue/cli.js.map +1 -1
- package/dist/queue/executor.d.ts +1 -0
- package/dist/queue/executor.d.ts.map +1 -1
- package/dist/queue/executor.js +155 -11
- package/dist/queue/executor.js.map +1 -1
- package/dist/queue/process-ownership.d.ts +12 -0
- package/dist/queue/process-ownership.d.ts.map +1 -0
- package/dist/queue/process-ownership.js +58 -0
- package/dist/queue/process-ownership.js.map +1 -0
- package/dist/queue/queue.d.ts +25 -1
- package/dist/queue/queue.d.ts.map +1 -1
- package/dist/queue/queue.js +96 -11
- package/dist/queue/queue.js.map +1 -1
- package/dist/queue/service.d.ts.map +1 -1
- package/dist/queue/service.js +19 -2
- package/dist/queue/service.js.map +1 -1
- package/dist/queue/storage.d.ts +3 -1
- package/dist/queue/storage.d.ts.map +1 -1
- package/dist/queue/storage.js +25 -15
- package/dist/queue/storage.js.map +1 -1
- package/dist/queue/supervision.d.ts +38 -0
- package/dist/queue/supervision.d.ts.map +1 -0
- package/dist/queue/supervision.js +247 -0
- package/dist/queue/supervision.js.map +1 -0
- package/dist/queue/tools.d.ts.map +1 -1
- package/dist/queue/tools.js +4 -2
- package/dist/queue/tools.js.map +1 -1
- package/docs/MIGRATION.md +110 -9
- package/docs/QUEUE.md +350 -16
- package/docs/SECURITY.md +5 -2
- package/docs/TROUBLESHOOTING.md +82 -8
- package/package.json +1 -1
- package/templates/.opencode/agents/scheduled-coder.md +14 -1
- package/templates/.opencode/agents/scheduled-planner.md +64 -3
- package/templates/.opencode/skills/scheduled-quality-coder/SKILL.md +29 -3
- package/templates/.opencode/skills/scheduled-quality-orchestrator/SKILL.md +65 -4
- package/templates/.opencode/skills/scheduled-quality-reviewer/SKILL.md +19 -1
- package/templates/AGENTS.md.fragment +10 -4
- package/templates/README.md +3 -1
- package/templates/automation/config.schema.json +212 -22
- package/templates/automation/task-contract.schema.json +573 -49
- package/templates/automation/tasks/TASK-TEMPLATE.json.example +9 -4
- package/templates/automation/verification/collect.init.gradle +98 -0
- package/templates/automation/verification/contract.cjs +93 -0
- package/templates/automation/verification/inventory.cjs +433 -0
- package/templates/automation/verification/project.cjs +172 -0
- package/templates/automation/verification/recovery.cjs +426 -0
- package/templates/scripts/automation/acceptance-report.sh +17 -0
- package/templates/scripts/automation/claim-task.sh +35 -2
- package/templates/scripts/automation/integration-scope-gate.sh +3 -3
- package/templates/scripts/automation/lib.sh +61 -19
- package/templates/scripts/automation/orchestrate-task.sh +7 -1
- package/templates/scripts/automation/preflight.sh +1 -2
- package/templates/scripts/automation/quality-gate.sh +10 -1
- package/templates/scripts/automation/record-red.sh +13 -1
- package/templates/scripts/automation/resume-task.sh +3 -0
- package/templates/scripts/automation/scope-gate.sh +4 -4
- package/templates/scripts/automation/show-acceptance-review.sh +1 -0
- package/templates/scripts/automation/status.sh +32 -0
- package/templates/scripts/automation/submit-review.sh +10 -1
- package/templates/scripts/automation/validate-contract.sh +10 -1
- package/templates/scripts/automation/verify-integration.sh +3 -0
- package/templates/scripts/automation/verify-task.sh +3 -0
package/docs/SECURITY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Security model
|
|
2
2
|
|
|
3
3
|
This document describes the security properties of
|
|
4
|
-
`@frankzhang2026/opencode-android-orchestrator@1.0
|
|
4
|
+
`@frankzhang2026/opencode-android-orchestrator@1.1.0`. The lifecycle foundation
|
|
5
5
|
completed the real OpenCode `1.14.22` and `1.15.13` release matrix in `0.2.0`;
|
|
6
6
|
`1.0.0` retains that compatibility boundary.
|
|
7
7
|
|
|
@@ -43,7 +43,10 @@ selections. The configured `humanApproval` policy additionally requires final
|
|
|
43
43
|
candidate acceptance. Configured or explicitly selected `autoCommit`
|
|
44
44
|
authorization is sealed during contract approval and replaces only the final
|
|
45
45
|
human question; build, actual full unit tests and independent Review remain
|
|
46
|
-
mandatory.
|
|
46
|
+
mandatory. Isolated automatic integration additionally requires new V8 authority
|
|
47
|
+
bound to its approved workspace strategy. Planning refresh preserves the original
|
|
48
|
+
approval and is limited to unchanged declared inputs across recorded completed
|
|
49
|
+
queue integrations; it cannot authorize arbitrary target changes.
|
|
47
50
|
|
|
48
51
|
The plugin observes the host's question arguments and completed answer
|
|
49
52
|
metadata through the common before/after hooks. Its one-use receipt binds
|
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
3
|
Use this guide for
|
|
4
|
-
`@frankzhang2026/opencode-android-orchestrator@1.0
|
|
4
|
+
`@frankzhang2026/opencode-android-orchestrator@1.1.0`. npm publication is
|
|
5
|
+
pending; the pinned Registry commands apply after publication.
|
|
5
6
|
|
|
6
7
|
## Start with read-only evidence
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@ From the repository root, capture:
|
|
|
11
12
|
git status --short --branch
|
|
12
13
|
git rev-parse HEAD
|
|
13
14
|
opencode --version
|
|
14
|
-
npx @frankzhang2026/opencode-android-orchestrator@1.0
|
|
15
|
+
npx @frankzhang2026/opencode-android-orchestrator@1.1.0 doctor . --json
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
If installation never completed, doctor will correctly report a missing or
|
|
@@ -31,6 +32,18 @@ The CLI uses these exit codes:
|
|
|
31
32
|
`init`, `upgrade`, and `uninstall` structures successful results; thrown errors
|
|
32
33
|
remain human-readable on stderr with a stable code such as `[FILE_CONFLICT]`.
|
|
33
34
|
|
|
35
|
+
## Nested Android builds (development)
|
|
36
|
+
|
|
37
|
+
For an installed nested Android build, inspect
|
|
38
|
+
`automation/config.json → androidProject.capabilities.buildRoot`. The wrapper,
|
|
39
|
+
settings and `local.properties` belong in that selected directory. Run managed
|
|
40
|
+
scripts from the Git root; for a manual Gradle command, use the selected build
|
|
41
|
+
directory. In isolated worktrees the Worker resolves the source checkout's SDK
|
|
42
|
+
configuration before starting; ignored `local.properties` is not copied.
|
|
43
|
+
Do not replace the selected directory with a symlink or point it at a sibling
|
|
44
|
+
build. A selection/configuration mismatch requires investigation and a reviewed
|
|
45
|
+
installation change, not a fallback to another wrapper.
|
|
46
|
+
|
|
34
47
|
## Company npm Registry override
|
|
35
48
|
|
|
36
49
|
If `npm config get registry` reports an internal Registry and a request fails
|
|
@@ -39,9 +52,9 @@ command-scoped override:
|
|
|
39
52
|
|
|
40
53
|
```sh
|
|
41
54
|
npm --registry=https://registry.npmjs.org/ view \
|
|
42
|
-
@frankzhang2026/opencode-android-orchestrator@1.0
|
|
55
|
+
@frankzhang2026/opencode-android-orchestrator@1.1.0 version
|
|
43
56
|
npx --yes --registry=https://registry.npmjs.org/ \
|
|
44
|
-
@frankzhang2026/opencode-android-orchestrator@1.0
|
|
57
|
+
@frankzhang2026/opencode-android-orchestrator@1.1.0 upgrade . --json
|
|
45
58
|
```
|
|
46
59
|
|
|
47
60
|
This leaves the company's saved npm configuration unchanged. Use the option
|
|
@@ -71,7 +84,7 @@ Git-backed Superpowers plugin at runtime.
|
|
|
71
84
|
| Invalid `--long-command-timeout-ms` | The value is not an integer from `120000` through `7200000`. | Use the `1800000` ms default or pass an intentional bounded value to `init`/`upgrade`; do not edit the generated config directly. |
|
|
72
85
|
| Android SDK failure | No valid explicit SDK, `ANDROID_HOME`, `ANDROID_SDK_ROOT`, or `local.properties` `sdk.dir` was found. | Configure one real SDK root containing `platforms/` and `build-tools/`. Do not publish `local.properties`. |
|
|
73
86
|
| Missing `git`, `jq`, `rg`, `shasum`, or Java | Required deterministic command is unavailable on `PATH`. | Install or restore the missing command, record its version, and rerun the read-only checks. |
|
|
74
|
-
| `Bundled Orchestrator skill is unavailable` | The installed `1.0
|
|
87
|
+
| `Bundled Orchestrator skill is unavailable` | The installed `1.1.0` package is incomplete, damaged, or loaded from an unsupported partial copy. | Reinstall the exact package, inspect its `resources/third-party/superpowers-v6.2.0/skills/` entries, restart OpenCode, and rerun `opencode debug skill`. Do not add an external Superpowers plugin as a fallback. |
|
|
75
88
|
| `current process does not own this task queue execution` immediately after Coder start on 1.0.1 | OpenCode created the tool shell in a separate process group, so 1.0.1 rejected a legitimate Worker descendant. | Upgrade to 1.0.2 or later, restart OpenCode, then use the approved resume or abort workflow for the retained task. Do not edit the queue or lease files. |
|
|
76
89
|
| The exact Superpowers v6.2.0 plugin remains after upgrade | That entry existed in the verified pre-install OpenCode file and is therefore user-owned. | Leave it in place or remove it as a separate reviewed configuration change. Upgrade only removes the old Orchestrator-managed entry. |
|
|
77
90
|
|
|
@@ -88,7 +101,7 @@ silence of `./gradlew tasks --all --console=plain | rg ...` in a large build.
|
|
|
88
101
|
For an existing installation, run:
|
|
89
102
|
|
|
90
103
|
```sh
|
|
91
|
-
npx @frankzhang2026/opencode-android-orchestrator@1.0
|
|
104
|
+
npx @frankzhang2026/opencode-android-orchestrator@1.1.0 upgrade . \
|
|
92
105
|
--refresh-gradle-discovery
|
|
93
106
|
```
|
|
94
107
|
|
|
@@ -97,7 +110,7 @@ least `1800000` milliseconds. A higher timeout already supplied by the caller
|
|
|
97
110
|
is preserved; unrelated Bash commands are unchanged. To configure one hour,
|
|
98
111
|
run `upgrade . --long-command-timeout-ms 3600000` on a healthy installation.
|
|
99
112
|
If a command still reports `120000 ms`, confirm that the project manifest and
|
|
100
|
-
OpenCode plugin reference are both `1.0
|
|
113
|
+
OpenCode plugin reference are both `1.1.0`, restart the OpenCode session so the
|
|
101
114
|
plugin reloads, and rerun doctor before attempting recovery.
|
|
102
115
|
|
|
103
116
|
After installation, inspect OpenCode discovery separately:
|
|
@@ -251,7 +264,7 @@ session or a missing notification is not evidence that a task never started.
|
|
|
251
264
|
| Isolated capacity reached | Integrate or explicitly archive retained workspaces; do not delete failed work simply to advance the queue. |
|
|
252
265
|
| Execution launch ownership unknown | Stop the recorded launcher, prove it exited, then use `queue recover-execution .`; preserve any partial workspace. |
|
|
253
266
|
| Dead transaction owner | Inspect the lock record and use explicit `queue recover-lock .`; a live PID or surviving child process blocks takeover. |
|
|
254
|
-
| OpenCode process failure | Inspect the
|
|
267
|
+
| OpenCode process failure | Inspect the task's agent log and repair the diagnosed cause. Use the applicable approved recovery or abort route. An agent exit alone does not set a shared fault; fixed mode still retains its workspace, while sealed isolated failures allow independent tasks to continue. |
|
|
255
268
|
| Local commit already exists but task is blocked | Use `queue recover . TASK-ID`; it reuses the sealed transaction instead of creating another visible commit. |
|
|
256
269
|
| Target advanced for an isolated candidate | Request `revalidate`, wait for fresh full tests/Review, and confirm the new candidate. |
|
|
257
270
|
| Upgrade/uninstall reports a retained workspace | Stop scheduling and finish or approve abort before replacing runtime resources. |
|
|
@@ -280,3 +293,64 @@ For escalation, provide the command, exit code, stable error code, redacted
|
|
|
280
293
|
details, OpenCode version, package version, current branch/HEAD, and the list of
|
|
281
294
|
affected paths. Share file contents only after applying the guidance in
|
|
282
295
|
[Security](SECURITY.md).
|
|
296
|
+
|
|
297
|
+
## 1.1.0 V5 baseline recovery
|
|
298
|
+
|
|
299
|
+
For a V5 task blocked during capture, inspect queue `baselineRecovery` and the
|
|
300
|
+
retained `baseline-recovery` evidence. A non-null future `nextRunAt` means the
|
|
301
|
+
scheduler is backing off inside the approved environment budget; leave the
|
|
302
|
+
attempts intact. A null time with budget/deadline exhaustion stops automatic
|
|
303
|
+
retry. Unknown failures need `/resume-task` approval within the manual budget.
|
|
304
|
+
Assertion, compilation, authentication, historical baseline and integrity
|
|
305
|
+
failures require diagnosis/correction or a revised task, not repeated resume.
|
|
306
|
+
|
|
307
|
+
A changed ledger/checkpoint, execution/target HEAD, source input, configuration
|
|
308
|
+
or bound toolchain prevents reuse. Restore nothing by deleting evidence.
|
|
309
|
+
A RUNNING attempt left by a crash has no durable outcome and cannot be retried
|
|
310
|
+
automatically; account for the entire process group before the existing
|
|
311
|
+
approved abort/archive workflow. V5's elapsed limit does not kill a hung
|
|
312
|
+
process. V4 baseline recovery rules remain unchanged.
|
|
313
|
+
|
|
314
|
+
## Worker deadlines (V6 development protocol)
|
|
315
|
+
|
|
316
|
+
A deadline stop reports the stage, run/stage deadline, TERM time and any KILL
|
|
317
|
+
escalation. A silent but in-budget compile is allowed to continue. Scheduler
|
|
318
|
+
stop/start does not reset budgets or stop its independent supervisor.
|
|
319
|
+
If the supervisor itself exits, start the scheduler to reattach to its recorded
|
|
320
|
+
Worker. Unknown ownership, PID generation changes, unreadable process tables,
|
|
321
|
+
live/unknown locks and ambiguous launches remain occupied for diagnosis.
|
|
322
|
+
|
|
323
|
+
Once all owned processes have exited, isolated stopped candidates can release
|
|
324
|
+
the execution slot after sealing. An integration interruption preserves the
|
|
325
|
+
commit transaction and lease; use `recover` to complete the existing commit.
|
|
326
|
+
For `OWNERSHIP_BLOCKED`, inspect retained evidence and account for all recorded
|
|
327
|
+
processes before `recover-execution`; it will refuse any live/unknown owner.
|
|
328
|
+
Never use process-name-wide kills or remove a lease to make the queue advance.
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
## V7 stage verification failures
|
|
332
|
+
|
|
333
|
+
Inspect `stageRecovery` in task status and `stage-recovery/<phase>.json` in the
|
|
334
|
+
task evidence. WAITING records the persisted backoff; EXHAUSTED means the phase
|
|
335
|
+
budget/window or no-progress bound stopped retries. BLOCKED means inputs,
|
|
336
|
+
evidence or another invariant could not be preserved. Do not edit these records
|
|
337
|
+
or remove locks to get another attempt. Unknown or incomplete process outcomes
|
|
338
|
+
require ownership diagnosis and the existing approved archive/new-contract
|
|
339
|
+
route. A Reviewer environment stop preserves the sealed candidate; it does not
|
|
340
|
+
request a Coder implementation correction or count as approval.
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
## V8 continuity stops
|
|
344
|
+
|
|
345
|
+
Inspect queue details `planning-baseline.refresh`: input drift, protected
|
|
346
|
+
configuration drift, disabled refresh and unrecorded target commits each explain
|
|
347
|
+
why preparation stopped. Preserve the original contract and approve a revised
|
|
348
|
+
proposal; do not replace its planning digest or baseline evidence. Restore a
|
|
349
|
+
changed repository workspace strategy or obtain fresh V8 approval.
|
|
350
|
+
|
|
351
|
+
For isolated automatic integration, a changed target or source checkout stops
|
|
352
|
+
before a new commit intent. Preserve the candidate and resolve the drift through
|
|
353
|
+
a revised task. If `commit-transaction.json` already exists, retain its lease and
|
|
354
|
+
use queue `recover` after diagnosis; this reuses the same local commit. It must
|
|
355
|
+
not be discarded to free capacity. Other safely sealed pre-commit failures do
|
|
356
|
+
not stop independent tasks, but dependents continue waiting for integration.
|
package/package.json
CHANGED
|
@@ -109,7 +109,14 @@ literally. Do not infer missing requirements and do not ask questions during a
|
|
|
109
109
|
non-interactive run. If anything is ambiguous or blocked, stop and report the exact
|
|
110
110
|
reason; the deterministic scripts own state transitions.
|
|
111
111
|
|
|
112
|
-
For schema
|
|
112
|
+
For schema V4/V5/V6, successful claim must first seal the focused baseline inventory.
|
|
113
|
+
Do not edit tests before claim succeeds. Existing tests join the approved
|
|
114
|
+
behavior cases automatically; keep their coverage and all sealed test/resource
|
|
115
|
+
inputs intact. Use status evidence to inspect missing, newly skipped or extra
|
|
116
|
+
cases and the reported recovery action. An allowed existing skip does not
|
|
117
|
+
authorize any new skipped behavior.
|
|
118
|
+
|
|
119
|
+
For schema V3/V4/V5/V6 tasks, keep production code unchanged while adding the approved
|
|
113
120
|
tests, then call `./scripts/automation/record-red.sh <TASK-ID>` with no model-
|
|
114
121
|
chosen failure text. The script checks every declared case. A familiar exception
|
|
115
122
|
name in a log is not sufficient RED. Fix a test-only preparation error only when
|
|
@@ -124,3 +131,9 @@ Treat `.automation-worktree-allowlist` and the status JSON's
|
|
|
124
131
|
edit, stage, report, or use them as task evidence.
|
|
125
132
|
Passing tests never grants permission to push, merge, create worktrees, alter
|
|
126
133
|
automation rules, or declare the task ready for review yourself.
|
|
134
|
+
|
|
135
|
+
For V6 the approved independent supervisor enforces wall-clock deadlines.
|
|
136
|
+
Controlled Gradle entries disable shared-daemon reuse. Never unset Worker
|
|
137
|
+
ownership variables, launch persistent detached services, or bypass controlled
|
|
138
|
+
entries to extend a deadline. If ownership or termination is blocked, preserve
|
|
139
|
+
the candidate and stop; no extra implementation or retry is authorized.
|
|
@@ -62,7 +62,16 @@ approval. After approval, assemble a complete plan and contract in memory and
|
|
|
62
62
|
call `android_orchestrator_intake` with action `draft`; do not create files in the
|
|
63
63
|
product checkout. Preserve the snapshot's target branch and planningHead.
|
|
64
64
|
|
|
65
|
-
Use schema
|
|
65
|
+
Use schema V4 with verification version 2 unless the proposal explicitly includes
|
|
66
|
+
bounded baseline recovery; use schema V5 only with that newly approved policy. Declare only task behavior cases;
|
|
67
|
+
the executor captures existing focused tests before Coder edits and adds them
|
|
68
|
+
as regression coverage. Explicitly approve inventory mode `focusedBaseline`,
|
|
69
|
+
existing skips (`reject` or `preserve`) and empty baseline (`reject` or `allow`).
|
|
70
|
+
Default both policies to `reject`; use `allow` only for an intentionally empty
|
|
71
|
+
scope such as a new test class. Use fully qualified configured Test task paths,
|
|
72
|
+
and include each parameter instance in the exact behavior identity. Discovered
|
|
73
|
+
test/resource directories do not expand `allowedPaths` or agent permissions.
|
|
74
|
+
Give every verification case a stable ID,
|
|
66
75
|
its one-based acceptance-criterion reference, its source, and its exact test
|
|
67
76
|
identity. Classify preserved behavior as `before: pass`, changed behavior as
|
|
68
77
|
`before: fail`, and an uncertain old boundary as `before: observe`. Do not infer
|
|
@@ -72,13 +81,50 @@ the value for baseline capture. Plan examples are implementation guidance and
|
|
|
72
81
|
must not add requirements beyond the contract. Check acceptance criteria,
|
|
73
82
|
non-goals and verification expectations for contradictions before drafting.
|
|
74
83
|
|
|
84
|
+
For V5/V6/V7/V8, present all recovery fields before contract approval: `version: 1`,
|
|
85
|
+
`scope: baseline`, `maxEnvironmentRetries`, `maxManualRetries`,
|
|
86
|
+
`maxSameFailureRetries` (each 0..3), `maxElapsedMs` (1000..86400000), and
|
|
87
|
+
`initialDelayMs`/`maxDelayMs` (1000..600000, maximum at least initial).
|
|
88
|
+
Explain that classified temporary network/rate-limit failures may retry only
|
|
89
|
+
in deterministic baseline capture. Unknown failures require a fresh resume
|
|
90
|
+
approval within the separate manual budget. Historical test failures, changed
|
|
91
|
+
inputs and corrupted evidence cannot use this route. The elapsed limit stops
|
|
92
|
+
new attempts; it does not terminate a hung process. Recovery does not authorize
|
|
93
|
+
model retries, changed tests, wider scope, or automatic local integration.
|
|
94
|
+
Keep existing V4 contracts unchanged; do not silently add V5 authority.
|
|
95
|
+
|
|
96
|
+
Use schema V6, V7 or V8 only when the proposal also explicitly approves Worker
|
|
97
|
+
termination. Present `execution: { version: 1, maxRunMs, maxStageMs,
|
|
98
|
+
terminationGraceMs }`: run/stage limits are 1000..86400000 ms, stage at most
|
|
99
|
+
run, and TERM grace is 1000..60000 ms. These wall-clock limits apply to each
|
|
100
|
+
reserved execution, including baseline recovery, review, integration and
|
|
101
|
+
abort. An independent supervisor may TERM owned processes and then KILL
|
|
102
|
+
survivors after grace. Deadlines include sleep time and survive scheduler or
|
|
103
|
+
supervisor restart. Log silence is never a reason to kill. Show the actual
|
|
104
|
+
limits before contract approval; do not infer this authority for old tasks.
|
|
105
|
+
Unknown ownership retains the slot. A stopped candidate is not accepted; a
|
|
106
|
+
visible commit keeps its existing transaction for idempotent recovery.
|
|
107
|
+
|
|
108
|
+
Use V7/V8 only with separately approved `stageRecovery`: `version: 1`,
|
|
109
|
+
`maxEnvironmentRetries`, `maxSameFailureRetries` (0..3), `maxElapsedMs`
|
|
110
|
+
(1000..86400000), `initialDelayMs` and `maxDelayMs` (1000..600000,
|
|
111
|
+
maximum at least initial). Each of RED, GREEN and independent Review has its
|
|
112
|
+
own cumulative environment budget and recovery window. Only deterministic
|
|
113
|
+
verification is retried; no model call or commit is replayed. Attempts and
|
|
114
|
+
backoff are durable; changed inputs, ambiguous processes and altered evidence
|
|
115
|
+
stop recovery. Exhausted or unknown verification failures preserve the task
|
|
116
|
+
without spending implementation or Review correction cycles. This does not
|
|
117
|
+
authorize a task-wide model-cost budget, provider retries or evidence revision.
|
|
118
|
+
V1..V6 contracts gain none of this authority through an upgrade.
|
|
119
|
+
|
|
75
120
|
When the draft does not specify a workspace or commit policy, use the values in
|
|
76
121
|
`automation/config.json`; new installations configure `inPlaceExclusive` and
|
|
77
122
|
`humanApproval`. A user may explicitly override the commit policy to
|
|
78
|
-
`autoCommit`
|
|
123
|
+
`autoCommit` for `inPlaceExclusive`, or for `isolatedWorktree` with a new V8
|
|
124
|
+
contract explicitly setting `continuity.isolatedAutoIntegration: true`. Explain the effective policy before
|
|
79
125
|
sealing: quality gates still include build, fresh full unit tests and independent
|
|
80
126
|
Review; automatic mode authorizes local commit and integration, never remote
|
|
81
|
-
push.
|
|
127
|
+
push. Older isolated contracts retain human acceptance. Never infer a policy
|
|
82
128
|
from an old approval or successful tests.
|
|
83
129
|
|
|
84
130
|
Present the returned sealed contract, plan, digest, version, schedule,
|
|
@@ -117,3 +163,18 @@ respective recovery jobs. Commit-transaction recovery uses `recover`; it may
|
|
|
117
163
|
reuse only already sealed authorization and verified local commit metadata.
|
|
118
164
|
Failures preserve the workspace. Do not reset, clean, force-update refs, delete
|
|
119
165
|
user changes, commit directly or push.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
For V8, retain V7 recovery/execution policies and present `continuity` with
|
|
169
|
+
`version: 1`, `isolatedAutoIntegration`, `planningRefresh` (`reject` or
|
|
170
|
+
`completedQueueTasks`) and 1..128 unique repository-relative `planningInputs`.
|
|
171
|
+
Declare all code, interfaces, tests and resources used to reason about the task,
|
|
172
|
+
including dependencies outside allowed edit paths. Exact files or path selectors
|
|
173
|
+
are fingerprinted at the immutable planning HEAD, including absent matches.
|
|
174
|
+
If semantic dependencies are unclear, select `reject` rather than claiming that
|
|
175
|
+
nonconflicting files establish independence. The sealed draft and question must
|
|
176
|
+
show the input selectors/digest and refresh policy. Completed-queue refresh may
|
|
177
|
+
only advance before execution over recorded integrations with unchanged inputs
|
|
178
|
+
and configuration; changed requirements or tests require a revised contract.
|
|
179
|
+
This policy does not authorize automatic candidate rebasing, weakening tests,
|
|
180
|
+
retry-budget resets, new requirements, remote pushes or publication.
|
|
@@ -50,15 +50,30 @@ it with `./scripts/automation/block-task.sh <TASK-ID> <reason>` before stopping.
|
|
|
50
50
|
- For `CODING` after an interrupted initial run, inspect existing evidence
|
|
51
51
|
and continue from the first incomplete mandatory action.
|
|
52
52
|
|
|
53
|
-
4.
|
|
53
|
+
4. For V4/V5/V6/V7, confirm successful claim recorded `baselineInventory` in status
|
|
54
|
+
before editing any test. Discovery classifies evidence inputs only; all
|
|
55
|
+
edits still need contract and agent permission. On the initial coding cycle,
|
|
56
|
+
add or change the smallest behavior test
|
|
54
57
|
permitted by `allowedPaths`.
|
|
55
58
|
5. If RED evidence does not already exist, capture a genuine RED result. For a
|
|
56
|
-
schema V3 contract use:
|
|
59
|
+
schema V3/V4/V5/V6/V7 contract use:
|
|
57
60
|
|
|
58
61
|
`./scripts/automation/record-red.sh <TASK-ID>`
|
|
59
62
|
|
|
60
63
|
It checks every declared preserved, changed and observed case against fresh
|
|
61
|
-
structured output.
|
|
64
|
+
structured output. V4/V5/V6/V7 also checks every captured existing regression case;
|
|
65
|
+
RED and GREEN share that manifest. After RED, test sources and resources are
|
|
66
|
+
frozen. For V4, if baseline inventory capture fails after `baseline.json` is written,
|
|
67
|
+
stop: baseline-only resume cannot retry it. Preserve evidence and request
|
|
68
|
+
approved abort/archive followed by a newly approved task; do not delete
|
|
69
|
+
baseline files or keep retrying the original task.
|
|
70
|
+
For V5/V6/V7, the queue completes deterministic baseline capture before launching
|
|
71
|
+
Coder. Inspect `baselineRecovery` and require a complete sealed baseline.
|
|
72
|
+
If capture is blocked, stop; only the queue may schedule approved recovery.
|
|
73
|
+
Never invoke recovery.cjs directly, change its ledger or retry a claim.
|
|
74
|
+
Read `inventoryStatus` for the exact reason and next action on
|
|
75
|
+
failure; never regenerate a baseline or overwrite sealed RED to bypass it.
|
|
76
|
+
For a legacy schema V1/V2 contract use:
|
|
62
77
|
|
|
63
78
|
`./scripts/automation/record-red.sh <TASK-ID> <expected-failure-text> -- <test-filter>`
|
|
64
79
|
|
|
@@ -103,3 +118,14 @@ Do not invoke `android-orchestrator-brainstorming`,
|
|
|
103
118
|
`finishing-a-development-branch`, `requesting-code-review`, parallel agents, or
|
|
104
119
|
subagent-driven development. Planning and approval happen before this session;
|
|
105
120
|
review happens in a separate fresh read-only session.
|
|
121
|
+
|
|
122
|
+
## Approved V7 verification recovery
|
|
123
|
+
|
|
124
|
+
For V7, record-red.sh, quality-gate.sh and submit-review.sh handle explicitly
|
|
125
|
+
approved transient verification retries with separate RED/GREEN/Review budgets.
|
|
126
|
+
Do not retry these commands to reset an exhausted environment budget. Status
|
|
127
|
+
`stageRecovery` shows attempt history, failure classification and persistent
|
|
128
|
+
backoff. An environment/unknown stop is not a request to change production code
|
|
129
|
+
or weaken tests; preserve the candidate and stop. Provider/model failures still
|
|
130
|
+
follow the existing approved recovery route. Never edit the recovery ledger,
|
|
131
|
+
locks or earlier logs. V1..V6 keep their original retry semantics.
|
|
@@ -26,9 +26,10 @@ description: Plan stable committed code, approve independent inbox contracts, an
|
|
|
26
26
|
from `automation/config.json`; new installations configure
|
|
27
27
|
`inPlaceExclusive` + `humanApproval`. If the user explicitly wants a
|
|
28
28
|
different policy, show the effective choice in the proposal and seal it.
|
|
29
|
-
`autoCommit`
|
|
30
|
-
|
|
31
|
-
retain their sealed policies
|
|
29
|
+
`autoCommit` supports `inPlaceExclusive`, or `isolatedWorktree` with a new
|
|
30
|
+
V8 contract explicitly granting `continuity.isolatedAutoIntegration: true`.
|
|
31
|
+
Older approvals retain their sealed policies and cannot acquire this
|
|
32
|
+
authority from repository defaults.
|
|
32
33
|
5. Display the returned full plan, contract and review card: task ID/version,
|
|
33
34
|
digest, target local branch/planningHead, allowed paths/file count, tests,
|
|
34
35
|
acceptance/non-goals, dependencies/notBefore, workspace and commit policies.
|
|
@@ -53,7 +54,7 @@ contract authorization. Never create a final human approval for autoCommit.
|
|
|
53
54
|
`/acceptance <TASK-ID>` reads the current item and acceptance report. Present
|
|
54
55
|
the candidate/diff hash, target branch, baseline, build, actual full-test results,
|
|
55
56
|
independent Review, scope and commit policy. If the local target has advanced
|
|
56
|
-
for
|
|
57
|
+
for a human-approval isolated candidate, request `revalidate`. That job waits for the same
|
|
57
58
|
execution slot, runs fresh verification/Review and invalidates old acceptance.
|
|
58
59
|
After a fresh candidate exists, call queue `review` with
|
|
59
60
|
`operation: integrate` and the task key. Present its evidence, then call
|
|
@@ -80,3 +81,63 @@ independent tasks run. Dependencies complete only after local integration.
|
|
|
80
81
|
|
|
81
82
|
After completion, show the true authorization source, local commit SHA and
|
|
82
83
|
“未推送”. No workflow, failure or recovery grants remote push rights.
|
|
84
|
+
|
|
85
|
+
## Approved V5 baseline recovery
|
|
86
|
+
|
|
87
|
+
V5 contracts explicitly seal a bounded baseline-only recovery policy. Queue
|
|
88
|
+
status exposes the failure category, retained attempts, deadline and next run.
|
|
89
|
+
A scheduled environment retry uses the existing execution slot without another
|
|
90
|
+
model call or question. Do not submit a duplicate manual recovery while it is
|
|
91
|
+
waiting. `/resume-task` remains a fresh approval for an unknown failure and
|
|
92
|
+
uses the separate manual budget. Neither route can replace a successful
|
|
93
|
+
baseline, accept changed inputs, or weaken V4/V5 RED/GREEN checks. No recovery
|
|
94
|
+
policy is inferred for V4 contracts. Preserve incomplete RUNNING attempts after
|
|
95
|
+
an ambiguous process exit for ownership diagnosis; do not reset their budgets.
|
|
96
|
+
|
|
97
|
+
## Approved V6 Worker supervision
|
|
98
|
+
|
|
99
|
+
V6 adds explicit per-execution run/stage deadlines and TERM grace to the V5
|
|
100
|
+
contract. The independent supervisor applies that sealed policy without a new
|
|
101
|
+
question for each timeout. Queue and task status expose `workerSupervision`;
|
|
102
|
+
inspect the stop reason and durable signal/exit evidence. Never issue broad
|
|
103
|
+
process-name kills, clear ownership faults to force scheduling, or delete
|
|
104
|
+
leases. A known stopped isolated candidate is sealed before independent work
|
|
105
|
+
continues; its dependents still wait. An interrupted local commit stays
|
|
106
|
+
`INTEGRATION_BLOCKED`; use the existing transaction recovery route, never make
|
|
107
|
+
a replacement commit. `queue stop` stops the scheduler and leaves supervision
|
|
108
|
+
active. On restart the scheduler reattaches a missing supervisor without
|
|
109
|
+
relaunching a live Worker or resetting its deadlines/grace.
|
|
110
|
+
|
|
111
|
+
## Approved V7 verification recovery
|
|
112
|
+
|
|
113
|
+
For V7, record-red.sh, quality-gate.sh and submit-review.sh handle explicitly
|
|
114
|
+
approved transient verification retries with separate RED/GREEN/Review budgets.
|
|
115
|
+
Do not retry these commands to reset an exhausted environment budget. Status
|
|
116
|
+
`stageRecovery` shows attempt history, failure classification and persistent
|
|
117
|
+
backoff. An environment/unknown stop is not a request to change production code
|
|
118
|
+
or weaken tests; preserve the candidate and stop. Provider/model failures still
|
|
119
|
+
follow the existing approved recovery route. Never edit the recovery ledger,
|
|
120
|
+
locks or earlier logs. V1..V6 keep their original retry semantics.
|
|
121
|
+
|
|
122
|
+
## Approved V8 isolated integration and planning refresh
|
|
123
|
+
|
|
124
|
+
V8 retains the V7 recovery and execution policies. Present all `continuity`
|
|
125
|
+
fields before approval: `version: 1`, `isolatedAutoIntegration`, `planningRefresh`
|
|
126
|
+
and `planningInputs`. Isolated automatic integration requires both sealed
|
|
127
|
+
`isolatedWorktree` and `autoCommit` policies. Use the complete returned approval
|
|
128
|
+
question, including its continuity authority; never synthesize a shorter label.
|
|
129
|
+
|
|
130
|
+
Declare every repository input used to reason about the requirement, interfaces,
|
|
131
|
+
design and tests in `planningInputs`, including dependencies and relevant
|
|
132
|
+
resources. Selectors do not grant edit permission. If this dependency declaration
|
|
133
|
+
is uncertain, use `planningRefresh: "reject"`. `completedQueueTasks` permits a
|
|
134
|
+
fresh execution baseline only before execution, with unchanged declared inputs
|
|
135
|
+
and configuration and a verified linear history of completed queue integrations.
|
|
136
|
+
It cannot reset recovery budgets or replace an existing task's RED/Review.
|
|
137
|
+
|
|
138
|
+
For BASELINE_REVIEW, inspect `planning-baseline` evidence and propose a revised
|
|
139
|
+
contract when required. Preserve the original planning HEAD and approval. Target
|
|
140
|
+
drift during automatic integration does not authorize rebase or automatic
|
|
141
|
+
revalidation. Preserve the candidate; an existing commit transaction requires
|
|
142
|
+
explicit `recover`, while a revised plan requires a new approval. Report the
|
|
143
|
+
actual local commit and automatic authorization source after completion.
|
|
@@ -38,10 +38,17 @@ you review.
|
|
|
38
38
|
5. Check each acceptance criterion against observable behavior. Inspect for
|
|
39
39
|
regression risk, missing edge cases, out-of-scope changes, test deletion,
|
|
40
40
|
ignored tests, relaxed assertions, and implementation-shaped tests.
|
|
41
|
-
For schema V3, also verify every structured case source and identity, that
|
|
41
|
+
For schema V3/V4/V5/V6/V7, also verify every structured case source and identity, that
|
|
42
42
|
preserved cases passed before implementation, that changed cases failed only
|
|
43
43
|
for their declared reason, and that RED contains no undeclared failure. Treat
|
|
44
44
|
the Planner and Coder summaries as claims; use the bound preflight evidence.
|
|
45
|
+
For V4/V5/V6/V7 inspect `baselineInventory`, `testManifest`, `greenInventory` and
|
|
46
|
+
`inventoryStatus` from status. Check complete regression coverage, explicit
|
|
47
|
+
existing-skip/empty-baseline policy and frozen test/resource inputs. The
|
|
48
|
+
collector records type/message mechanically; independently assess the
|
|
49
|
+
declared failure origin and assertion meaning from the tests and evidence.
|
|
50
|
+
`processExitCode` is Gradle's actual exit; a RED `exitCode` of 1 represents
|
|
51
|
+
approved case failure, not a failed Gradle build.
|
|
45
52
|
6. Decide independently:
|
|
46
53
|
|
|
47
54
|
- approve only when the diff is correct and evidence is sufficient;
|
|
@@ -74,3 +81,14 @@ you review.
|
|
|
74
81
|
`AWAITING_HUMAN`.
|
|
75
82
|
- If verification cannot run, submit `CHANGES_REQUESTED` with the environmental
|
|
76
83
|
blocker. Do not manufacture approval.
|
|
84
|
+
|
|
85
|
+
## Approved V7 verification recovery
|
|
86
|
+
|
|
87
|
+
For V7, record-red.sh, quality-gate.sh and submit-review.sh handle explicitly
|
|
88
|
+
approved transient verification retries with separate RED/GREEN/Review budgets.
|
|
89
|
+
Do not retry these commands to reset an exhausted environment budget. Status
|
|
90
|
+
`stageRecovery` shows attempt history, failure classification and persistent
|
|
91
|
+
backoff. An environment/unknown stop is not a request to change production code
|
|
92
|
+
or weaken tests; preserve the candidate and stop. Provider/model failures still
|
|
93
|
+
follow the existing approved recovery route. Never edit the recovery ledger,
|
|
94
|
+
locks or earlier logs. V1..V6 keep their original retry semantics.
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
Run orchestration commands from the Git repository root.
|
|
5
5
|
|
|
6
|
-
For automated local unit-test verification,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
For automated local unit-test verification, use the task paths in
|
|
7
|
+
`automation/config.json` under `gradleVerification.fullUnitTestTasks`.
|
|
8
|
+
For manual runs, execute `./gradlew` followed by those configured tasks from
|
|
9
|
+
`androidProject.capabilities.buildRoot` relative to the Git root (default `.`).
|
|
10
|
+
Use a standalone command without environment assignments or shell chaining.
|
|
11
|
+
For nested builds, unattended agents must use the managed verification scripts
|
|
12
|
+
from the Git root; direct Gradle commands are rejected by the executor guard.
|
|
13
|
+
Task execution uses the controlled verification scripts, which read the same
|
|
14
|
+
configuration. Empty lint/device task lists mean the capability is unavailable;
|
|
15
|
+
they never count as a passed check when that capability is required.
|
|
10
16
|
|
|
11
17
|
Treat `.opencode/`, `automation/`, `scripts/automation/`, `opencode.json`,
|
|
12
18
|
and this managed block as orchestration infrastructure. Product tasks must not
|
package/templates/README.md
CHANGED
|
@@ -12,7 +12,9 @@ Migrated template roots:
|
|
|
12
12
|
- `.opencode/commands`: `change`, `acceptance`, `resume-task`, `resume-review`,
|
|
13
13
|
and `abort-task`
|
|
14
14
|
- `.opencode/skills`: the three `scheduled-quality-*` skills
|
|
15
|
-
- `
|
|
15
|
+
- `automation/verification`: the shared V4/V5 contract validator, bounded V5 baseline recovery, inventory evaluator
|
|
16
|
+
and Gradle collector. Discovered tests are evidence inputs, not edit permission.
|
|
17
|
+
- `scripts/automation`: all 29 deterministic Bash transactions and their
|
|
16
18
|
test runner, preserved as executable files
|
|
17
19
|
- `automation`: the portable V5 configuration render source, both JSON Schemas,
|
|
18
20
|
and the task contract example
|