@christang/keel 5.99.0 → 5.99.1
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.99.
|
|
3
|
+
"version": "5.99.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.99.
|
|
9
|
+
"version": "5.99.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "^1.4.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.99.
|
|
3
|
+
"version": "5.99.1",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.99.
|
|
3
|
+
"version": "5.99.1",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -47,8 +47,8 @@ REQUIRED_SCRIPTS = [
|
|
|
47
47
|
"scripts/validate_plugin.py",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
PACKAGE_VERSION = "5.99.
|
|
51
|
-
PROTOCOL_VERSION = "5.99.
|
|
50
|
+
PACKAGE_VERSION = "5.99.1"
|
|
51
|
+
PROTOCOL_VERSION = "5.99.1"
|
|
52
52
|
LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
|
|
53
53
|
OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
|
|
54
54
|
# Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
|
|
@@ -4516,7 +4516,14 @@ def validate_shift_change_scenario() -> int:
|
|
|
4516
4516
|
subprocess.run(["git", "add", "pushed-not.txt"], cwd=verify, check=True)
|
|
4517
4517
|
subprocess.run(["git", "commit", "-q", "-m", "local only"], cwd=verify, check=True)
|
|
4518
4518
|
write_text(verify / "keel" / "guard.json", "{}\n")
|
|
4519
|
-
|
|
4519
|
+
# A Claude scratchpad of a session started in verify, and one of a
|
|
4520
|
+
# session started elsewhere (shift-temp-owner D1).
|
|
4521
|
+
scratch = Path(tempfile.gettempdir()) / f"claude-{os.getuid()}"
|
|
4522
|
+
slug = re.sub(r"[^A-Za-z0-9]", "-", str(verify.resolve()))
|
|
4523
|
+
temp_tree = scratch / slug / f"keel-test-{os.getpid()}" / "scratchpad" / "own-tmp-tree"
|
|
4524
|
+
other_tree = scratch / "-some-other-dir" / f"keel-test-{os.getpid()}" / "scratchpad" / "other-tmp-tree"
|
|
4525
|
+
for tree in (temp_tree, other_tree):
|
|
4526
|
+
tree.parent.mkdir(parents=True, exist_ok=True)
|
|
4520
4527
|
subprocess.run(["git", "worktree", "add", "-q", "--detach", str(temp_tree)], cwd=verify, check=True, capture_output=True)
|
|
4521
4528
|
run_keel(rtl, "chat", "todo", "soc", "--assignee", "verify", "Rerun the regression", env=env)
|
|
4522
4529
|
# Its own session, as a job a session leaves behind would be: the check
|
|
@@ -4558,6 +4565,19 @@ def validate_shift_change_scenario() -> int:
|
|
|
4558
4565
|
if clean.returncode != 0:
|
|
4559
4566
|
report(f"{label} keel shift check is not ready on a clean worktree: {clean.stdout.strip()} {clean.stderr.strip()}")
|
|
4560
4567
|
return 1
|
|
4568
|
+
subprocess.run(["git", "worktree", "add", "-q", "--detach", str(other_tree)], cwd=verify, check=True, capture_output=True)
|
|
4569
|
+
try:
|
|
4570
|
+
foreign = shift(verify, "check")
|
|
4571
|
+
if foreign.returncode != 0:
|
|
4572
|
+
report(f"{label} another session's temporary worktree blocked the check: {foreign.stdout.strip()}")
|
|
4573
|
+
return 1
|
|
4574
|
+
if "other-tmp-tree" not in foreign.stdout:
|
|
4575
|
+
report(f"{label} another session's temporary worktree is not listed as a note: {foreign.stdout.strip()}")
|
|
4576
|
+
return 1
|
|
4577
|
+
finally:
|
|
4578
|
+
subprocess.run(["git", "worktree", "remove", "--force", str(other_tree)], cwd=verify, check=False, capture_output=True)
|
|
4579
|
+
shutil.rmtree(scratch / slug / f"keel-test-{os.getpid()}", ignore_errors=True)
|
|
4580
|
+
shutil.rmtree(scratch / "-some-other-dir" / f"keel-test-{os.getpid()}", ignore_errors=True)
|
|
4561
4581
|
|
|
4562
4582
|
ready = shift(verify, "ready", "next: rerun R007 on 1b64e8c")
|
|
4563
4583
|
if ready.returncode != 0:
|
package/src/core/shift.js
CHANGED
|
@@ -149,13 +149,24 @@ function temporaryRoots() {
|
|
|
149
149
|
return [...new Set([os.tmpdir(), "/tmp", "/private/tmp", "/var/folders", "/private/var/folders"].map(realpath))];
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
// Linked worktrees under a temporary directory, split by owner
|
|
153
|
+
// (shift-temp-owner D1): one in a Claude scratchpad of a session started in
|
|
154
|
+
// this worktree is this worktree's; any other is someone else's, or unknown.
|
|
152
155
|
function temporaryWorktrees(where) {
|
|
153
156
|
const listed = git(where.worktree, ["worktree", "list", "--porcelain"]);
|
|
154
|
-
if (!listed.ok) return [];
|
|
157
|
+
if (!listed.ok) return { own: [], other: [] };
|
|
155
158
|
const trees = listed.out.split("\n").filter((line) => line.startsWith("worktree ")).map((line) => realpath(line.slice(9)));
|
|
156
159
|
const main = trees[0];
|
|
157
160
|
const roots = temporaryRoots();
|
|
158
|
-
|
|
161
|
+
const slug = where.worktree.replace(/[^A-Za-z0-9]/g, "-");
|
|
162
|
+
const own = [];
|
|
163
|
+
const other = [];
|
|
164
|
+
for (const tree of trees) {
|
|
165
|
+
if (tree === main || tree === where.worktree || !roots.some((root) => inside(tree, root))) continue;
|
|
166
|
+
const scratch = tree.match(/[\\/]claude-\d+[\\/]([^\\/]+)[\\/][^\\/]+[\\/]scratchpad(?:[\\/]|$)/);
|
|
167
|
+
(scratch && scratch[1] === slug ? own : other).push(tree);
|
|
168
|
+
}
|
|
169
|
+
return { own, other };
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
function check(where, role) {
|
|
@@ -180,7 +191,9 @@ function check(where, role) {
|
|
|
180
191
|
items.push({ kind: "process", detail: `PID ${row.pid}, running ${row.elapsed}: ${row.command}` });
|
|
181
192
|
}
|
|
182
193
|
|
|
183
|
-
|
|
194
|
+
const temporary = temporaryWorktrees(where);
|
|
195
|
+
for (const tree of temporary.own) items.push({ kind: "temporary-worktree", detail: tree });
|
|
196
|
+
for (const tree of temporary.other) notes.push(`temporary worktree of another session, or of unknown owner, not counted: ${tree}`);
|
|
184
197
|
|
|
185
198
|
if (role) {
|
|
186
199
|
for (const todo of store.openTodos(where, { assignee: role })) {
|