@arbiterforge/ca-pi 0.17.0 → 0.17.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/README.md CHANGED
@@ -10,7 +10,7 @@ and durable project context. You decide. codeArbiter enforces.
10
10
  <img alt="Claude Code plugin" src="https://img.shields.io/badge/Claude_Code-plugin-d97757">
11
11
  <img alt="Codex plugin" src="https://img.shields.io/badge/OpenAI_Codex-plugin-10a37f">
12
12
  <img alt="Pi Feature Forge preview" src="https://img.shields.io/badge/ca--pi-Feature_Forge_preview-d97757">
13
- <img alt="version 2.25.0" src="https://img.shields.io/badge/version-2.25.0-2b7489">
13
+ <img alt="version 2.25.1" src="https://img.shields.io/badge/version-2.25.1-2b7489">
14
14
  <img alt="core lanes" src="https://img.shields.io/badge/core_lanes-18-555">
15
15
  <img alt="skills" src="https://img.shields.io/badge/skills-22-555">
16
16
  <img alt="agents" src="https://img.shields.io/badge/agents-20-555">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,6 +4,12 @@ All notable changes to `ca-pi` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.1] - 2026-10-07
8
+
9
+ ### Fixed
10
+
11
+ - Reduce plan approval preflight latency by batching validated task reads.
12
+
7
13
  ## [0.17.0] - 2026-10-05
8
14
 
9
15
  ### Fixed
@@ -6,43 +6,43 @@
6
6
  "binaries": {
7
7
  "darwin/amd64": {
8
8
  "file": "ca-artifact-darwin-amd64",
9
- "sha256": "5670d20116a3c846f539b82e8db49a68509016c3dda4a147126c0d85e63e484a",
9
+ "sha256": "433780fa59913512346069f9e1891e306a8bec41ed6fcc7cd26b50748d03ae06",
10
10
  "native_tested": true
11
11
  },
12
12
  "darwin/arm64": {
13
13
  "file": "ca-artifact-darwin-arm64",
14
- "sha256": "dbc911004289993da4d720113906baba12f1afa510894f850a042869c9af918b",
14
+ "sha256": "b68192c7a1da2cd2f9031f71ab4c7e015673f060d6bfdfa3aa4b57d9f090bf34",
15
15
  "native_tested": true
16
16
  },
17
17
  "linux/amd64": {
18
18
  "file": "ca-artifact-linux-amd64",
19
- "sha256": "9e13efce9499ea895a60fe7461a6234e258ac1ad836f1e9272cce7dfc88bb0d4",
19
+ "sha256": "09582eabdef3f828a12de21b85ccc7b52a188651c2a4f69f3f776a2e62c86036",
20
20
  "native_tested": true
21
21
  },
22
22
  "linux/arm64": {
23
23
  "file": "ca-artifact-linux-arm64",
24
- "sha256": "e527ac09363a15c2c70cfe92b1a051ee645c3ce528cafccdfc5349e16bcf34e8",
24
+ "sha256": "f7699ce8f2f07200ea8508f21a6d369506443392aa8897d84e9d5e7dd6469770",
25
25
  "native_tested": true
26
26
  },
27
27
  "windows/amd64": {
28
28
  "file": "ca-artifact-windows-amd64.exe",
29
- "sha256": "c545c16d9aad8968e6616a5749500ee56e7907bab97fc9aefa7e02204162e2cb",
29
+ "sha256": "9a0f186e2a1bcfd92c8f9db5cb0aa2f6dfb128dd6f0dad2708a78596f0364e16",
30
30
  "native_tested": true
31
31
  },
32
32
  "windows/arm64": {
33
33
  "file": "ca-artifact-windows-arm64.exe",
34
- "sha256": "0bc2c45ab2eff641ae2f493016f2a0828d2757c9670be645b2c7366d3a86c9f3",
34
+ "sha256": "3f1bc7d00f9488b4a4a9f21e5ca414fd5c97031ad7b1c2b52c02f5d7f2956e3a",
35
35
  "native_tested": true
36
36
  }
37
37
  },
38
38
  "context_qualification": {
39
39
  "darwin/amd64": {
40
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
40
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
41
41
  "workflow": ".github/workflows/ci.yml",
42
- "run_id": "37644396985",
43
- "binary_sha256": "5670d20116a3c846f539b82e8db49a68509016c3dda4a147126c0d85e63e484a",
44
- "observation_sha256": "5db64a17c8e22b2459e2c7296822a5d8f7e6942855dd7facfe92e4695a16488d",
45
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
42
+ "run_id": "37846583992",
43
+ "binary_sha256": "433780fa59913512346069f9e1891e306a8bec41ed6fcc7cd26b50748d03ae06",
44
+ "observation_sha256": "ee00612966f27685b7949d6a5656585cc7243c9409bc0d780829c4bb7a8cc106",
45
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
46
46
  "native_cases": [
47
47
  "TestContextBoundedRender",
48
48
  "TestContextDocumentContract",
@@ -53,12 +53,12 @@
53
53
  ]
54
54
  },
55
55
  "darwin/arm64": {
56
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
56
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
57
57
  "workflow": ".github/workflows/ci.yml",
58
- "run_id": "37644396985",
59
- "binary_sha256": "dbc911004289993da4d720113906baba12f1afa510894f850a042869c9af918b",
60
- "observation_sha256": "8b1c8eb597e9e1bab7fd2269d69f64b38b6359d8be92f28b77d2d5901b5bf464",
61
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
58
+ "run_id": "37846583992",
59
+ "binary_sha256": "b68192c7a1da2cd2f9031f71ab4c7e015673f060d6bfdfa3aa4b57d9f090bf34",
60
+ "observation_sha256": "38b15beb06fb33b83d0447a245486ba9dc9cd671e70da0d4eec7aed7073041a4",
61
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
62
62
  "native_cases": [
63
63
  "TestContextBoundedRender",
64
64
  "TestContextDocumentContract",
@@ -69,12 +69,12 @@
69
69
  ]
70
70
  },
71
71
  "linux/amd64": {
72
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
72
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
73
73
  "workflow": ".github/workflows/ci.yml",
74
- "run_id": "37644396985",
75
- "binary_sha256": "9e13efce9499ea895a60fe7461a6234e258ac1ad836f1e9272cce7dfc88bb0d4",
76
- "observation_sha256": "26c7a44a764263b3cc262d904ae15b36219fa6b69856124ecdb53ff76c182716",
77
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
74
+ "run_id": "37846583992",
75
+ "binary_sha256": "09582eabdef3f828a12de21b85ccc7b52a188651c2a4f69f3f776a2e62c86036",
76
+ "observation_sha256": "d76858bc4e8d55cf01eeb018647f29b6aa19e3191b7a510b0097cb459c55cc90",
77
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
78
78
  "native_cases": [
79
79
  "TestContextBoundedRender",
80
80
  "TestContextDocumentContract",
@@ -85,12 +85,12 @@
85
85
  ]
86
86
  },
87
87
  "linux/arm64": {
88
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
88
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
89
89
  "workflow": ".github/workflows/ci.yml",
90
- "run_id": "37644396985",
91
- "binary_sha256": "e527ac09363a15c2c70cfe92b1a051ee645c3ce528cafccdfc5349e16bcf34e8",
92
- "observation_sha256": "14d87d22b93dd0eb091fda79cc59c506308af1ecc0542444a8f7647c3d97564e",
93
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
90
+ "run_id": "37846583992",
91
+ "binary_sha256": "f7699ce8f2f07200ea8508f21a6d369506443392aa8897d84e9d5e7dd6469770",
92
+ "observation_sha256": "9856d46d215e2e067feda40d69ac5faf3547a30a9417f5a0f115195a1ac6e138",
93
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
94
94
  "native_cases": [
95
95
  "TestContextBoundedRender",
96
96
  "TestContextDocumentContract",
@@ -101,12 +101,12 @@
101
101
  ]
102
102
  },
103
103
  "windows/amd64": {
104
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
104
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
105
105
  "workflow": ".github/workflows/ci.yml",
106
- "run_id": "37644396985",
107
- "binary_sha256": "c545c16d9aad8968e6616a5749500ee56e7907bab97fc9aefa7e02204162e2cb",
108
- "observation_sha256": "31c23bc1713645c097786e3e152948c86cd1d41cf8ca59bd842a19117d847c2a",
109
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
106
+ "run_id": "37846583992",
107
+ "binary_sha256": "9a0f186e2a1bcfd92c8f9db5cb0aa2f6dfb128dd6f0dad2708a78596f0364e16",
108
+ "observation_sha256": "22ed0133fa553db2c24feaf1f9ffc9893269e188f7f6465af18cbbe2f6af6902",
109
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
110
110
  "native_cases": [
111
111
  "TestContextBoundedRender",
112
112
  "TestContextDocumentContract",
@@ -117,12 +117,12 @@
117
117
  ]
118
118
  },
119
119
  "windows/arm64": {
120
- "source_commit": "9496cff6332fe0b97195b7ebe67b73f62f30e5b3",
120
+ "source_commit": "f6c49397838a03a5d742cbf3fb803da798ace73b",
121
121
  "workflow": ".github/workflows/ci.yml",
122
- "run_id": "37644396985",
123
- "binary_sha256": "0bc2c45ab2eff641ae2f493016f2a0828d2757c9670be645b2c7366d3a86c9f3",
124
- "observation_sha256": "4087ca9d3c828c9a3e101879fc8a02478267d2a3c7b4d736b39d5a114cd7a294",
125
- "module_sha256": "f4b15732c8d1066be412718753670f3aeedc9ac668447919bb903db2eedace10",
122
+ "run_id": "37846583992",
123
+ "binary_sha256": "3f1bc7d00f9488b4a4a9f21e5ca414fd5c97031ad7b1c2b52c02f5d7f2956e3a",
124
+ "observation_sha256": "8674479ef0663b3753bb21f2c1ce62c0b952d63efcdcb14098852d110189b04f",
125
+ "module_sha256": "421b4db5fa1afc9a8620c5538161d8b23f193d6a1042ad1c5aa004facdd77844",
126
126
  "native_cases": [
127
127
  "TestContextBoundedRender",
128
128
  "TestContextDocumentContract",
@@ -95,6 +95,37 @@ def _preflight_plan_verification(client: Any, identity: dict[str, Any]) -> dict[
95
95
  if not isinstance(value, dict) or any(value.get(key) != identity.get(key) for key in keys):
96
96
  raise _artifactlib.ArtifactError("STALE_PLAN_PREFLIGHT", "plan identity changed during verification preflight; reread the complete current plan")
97
97
 
98
+ def task_records(ids: list[str]):
99
+ for start in range(0, len(ids), 128):
100
+ selected = ids[start:start + 128]
101
+ offset = 0
102
+ for _ in range(len(selected)):
103
+ page = client.call("read-batch", {
104
+ "artifact_id": artifact_id, "symbols": selected,
105
+ "model_sha256": identity["model_sha256"], "offset": offset, "budget": 16384,
106
+ })
107
+ same_identity(page)
108
+ _artifactlib.ArtifactClient._check_page(page, offset, "records")
109
+ records = page["records"]
110
+ end = offset + len(records)
111
+ if (page.get("mode") != "exact" or page.get("context_complete") is not False
112
+ or type(page.get("offset")) is not int or page["offset"] != offset
113
+ or type(page.get("total")) is not int or page["total"] != len(selected)
114
+ or not records or end > len(selected)
115
+ or page["next_offset"] != (end if end < len(selected) else None)):
116
+ raise _artifactlib.ArtifactError("INVALID_RESPONSE", "plan task batch count, offset or completeness changed")
117
+ for expected_id, row in zip(selected[offset:end], records):
118
+ if (not isinstance(row, dict) or row.get("id") != expected_id
119
+ or row.get("kind") != "tasks" or row.get("retired") is not False
120
+ or not isinstance(row.get("record"), dict) or row["record"].get("id") != expected_id):
121
+ raise _artifactlib.ArtifactError("INVALID_RESPONSE", "plan task batch contains an invalid or unexpected record")
122
+ yield row["record"]
123
+ if page["next_offset"] is None:
124
+ break
125
+ offset = end
126
+ else:
127
+ raise _artifactlib.ArtifactError("INVALID_RESPONSE", "plan task batch did not terminate")
128
+
98
129
  same_identity(client.call("identity", {"artifact_id": artifact_id}))
99
130
  root = _artifactlib._trusted_directory(client.root, "UNSAFE_ROOT")
100
131
  diagnostics: list[str] = []
@@ -113,6 +144,7 @@ def _preflight_plan_verification(client: Any, identity: dict[str, Any]) -> dict[
113
144
  or total is not None and page["total"] != total):
114
145
  raise _artifactlib.ArtifactError("INVALID_RESPONSE", "plan outline count or offset changed")
115
146
  total = page["total"]
147
+ tasks = []
116
148
  for row in page["records"]:
117
149
  if (not isinstance(row, dict) or not isinstance(row.get("id"), str)
118
150
  or row["id"] in seen or type(row.get("retired")) is not bool):
@@ -120,11 +152,9 @@ def _preflight_plan_verification(client: Any, identity: dict[str, Any]) -> dict[
120
152
  seen.add(row["id"])
121
153
  if row.get("kind") != "tasks" or row["retired"]:
122
154
  continue
123
- exact = client.call("read", {"artifact_id": artifact_id, "symbol": row["id"], "mode": "exact", "budget": 16384})
124
- same_identity(exact)
125
- task = exact.get("record")
126
- if (not isinstance(task, dict) or task.get("id") != row["id"]
127
- or not isinstance(task.get("verification"), list) or not task["verification"]):
155
+ tasks.append(row["id"])
156
+ for task in task_records(tasks):
157
+ if not isinstance(task.get("verification"), list) or not task["verification"]:
128
158
  raise _artifactlib.ArtifactError("INVALID_RESPONSE", "plan task lacks complete verification definitions")
129
159
  for number, definition in enumerate(task["verification"], 1):
130
160
  command_count += 1
@@ -145,7 +175,7 @@ def _preflight_plan_verification(client: Any, identity: dict[str, Any]) -> dict[
145
175
  _artifactauthoritylib.validate_command_definition(definition, cwd=cwd)
146
176
  except (_artifactlib.ArtifactError, _artifactauthoritylib.AuthorityError) as exc:
147
177
  argv = definition.get("argv") if isinstance(definition, dict) else None
148
- diagnostics.append(f"{row['id']} verification[{number}] {json.dumps(argv, ensure_ascii=True)}: {exc}")
178
+ diagnostics.append(f"{task['id']} verification[{number}] {json.dumps(argv, ensure_ascii=True)}: {exc}")
149
179
  next_offset = page["next_offset"]
150
180
  expected = offset + len(page["records"])
151
181
  if next_offset is None:
@@ -11,7 +11,7 @@ import hostapi # noqa: E402
11
11
  class PiHost(hostapi.Host):
12
12
  name = "pi"
13
13
  adapter_name = "@arbiterforge/ca-pi"
14
- adapter_version = "0.17.0"
14
+ adapter_version = "0.17.1"
15
15
  update_target = "ca-pi"
16
16
  update_tag_prefix = "ca-pi-v"
17
17
  update_command = "pi update npm:@arbiterforge/ca-pi"
@@ -313,7 +313,7 @@ class Host:
313
313
 
314
314
  name = "claude"
315
315
  adapter_name = "ca"
316
- adapter_version = "2.25.0"
316
+ adapter_version = "2.25.1"
317
317
 
318
318
  # Update-notifier descriptor. Each independently versioned host overrides
319
319
  # these three values in its per-plugin _host.py. Keeping the target,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "private": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",