praxis-agent 0.70.1 → 0.70.3
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 +48 -14
- package/dist/build-identity.json +1 -1
- package/dist/providers/codex-responses.js +127 -47
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -179,7 +179,7 @@ troubleshooting. Run `praxis --help` for the authoritative command surface.
|
|
|
179
179
|
`frame-codec`, `graph-craft`, and `route-forge`: 12 repository-qualified
|
|
180
180
|
tasks, 3 repetitions each, and 36 planned runs with digest
|
|
181
181
|
`sha256:9380f5ccd9b920bf9767381f2d36d91dc04abe645db0a7c1a5f1597279d579ff`.
|
|
182
|
-
The corpus
|
|
182
|
+
The corpus was frozen before the campaign. The corrected Issue #731 no-tool/no-file smoke selected
|
|
183
183
|
`codex-relay/default/codex-responses/gpt-5.6-sol` on the pinned runtime and
|
|
184
184
|
returned terminal success in one turn with zero configured tools, zero stderr,
|
|
185
185
|
and no isolated-cwd mutation; this is provider smoke evidence, not v3 corpus
|
|
@@ -187,24 +187,58 @@ troubleshooting. Run `praxis --help` for the authoritative command surface.
|
|
|
187
187
|
first-case provider identity preflight with `Invalid provider settings: unknown
|
|
188
188
|
provider codex-relay`. Project Eval creates an empty per-case
|
|
189
189
|
`workspace.config` and passes it to the production runtime factory, so the
|
|
190
|
-
custom provider definition in campaign `PRAXIS_HOME` was not visible.
|
|
191
|
-
baseline completed 0/36 runs
|
|
192
|
-
|
|
193
|
-
regression comparison exists. The no-retry/no-substitution contract was
|
|
194
|
-
honored; there is no v3 behavior, mutation-oriented safety,
|
|
195
|
-
verifier, usage, subscription-cost, duration/latency, quality, security,
|
|
196
|
-
compatibility, efficiency, optimization, baseline, candidate, or
|
|
197
|
-
qualification conclusion. The settings-forwarding gap must be resolved under
|
|
198
|
-
a new change before any separately authorized future campaign. Task 8.2
|
|
199
|
-
remains incomplete and Phase 9 stays locked. Issue #733 now fixes only this
|
|
190
|
+
custom provider definition in campaign `PRAXIS_HOME` was not visible. This
|
|
191
|
+
historical #731 baseline completed 0/36 runs and admitted no candidate; its
|
|
192
|
+
no-retry/no-substitution contract was honored. Issue #733 now fixes only this
|
|
200
193
|
configuration admission path: the default Project Eval factory preserves the
|
|
201
194
|
explicitly selected caller native config root for provider definitions,
|
|
202
195
|
selection, and credentials consistently across identity and runtime
|
|
203
196
|
construction. The per-case root remains authoritative for runtime settings,
|
|
204
197
|
state, transcripts, hooks, plugins, MCP, memory, artifacts, tools, and
|
|
205
198
|
verifier behavior; no settings file is copied into the case root. This removes
|
|
206
|
-
the configuration blocker only; it does not retry #731
|
|
207
|
-
|
|
199
|
+
the configuration blocker only; it does not retry #731 or authorize a future
|
|
200
|
+
provider request. Issue #738 completed the v3 campaign: candidate behavior
|
|
201
|
+
and verifier satisfaction fell from 24/36 to 18/36, with 13 newly failing
|
|
202
|
+
runs, while mutation-oriented safety remained 36/36. Subscription cost was
|
|
203
|
+
unavailable for every run, so no quality, broad-security, cost, latency,
|
|
204
|
+
efficiency, or optimization claim is permitted. Task 8.2 and Phase 9 remain
|
|
205
|
+
locked; result-informed remediation or requalification remains separately
|
|
206
|
+
scoped. [Issue #740](https://github.com/Forest-Isle/Praxis/issues/740)
|
|
207
|
+
now freezes `praxis-held-out-v4` for `csv-lens`, `memo-lru`, and `patch-tree`,
|
|
208
|
+
with 12 repository-qualified tasks, 3 repetitions each, and 36 planned runs
|
|
209
|
+
at digest `sha256:a32cb478cd6a99971cb57964c82affa3296546c387a4f1dacf4df7d313480b53`.
|
|
210
|
+
V4 was frozen before any result-informed v3 remediation or requalification;
|
|
211
|
+
Issue #740 ran no provider/model and produced no baseline, candidate, result,
|
|
212
|
+
or qualification evidence. Task 8.2 and Phase 9 remain locked; freezing v4
|
|
213
|
+
only permits a separately scoped future evidence process. Exact identities,
|
|
214
|
+
digests, usage, timing, and evidence boundaries are recorded in [Native
|
|
215
|
+
Fixture Contracts](docs/NATIVE_FIXTURE_CONTRACTS.md).
|
|
216
|
+
Issue #742's exactly-once pre-corpus smoke returned HTTP 404 and failed closed;
|
|
217
|
+
the baseline and candidate did not run, and no qualification exists. No
|
|
218
|
+
retry, substitution, or result selection occurred. The v4 corpus remains
|
|
219
|
+
unexecuted, so Task 8.2/Phase 9 remain locked; see [Native Fixture
|
|
220
|
+
Contracts](docs/NATIVE_FIXTURE_CONTRACTS.md) for exact evidence.
|
|
221
|
+
Issue #748 then ran one authorized pre-corpus smoke against clean runtime
|
|
222
|
+
source `git:e152a2b1c1f2aba150cb28cbf577780d699b0011`, artifact
|
|
223
|
+
`sha256:80a4bc792f727b75ab1259c4c6d9fdc4e93dad333d112f2f75bab143c7ea9cdd`,
|
|
224
|
+
and `codex-relay/default/codex-responses/gpt-5.5` at the fixed adapter
|
|
225
|
+
endpoint. It failed closed with HTTP 404 and bounded `model_not_found`
|
|
226
|
+
diagnostics; baseline and candidate remained 0/36 and absent, with no
|
|
227
|
+
verdict. No retry or substitution occurred, v4 remains unexecuted, and
|
|
228
|
+
Task 8.2/Phase 9 remain locked. This diagnostic applies only to #748's
|
|
229
|
+
response and does not establish its producing layer or explain #742.
|
|
230
|
+
Issue #751 completed one successful post-deploy no-tool/no-file smoke after
|
|
231
|
+
fresh exact-identity authorization and provider-free admission passed. The
|
|
232
|
+
`codex-relay/default/codex-responses/gpt-5.6-sol` smoke used one turn with no
|
|
233
|
+
retry, fallback, substitution, or workspace mutation. This is connectivity-
|
|
234
|
+
only evidence; 4xx correlation was not exercised, v4 remains unexecuted, and
|
|
235
|
+
Task 8.2/Phase 9 remain locked. Issue #756 is retained as an immutable harness-
|
|
236
|
+
contract failure rather than qualification evidence; v4 remains 0/36. A
|
|
237
|
+
complete valid held-out baseline unlocks Phase 9 measurement, while adoption
|
|
238
|
+
or release still requires a changed-build candidate with `qualified: true`.
|
|
239
|
+
Detailed evidence and the next-campaign authorization boundary are in
|
|
240
|
+
[Native Fixture Contracts](docs/NATIVE_FIXTURE_CONTRACTS.md).
|
|
241
|
+
A
|
|
208
242
|
bounded DeepSeek baseline for
|
|
209
243
|
the exact
|
|
210
244
|
`anthropic/default/deepseek-v4-flash` pin completed 36/36 runs with
|
|
@@ -511,7 +545,7 @@ normal/low-capability full-frame p95 budgets of `<16.7/<33 ms`.
|
|
|
511
545
|
`npm run test:coverage` measures all production code under `src/**` with V8 and
|
|
512
546
|
enforces global floors of 79% statements, 70% branches, 85% functions, and 81% lines,
|
|
513
547
|
and rejects any production runtime module with zero covered statements (while allowing
|
|
514
|
-
type-only modules). `npm run test:fixtures` executes the
|
|
548
|
+
type-only modules). `npm run test:fixtures` executes the 77-behavior native contract; 69 behaviors
|
|
515
549
|
are qualified and 8 are explicitly excluded. Schema-v2 risk tiers and executable evidence dimensions
|
|
516
550
|
are enforced fail-closed. `npm run verify:fixture-contracts` performs the structural check and is part
|
|
517
551
|
of `npm run check`.
|
package/dist/build-identity.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema_version":"1.0","source_revision":"git:
|
|
1
|
+
{"schema_version":"1.0","source_revision":"git:4fd3c4ef9402e26c4358e8192333ef9b23468fb0","source_dirty":false,"artifact_sha256":"sha256:c047ab2ccddb9756f5c594724d1b37186d6ed8788e60b82621f189c4d3c19c8e"}
|
|
@@ -6,20 +6,132 @@ function failure(kind, retryable, status) {
|
|
|
6
6
|
? 'Codex Responses provider request failed'
|
|
7
7
|
: `Codex Responses provider request failed with HTTP ${status}`, { kind, retryable, ...(status === undefined ? {} : { status }) });
|
|
8
8
|
}
|
|
9
|
-
function statusFailure(status) {
|
|
9
|
+
function statusFailure(status, diagnostics) {
|
|
10
|
+
let result;
|
|
10
11
|
if (status === 401 || status === 403)
|
|
11
|
-
|
|
12
|
-
if (status === 402)
|
|
13
|
-
|
|
14
|
-
if (status === 408)
|
|
15
|
-
|
|
16
|
-
if (status === 429)
|
|
17
|
-
|
|
18
|
-
if (status === 529)
|
|
19
|
-
|
|
20
|
-
if (status >= 500)
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
result = failure('authentication_failed', false, status);
|
|
13
|
+
else if (status === 402)
|
|
14
|
+
result = failure('billing_error', false, status);
|
|
15
|
+
else if (status === 408)
|
|
16
|
+
result = failure('timeout', true, status);
|
|
17
|
+
else if (status === 429)
|
|
18
|
+
result = failure('rate_limit', true, status);
|
|
19
|
+
else if (status === 529)
|
|
20
|
+
result = failure('overloaded', true, status);
|
|
21
|
+
else if (status >= 500)
|
|
22
|
+
result = failure('server_error', true, status);
|
|
23
|
+
else
|
|
24
|
+
result = failure('invalid_request', false, status);
|
|
25
|
+
if (diagnostics !== undefined)
|
|
26
|
+
return new ModelProviderError(`${result.message} (${diagnostics})`, {
|
|
27
|
+
retryable: result.retryable,
|
|
28
|
+
...(result.kind === undefined ? {} : { kind: result.kind }),
|
|
29
|
+
...(result.status === undefined ? {} : { status: result.status }),
|
|
30
|
+
});
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
const safeDiagnostic = /^[A-Za-z0-9][A-Za-z0-9._-]*$/u;
|
|
34
|
+
function safeValue(value) {
|
|
35
|
+
return (typeof value === 'string' &&
|
|
36
|
+
value.length >= 1 &&
|
|
37
|
+
value.length <= 128 &&
|
|
38
|
+
safeDiagnostic.test(value));
|
|
39
|
+
}
|
|
40
|
+
function parseErrorDiagnostics(body, headers) {
|
|
41
|
+
let parsed;
|
|
42
|
+
if (body !== undefined) {
|
|
43
|
+
try {
|
|
44
|
+
parsed = JSON.parse(body);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
parsed = undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const object = typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
|
|
51
|
+
? parsed
|
|
52
|
+
: undefined;
|
|
53
|
+
const nested = object?.error !== null &&
|
|
54
|
+
typeof object?.error === 'object' &&
|
|
55
|
+
!Array.isArray(object?.error)
|
|
56
|
+
? object?.error
|
|
57
|
+
: undefined;
|
|
58
|
+
const values = [
|
|
59
|
+
['type', nested === undefined ? object?.type : nested.type],
|
|
60
|
+
['code', nested === undefined ? object?.code : nested.code],
|
|
61
|
+
['relay_request_id', headers.get('x-relay-request-id')],
|
|
62
|
+
['request_id', headers.get('x-request-id')],
|
|
63
|
+
['cf_ray', headers.get('cf-ray')],
|
|
64
|
+
];
|
|
65
|
+
const seen = new Set();
|
|
66
|
+
const admitted = [];
|
|
67
|
+
for (const [key, raw] of values) {
|
|
68
|
+
if (!safeValue(raw) || seen.has(raw))
|
|
69
|
+
continue;
|
|
70
|
+
seen.add(raw);
|
|
71
|
+
admitted.push(`${key}=${raw}`);
|
|
72
|
+
}
|
|
73
|
+
return admitted.length === 0 ? undefined : admitted.join(', ');
|
|
74
|
+
}
|
|
75
|
+
async function readErrorBody(response, maxBytes, onChunk) {
|
|
76
|
+
const reader = response.body?.getReader();
|
|
77
|
+
if (reader === undefined)
|
|
78
|
+
return undefined;
|
|
79
|
+
const chunks = [];
|
|
80
|
+
let total = 0;
|
|
81
|
+
let ended = false;
|
|
82
|
+
let failed = false;
|
|
83
|
+
try {
|
|
84
|
+
while (true) {
|
|
85
|
+
const next = await reader.read();
|
|
86
|
+
if (next.done) {
|
|
87
|
+
ended = true;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (next.value.byteLength > 0)
|
|
91
|
+
onChunk();
|
|
92
|
+
if (total + next.value.byteLength > maxBytes) {
|
|
93
|
+
if (total < maxBytes)
|
|
94
|
+
chunks.push(next.value.slice(0, maxBytes - total));
|
|
95
|
+
total = maxBytes;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
chunks.push(next.value);
|
|
99
|
+
total += next.value.byteLength;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
failed = true;
|
|
104
|
+
}
|
|
105
|
+
finally {
|
|
106
|
+
if (!ended) {
|
|
107
|
+
try {
|
|
108
|
+
await reader.cancel();
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
failed = true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
reader.releaseLock();
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
failed = true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (failed || !ended)
|
|
122
|
+
return undefined;
|
|
123
|
+
try {
|
|
124
|
+
const bytes = new Uint8Array(total);
|
|
125
|
+
let offset = 0;
|
|
126
|
+
for (const chunk of chunks) {
|
|
127
|
+
bytes.set(chunk, offset);
|
|
128
|
+
offset += chunk.byteLength;
|
|
129
|
+
}
|
|
130
|
+
return new TextDecoder().decode(bytes);
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
23
135
|
}
|
|
24
136
|
export class CodexResponsesProvider {
|
|
25
137
|
options;
|
|
@@ -109,40 +221,8 @@ export class CodexResponsesProvider {
|
|
|
109
221
|
throw failure('transport_error', true);
|
|
110
222
|
}
|
|
111
223
|
if (!response.ok) {
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
let total = 0;
|
|
115
|
-
let ended = false;
|
|
116
|
-
try {
|
|
117
|
-
while (true) {
|
|
118
|
-
const next = await reader.read();
|
|
119
|
-
if (next.done) {
|
|
120
|
-
ended = true;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
if (next.value.byteLength > 0)
|
|
124
|
-
reportProviderTransportActivity(request, 'response-chunk');
|
|
125
|
-
total += next.value.byteLength;
|
|
126
|
-
if (total > this.maxErrorBodyBytes)
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
catch {
|
|
131
|
-
/* preserve the redacted HTTP status classification */
|
|
132
|
-
}
|
|
133
|
-
finally {
|
|
134
|
-
if (!ended) {
|
|
135
|
-
try {
|
|
136
|
-
await reader.cancel();
|
|
137
|
-
}
|
|
138
|
-
catch {
|
|
139
|
-
/* preserve the redacted HTTP status classification */
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
reader.releaseLock();
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
throw statusFailure(response.status);
|
|
224
|
+
const body = await readErrorBody(response, this.maxErrorBodyBytes, () => reportProviderTransportActivity(request, 'response-chunk'));
|
|
225
|
+
throw statusFailure(response.status, parseErrorDiagnostics(body, response.headers));
|
|
146
226
|
}
|
|
147
227
|
if (!response.body)
|
|
148
228
|
throw failure('transport_error', true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "praxis-agent",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.3",
|
|
4
4
|
"description": "Local-first, single-user general agent for the command line.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "wuqisen",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"verify:fixture-contracts": "node scripts/verify-fixture-contracts.mjs",
|
|
64
64
|
"test:fixtures": "node scripts/run-fixture-contracts.mjs",
|
|
65
65
|
"test:eval:baseline": "vitest run src/evals/coding-baseline.test.ts src/evals/project-eval-comparison.test.ts src/evals/apply-patch-admission.test.ts src/evals/lsp-diagnostics-admission.test.ts src/evals/glob-ripgrep-admission.test.ts",
|
|
66
|
-
"test:eval:held-out-contract": "vitest run src/evals/held-out-corpus.test.ts src/evals/held-out-corpus-v3.test.ts",
|
|
66
|
+
"test:eval:held-out-contract": "vitest run src/evals/held-out-corpus.test.ts src/evals/held-out-corpus-v3.test.ts src/evals/held-out-corpus-v4.test.ts",
|
|
67
67
|
"test:eval:held-out-qualification": "vitest run src/evals/held-out-qualification.test.ts"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|