taskforce-loop-engineering 0.16.2 → 0.16.4
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 +16 -0
- package/README.md +4 -0
- package/docs/isolated-verification.md +81 -0
- package/lib/context-budget.mjs +9 -1
- package/lib/core.mjs +298 -40
- package/lib/isolated-verification.mjs +47 -0
- package/package.json +6 -4
- package/scripts/async-acceptance-refresh-self-test.mjs +3 -0
- package/scripts/context-budget-self-test.mjs +25 -7
- package/scripts/final-judgement-self-test.mjs +568 -1
- package/scripts/isolated-verification-self-test.mjs +201 -0
- package/scripts/isolated-verify-self-test.py +133 -0
- package/scripts/isolated-verify.py +418 -0
- package/scripts/project-gate-reconciliation-self-test.mjs +36 -1
- package/scripts/revision-coverage-self-test.mjs +105 -0
- package/skills/taskforce-loop-engineering/SKILL.md +26 -1
- package/skills/taskforce-loop-engineering/references/context-budget.md +1 -1
- package/skills/taskforce-loop-engineering/references/frozen-input-verification.md +40 -0
- package/skills/taskforce-loop-engineering/references/scope-task-acceptance.md +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.16.4 - 2026-10-29
|
|
6
|
+
|
|
7
|
+
- Measure project continuation by newly accepted, evidence-bound milestone identities, preserving explicit and inferred project plans; renamed plans and duplicate snapshots no longer count as progress.
|
|
8
|
+
- Allow bounded repair of malformed checkpoint history without treating unknown baselines as empty acceptance. Preserve human gates and require an explicit validated revision before continuation.
|
|
9
|
+
- Separate successful evidence-bearing context handoffs from capped exception recovery; repeated or empty verification still stops and human blockers remain authoritative.
|
|
10
|
+
- Close unordered status-only phases with explicit same-scope, hash-bound revision coverage. Preserve history, real defects, corrupt evidence and cross-milestone boundaries; reject invalid coverage laundering.
|
|
11
|
+
- Add Node 22/24 regression coverage and synchronize the distributed skill. Publication does not upgrade installed CLIs or integrations.
|
|
12
|
+
|
|
13
|
+
## 0.16.3 - 2026-10-27
|
|
14
|
+
|
|
15
|
+
- Preserve task-scoped human-input gates during reconciliation; keep task acceptance distinct from project completion and unresolved authority blockers.
|
|
16
|
+
- Improve English/Chinese scope inference for coordinated negation, neither/nor, double negatives and unrelated negative context, with paired bounded-task/project regressions. Scope inference remains heuristic.
|
|
17
|
+
- Add opt-in Linux frozen-input verification using Python, bubblewrap and strace with PID-namespace decoding: declared inputs, preserved executable modes, host-owned traces and receipts, and no nonisolated fallback.
|
|
18
|
+
- Audit failed path probes with raw traversal semantics, traced cwd/process inheritance and proven procfs self aliases. Unknown process/fd aliases and unresolved internal symlinks fail closed; this can reject legitimate optional accesses and is not unrestricted syscall emulation.
|
|
19
|
+
- Publish updated repository skill references for scope/gates, isolated verification, runtime requirements and evidence boundaries. Publication does not upgrade existing CLI installations or generated integrations.
|
|
20
|
+
|
|
5
21
|
## 0.16.2 - 2026-10-24
|
|
6
22
|
|
|
7
23
|
- Discover OpenClaw diagnostic channel/account pairs from the selected CLI, with explicit source channel, account and target filters. Doctor covers all matching accounts; smoke covers one source per run.
|
package/README.md
CHANGED
|
@@ -1103,6 +1103,10 @@ commands. It records the branch, worktree path, verification results, `git
|
|
|
1103
1103
|
status --short`, `git diff --stat`, and `git diff --name-status` in the run
|
|
1104
1104
|
artifact, plus untracked file names.
|
|
1105
1105
|
|
|
1106
|
+
On Linux, code queues can opt into frozen-input, fail-closed verification via
|
|
1107
|
+
`worktree.isolatedVerification`. See [isolated verification](docs/isolated-verification.md)
|
|
1108
|
+
for the input contract, host requirements, receipt rules, and limits.
|
|
1109
|
+
|
|
1106
1110
|
Create a starter config:
|
|
1107
1111
|
|
|
1108
1112
|
```bash
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Isolated verification for code queues
|
|
2
|
+
|
|
3
|
+
Linux code queues can opt into fail-closed verification by adding
|
|
4
|
+
`worktree.isolatedVerification` beside `worktree.verifyCommands`:
|
|
5
|
+
|
|
6
|
+
```json
|
|
7
|
+
{
|
|
8
|
+
"worktree": {
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"verifyCommands": ["python3 -m unittest discover -s tests"],
|
|
11
|
+
"isolatedVerification": {
|
|
12
|
+
"inputs": ["src", "tests", "pyproject.toml"],
|
|
13
|
+
"runtimeFiles": []
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`inputs` are exact project files or recursive directories. They are frozen into
|
|
20
|
+
a private read-only snapshot with file permission bits preserved. Input identity
|
|
21
|
+
includes file content, size, and permission bits, so mode-only changes invalidate
|
|
22
|
+
the stability checks and change the digest; symlinks, missing paths, and special files fail
|
|
23
|
+
closed. Do not list generated output directories. Commands run from `/work`,
|
|
24
|
+
with `/out` as their only persistent writable output. The environment has no
|
|
25
|
+
inherited proxy, `NODE_OPTIONS`, home directory, or network access. The host
|
|
26
|
+
must have `python3`, `bwrap`, and `strace`; no nonisolated fallback exists.
|
|
27
|
+
|
|
28
|
+
`runtimeFiles` is an optional list of exact regular files under `/home` or `/opt` (for
|
|
29
|
+
example, a user-local Node binary). Each is mounted read-only at its original
|
|
30
|
+
path and hashed before and after execution. System files under `/usr`, `/bin`,
|
|
31
|
+
`/lib`, `/lib64`, and `/etc` are mounted read-only by the backend. Directory
|
|
32
|
+
toolchains, browser profiles, Docker, Git replay, and networked gates are not
|
|
33
|
+
supported by this generic backend. Use a separately reviewed project-specific
|
|
34
|
+
gate for those, and do not mark its result as this backend's receipt.
|
|
35
|
+
|
|
36
|
+
Each command gets a fresh, unguessable evidence directory containing the input
|
|
37
|
+
snapshot, host-owned trace, output, logs, and `terminal.json`. Loop accepts a
|
|
38
|
+
verification only when its process exits zero **and** the receipt proves a
|
|
39
|
+
zero-exit command, declared reads, unchanged source/snapshot/tool files, and
|
|
40
|
+
process-group cleanup. All commands in one verification group must share the
|
|
41
|
+
same input digest. Failed file accesses are checked against the recorded working
|
|
42
|
+
directory or directory descriptor, including nested paths and resumed calls.
|
|
43
|
+
Swallowing a missing undeclared input error does not make verification pass.
|
|
44
|
+
Missing, malformed, stale, or red receipts fail verification.
|
|
45
|
+
The queue run records the evidence directory and digest in its verification
|
|
46
|
+
artifact. `code-task-run` repeats isolated verification after applying a
|
|
47
|
+
reviewed patch; its evidence lives beside the project root in
|
|
48
|
+
`.loop-isolation-evidence/<task-id>/`.
|
|
49
|
+
|
|
50
|
+
This is a verification backend, not an automatic project dependency inventory
|
|
51
|
+
or a substitute for independent acceptance review. Each project must declare
|
|
52
|
+
its inputs and prove its dynamic dependencies with a real command and negative
|
|
53
|
+
control before making isolation mandatory for that queue.
|
|
54
|
+
|
|
55
|
+
### File trace compatibility
|
|
56
|
+
|
|
57
|
+
The host strace must support `--decode-pids=pidns`; unavailable support fails
|
|
58
|
+
closed. The supervisor traces process creation, chdir and fchdir as well as file
|
|
59
|
+
syscalls, to resolve relative access/exec probes across child processes and PID
|
|
60
|
+
namespaces. C byte escapes (including octal UTF-8 filenames) are decoded;
|
|
61
|
+
truncated or unresolved failed paths are rejected. Genuinely absent optional
|
|
62
|
+
files are allowed; existing undeclared source paths remain rejected even when
|
|
63
|
+
the verification command swallows the error. Snapshot ancestor directories are
|
|
64
|
+
readable because they contain only the frozen declared descendants.
|
|
65
|
+
|
|
66
|
+
Failed project-path probes retain their original components for source availability checks: a missing or non-directory ancestor before `..` is not collapsed into an available input. Reachable parent-relative undeclared inputs still fail verification.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Failed project-path attempts are walked component by component in the sandbox
|
|
70
|
+
namespace before mapping `/work` to the source. Re-entering `/work` through `..`
|
|
71
|
+
and repeated leading slashes cannot bypass undeclared-input auditing. Missing,
|
|
72
|
+
non-directory, and trailing-slash components retain kernel traversal semantics.
|
|
73
|
+
The supervisor models its explicit mount roots and runtime-file ancestors;
|
|
74
|
+
unresolved traversal through dynamic external mounts or symlink ancestors fails
|
|
75
|
+
closed. This is bounded trace auditing, not unrestricted syscall emulation.
|
|
76
|
+
|
|
77
|
+
Failed `/proc/self/cwd`, `/proc/thread-self/cwd` and self `root` probes are
|
|
78
|
+
resolved using the traced process cwd or the sandbox root before source-input
|
|
79
|
+
auditing. Raw suffix components are retained. Unresolved process/fd aliases
|
|
80
|
+
(including `/dev/fd`) fail closed; optional accesses via unknown dynamic aliases
|
|
81
|
+
may therefore be rejected. This does not claim general procfs emulation.
|
package/lib/context-budget.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StringDecoder } from 'node:string_decoder';
|
|
2
2
|
import { DEFAULT_REQUIRES_HUMAN_ACTION_PATTERNS, DEFAULT_RECOVERABLE_RUNTIME_PATTERNS } from './dispatch-classification.mjs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
4
5
|
import { createWriteStream } from 'node:fs';
|
|
5
6
|
import { finished } from 'node:stream/promises';
|
|
6
7
|
import { open, realpath, writeFile } from 'node:fs/promises';
|
|
@@ -142,6 +143,13 @@ export async function handoffCheckpoint(value, { root, checkpointsDir, taskId, r
|
|
|
142
143
|
if (!relative || relative.startsWith('..') || path.isAbsolute(relative)) return { valid: false };
|
|
143
144
|
const cp = await readBoundedJson(file);
|
|
144
145
|
if (!cp || cp.task_id !== taskId || cp.loop_run_id !== runId || !Array.isArray(cp.blockers)) return { valid: false };
|
|
145
|
-
|
|
146
|
+
// Exclude transport IDs, prose and timestamps: rotating sessions or merely
|
|
147
|
+
// renaming a checkpoint cannot constitute progress. Require recorded checks.
|
|
148
|
+
const checks = Array.isArray(cp.verification) ? cp.verification.filter(x =>
|
|
149
|
+
(typeof x === 'string' && x.trim()) || (x && typeof x === 'object' && Object.keys(x).length)) : [];
|
|
150
|
+
const canonical = x => Array.isArray(x) ? x.map(canonical) : x && typeof x === 'object'
|
|
151
|
+
? Object.fromEntries(Object.keys(x).sort().map(k => [k, canonical(x[k])])) : x;
|
|
152
|
+
const progressFingerprint = checks.length ? createHash('sha256').update(JSON.stringify(canonical(checks))).digest('hex') : null;
|
|
153
|
+
return { valid: true, progressFingerprint, blocked: cp.blockers.length > 0 || ['blocked', 'needs_human_input'].includes(cp.status) };
|
|
146
154
|
} catch { return { valid: false }; }
|
|
147
155
|
}
|