oxe-cc 1.22.0 → 1.22.2
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/.cursor/commands/oxe-discuss.md +45 -45
- package/.cursor/commands/oxe-execute.md +52 -52
- package/.cursor/commands/oxe-help.md +44 -44
- package/.cursor/commands/oxe-next.md +44 -44
- package/.cursor/commands/oxe-plan.md +49 -49
- package/.cursor/commands/oxe-quick.md +49 -49
- package/.cursor/commands/oxe-review-pr.md +47 -47
- package/.cursor/commands/oxe-scan.md +47 -47
- package/.cursor/commands/oxe-ship.md +47 -47
- package/.cursor/commands/oxe-spec.md +49 -49
- package/.cursor/commands/oxe-verify.md +50 -50
- package/.cursor/commands/oxe.md +51 -51
- package/.github/prompts/oxe-alm.prompt.md +47 -47
- package/.github/prompts/oxe-ask.prompt.md +47 -47
- package/.github/prompts/oxe-capabilities.prompt.md +47 -47
- package/.github/prompts/oxe-checkpoint.prompt.md +47 -47
- package/.github/prompts/oxe-compact.prompt.md +46 -46
- package/.github/prompts/oxe-dashboard.prompt.md +47 -47
- package/.github/prompts/oxe-debug.prompt.md +47 -47
- package/.github/prompts/oxe-discuss.prompt.md +47 -47
- package/.github/prompts/oxe-execute.prompt.md +52 -52
- package/.github/prompts/oxe-forensics.prompt.md +47 -47
- package/.github/prompts/oxe-help.prompt.md +46 -46
- package/.github/prompts/oxe-loop.prompt.md +47 -47
- package/.github/prompts/oxe-milestone.prompt.md +47 -47
- package/.github/prompts/oxe-next.prompt.md +46 -46
- package/.github/prompts/oxe-obs.prompt.md +47 -47
- package/.github/prompts/oxe-plan-agent.prompt.md +46 -46
- package/.github/prompts/oxe-plan.prompt.md +49 -49
- package/.github/prompts/oxe-project.prompt.md +47 -47
- package/.github/prompts/oxe-quick.prompt.md +49 -49
- package/.github/prompts/oxe-research.prompt.md +47 -47
- package/.github/prompts/oxe-retro.prompt.md +47 -47
- package/.github/prompts/oxe-review-pr.prompt.md +47 -47
- package/.github/prompts/oxe-route.prompt.md +47 -47
- package/.github/prompts/oxe-scan.prompt.md +47 -47
- package/.github/prompts/oxe-security.prompt.md +47 -47
- package/.github/prompts/oxe-session.prompt.md +47 -47
- package/.github/prompts/oxe-ship.prompt.md +47 -47
- package/.github/prompts/oxe-skill.prompt.md +47 -47
- package/.github/prompts/oxe-spec.prompt.md +49 -49
- package/.github/prompts/oxe-ui-review.prompt.md +47 -47
- package/.github/prompts/oxe-ui-spec.prompt.md +47 -47
- package/.github/prompts/oxe-update.prompt.md +46 -46
- package/.github/prompts/oxe-validate-gaps.prompt.md +47 -47
- package/.github/prompts/oxe-verify.prompt.md +50 -50
- package/.github/prompts/oxe-workstream.prompt.md +47 -47
- package/.github/prompts/oxe.prompt.md +51 -51
- package/.github/workflows/release.yml +31 -0
- package/CHANGELOG.md +88 -0
- package/README.md +1 -1
- package/bin/lib/commands/ops-commands.cjs +751 -0
- package/bin/lib/commands/spec-program-commands.cjs +337 -0
- package/bin/lib/operational/alm-refine-runtime.cjs +791 -0
- package/bin/lib/operational/child-env.cjs +52 -0
- package/bin/lib/operational/promote-runtime.cjs +1187 -0
- package/bin/lib/oxe-agent-coord.cjs +246 -0
- package/bin/lib/oxe-alm-refine.cjs +97 -1
- package/bin/lib/oxe-ci-adapter.cjs +304 -0
- package/bin/lib/oxe-complexity.cjs +1 -1
- package/bin/lib/oxe-decisions.cjs +9 -3
- package/bin/lib/oxe-dir-info.cjs +20 -1
- package/bin/lib/oxe-env-sanitize.cjs +6 -1
- package/bin/lib/oxe-git-root.cjs +97 -0
- package/bin/lib/oxe-grill.cjs +90 -1
- package/bin/lib/oxe-onboard.cjs +640 -0
- package/bin/lib/oxe-operational.cjs +14481 -15949
- package/bin/lib/oxe-origin.cjs +4 -1
- package/bin/lib/oxe-phase-gates.cjs +139 -2
- package/bin/lib/oxe-plan-build.cjs +62 -2
- package/bin/lib/oxe-plan-mutate.cjs +108 -2
- package/bin/lib/oxe-preflight.cjs +9 -3
- package/bin/lib/oxe-presets.cjs +216 -0
- package/bin/lib/oxe-project-env.cjs +79 -0
- package/bin/lib/oxe-project-health.cjs +2 -0
- package/bin/lib/oxe-reevaluate.cjs +198 -0
- package/bin/lib/oxe-release-ops.cjs +51 -15
- package/bin/lib/oxe-scorecard.cjs +394 -1
- package/bin/lib/oxe-ship-pr.cjs +72 -4
- package/bin/lib/oxe-spec-check.cjs +32 -0
- package/bin/lib/oxe-suite-impact.cjs +1160 -1145
- package/bin/lib/oxe-sync.cjs +99 -2
- package/bin/lib/oxe-verify-cache.cjs +132 -0
- package/bin/lib/oxe-vitest-batch.cjs +10 -3
- package/bin/lib/oxe-worktree-gc.cjs +655 -170
- package/bin/oxe-cc.js +10042 -10669
- package/commands/oxe/alm.md +54 -54
- package/commands/oxe/ask.md +55 -55
- package/commands/oxe/capabilities.md +50 -50
- package/commands/oxe/checkpoint.md +53 -53
- package/commands/oxe/compact.md +47 -47
- package/commands/oxe/dashboard.md +51 -51
- package/commands/oxe/debug.md +58 -58
- package/commands/oxe/discuss.md +58 -58
- package/commands/oxe/execute.md +63 -63
- package/commands/oxe/forensics.md +53 -53
- package/commands/oxe/help.md +48 -48
- package/commands/oxe/loop.md +54 -54
- package/commands/oxe/milestone.md +53 -53
- package/commands/oxe/next.md +49 -49
- package/commands/oxe/obs.md +53 -53
- package/commands/oxe/oxe.md +55 -55
- package/commands/oxe/plan-agent.md +57 -57
- package/commands/oxe/plan.md +59 -59
- package/commands/oxe/project.md +53 -53
- package/commands/oxe/quick.md +53 -53
- package/commands/oxe/research.md +53 -53
- package/commands/oxe/retro.md +53 -53
- package/commands/oxe/review-pr.md +53 -53
- package/commands/oxe/route.md +48 -48
- package/commands/oxe/scan.md +58 -58
- package/commands/oxe/security.md +53 -53
- package/commands/oxe/session.md +53 -53
- package/commands/oxe/ship.md +53 -53
- package/commands/oxe/skill.md +53 -53
- package/commands/oxe/spec.md +59 -59
- package/commands/oxe/ui-review.md +53 -53
- package/commands/oxe/ui-spec.md +53 -53
- package/commands/oxe/update.md +53 -53
- package/commands/oxe/validate-gaps.md +53 -53
- package/commands/oxe/verify-audit.md +50 -50
- package/commands/oxe/verify.md +60 -60
- package/commands/oxe/workflow-authoring.md +50 -50
- package/commands/oxe/workstream.md +53 -53
- package/docs/RELEASE-READINESS.md +7 -1
- package/docs/adr/D-1-isolamento-read-only-e-sanitizacao-centralizada-de-env-vars.md +29 -29
- package/docs/adr/D-2-junction-segura-de-node-modules-condicionada-a-sha-256-de-pa.md +29 -29
- package/docs/adr/D-3-preflight-local-5s-impacto-estatico-e2e-e-leitura-explicita.md +29 -29
- package/docs/adr/D-4-governanca-de-release-unificada-retomada-idempotente-pos-rei.md +29 -29
- package/docs/adr/D-5-core-agnostico-vs-presets-declarativos-de-dominio.md +29 -0
- package/docs/adr/D-6-decomposicao-strangler-fig-de-oxe-cc-e-oxe-operational.md +29 -0
- package/docs/adr/D-7-paridade-pre-push-com-phase-gates-path-aware-json-compacto-e.md +28 -0
- package/docs/adr/D-F1F4-1-paridade-pre-push-compactacao-json-sync-version-pins-e-quali.md +44 -0
- package/docs/adr/README.md +18 -14
- package/lib/runtime/verification/verification-compiler.d.ts +12 -1
- package/lib/runtime/verification/verification-compiler.js +235 -65
- package/oxe/templates/CONFIG.md +14 -1
- package/oxe/workflows/help.md +3 -0
- package/oxe/workflows/lean/execute.md +2 -1
- package/oxe/workflows/ship.md +4 -2
- package/package.json +4 -4
- package/packages/runtime/package.json +1 -1
- package/packages/runtime/src/verification/verification-compiler.ts +193 -25
- package/packages/runtime/tsconfig.json +1 -0
- package/vscode-extension/package.json +1 -1
|
@@ -70,6 +70,8 @@ export interface CheckResult {
|
|
|
70
70
|
evidence_refs?: string[];
|
|
71
71
|
/** Bench B55: the command already ran in this suite (same cwd/timeout); this check was judged on that output. */
|
|
72
72
|
reused_run?: boolean;
|
|
73
|
+
/** OXB-222-15: reused a verified passing result from the incremental fingerprint cache without re-running. */
|
|
74
|
+
cached?: boolean;
|
|
73
75
|
/** Why a check was skipped (`needs_structured_check` = criterion has no executable verification). */
|
|
74
76
|
skip_reason?: string | null;
|
|
75
77
|
/** OXB-072: killed by the check timeout (status `error`, never `fail`). */
|
|
@@ -165,7 +167,10 @@ export declare function compile(spec: ParsedSpecLike, plan: ParsedPlanLike): Acc
|
|
|
165
167
|
* Runs a check. A failure caused only by a test runner's per-test timeout (machine load, not the code: the same file
|
|
166
168
|
* passed alone in 4 s) is run once more by itself before it counts; both outcomes are kept.
|
|
167
169
|
*/
|
|
168
|
-
export declare function runCheck(check: AcceptanceCheck, cwd: string, timeoutMs?: number
|
|
170
|
+
export declare function runCheck(check: AcceptanceCheck, cwd: string, timeoutMs?: number, opts?: {
|
|
171
|
+
allowOxeRefs?: boolean;
|
|
172
|
+
useAsync?: boolean;
|
|
173
|
+
}): Promise<CheckResult>;
|
|
169
174
|
export declare function runSuite(suite: AcceptanceCheckSuite, cwd: string, timeoutMs?: number): Promise<CheckResult[]>;
|
|
170
175
|
export declare function executeSuite(suite: AcceptanceCheckSuite, cwd: string, options: {
|
|
171
176
|
timeoutMs?: number;
|
|
@@ -174,6 +179,9 @@ export declare function executeSuite(suite: AcceptanceCheckSuite, cwd: string, o
|
|
|
174
179
|
attemptNumber?: number;
|
|
175
180
|
evidenceStore?: EvidenceStore;
|
|
176
181
|
pluginRegistry?: PluginRegistry;
|
|
182
|
+
concurrency?: number;
|
|
183
|
+
allowOxeRefs?: boolean;
|
|
184
|
+
regressionCache?: Map<string, CheckResult>;
|
|
177
185
|
}): Promise<ExecutedVerificationSuite>;
|
|
178
186
|
export declare function summarizeSuite(results: CheckResult[]): {
|
|
179
187
|
total: number;
|
|
@@ -195,4 +203,7 @@ export declare function verifyRun(input: {
|
|
|
195
203
|
evidenceStore?: EvidenceStore;
|
|
196
204
|
attemptNumber?: number;
|
|
197
205
|
timeoutMs?: number;
|
|
206
|
+
concurrency?: number;
|
|
207
|
+
allowOxeRefs?: boolean;
|
|
208
|
+
regressionCache?: Map<string, CheckResult>;
|
|
198
209
|
}): Promise<VerifyRunResult>;
|
|
@@ -196,12 +196,12 @@ function compile(spec, plan) {
|
|
|
196
196
|
* Runs a check. A failure caused only by a test runner's per-test timeout (machine load, not the code: the same file
|
|
197
197
|
* passed alone in 4 s) is run once more by itself before it counts; both outcomes are kept.
|
|
198
198
|
*/
|
|
199
|
-
async function runCheck(check, cwd, timeoutMs = 60000) {
|
|
200
|
-
const first = await runCheckOnce(check, cwd, timeoutMs);
|
|
199
|
+
async function runCheck(check, cwd, timeoutMs = 60000, opts = {}) {
|
|
200
|
+
const first = await runCheckOnce(check, cwd, timeoutMs, opts);
|
|
201
201
|
if (first.status !== 'fail' || !(0, runner_timeout_1.isRunnerTimeoutOnly)(`${first.stdout}\n${first.stderr}`))
|
|
202
202
|
return first;
|
|
203
203
|
// the rerun is a real second run, never the memoized output of the first
|
|
204
|
-
const second = await runCheckOnce(check, cwd, timeoutMs, { fresh: true });
|
|
204
|
+
const second = await runCheckOnce(check, cwd, timeoutMs, { ...opts, fresh: true });
|
|
205
205
|
const stillTimeoutOnly = second.status === 'fail' && (0, runner_timeout_1.isRunnerTimeoutOnly)(`${second.stdout}\n${second.stderr}`);
|
|
206
206
|
return {
|
|
207
207
|
...second,
|
|
@@ -215,11 +215,86 @@ async function runCheck(check, cwd, timeoutMs = 60000) {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
let commandMemo = null;
|
|
218
|
+
let inFlightMemo = null;
|
|
218
219
|
function withCommandMemo(fn) {
|
|
219
220
|
if (commandMemo || process.env.OXE_VERIFY_NO_REUSE === '1')
|
|
220
221
|
return fn();
|
|
221
222
|
commandMemo = new Map();
|
|
222
|
-
|
|
223
|
+
inFlightMemo = new Map();
|
|
224
|
+
return fn().finally(() => {
|
|
225
|
+
commandMemo = null;
|
|
226
|
+
inFlightMemo = null;
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function spawnAsyncCommand(file, args, options) {
|
|
230
|
+
return new Promise((resolve) => {
|
|
231
|
+
const start = Date.now();
|
|
232
|
+
const child = (0, child_process_1.spawn)(file, args, {
|
|
233
|
+
cwd: options.cwd,
|
|
234
|
+
env: options.env,
|
|
235
|
+
windowsHide: true,
|
|
236
|
+
windowsVerbatimArguments: options.windowsVerbatimArguments,
|
|
237
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
238
|
+
});
|
|
239
|
+
const outChunks = [];
|
|
240
|
+
const errChunks = [];
|
|
241
|
+
let outLen = 0;
|
|
242
|
+
let errLen = 0;
|
|
243
|
+
let settled = false;
|
|
244
|
+
let timedOut = false;
|
|
245
|
+
const finish = (status, error) => {
|
|
246
|
+
if (settled)
|
|
247
|
+
return;
|
|
248
|
+
settled = true;
|
|
249
|
+
if (timer)
|
|
250
|
+
clearTimeout(timer);
|
|
251
|
+
resolve({
|
|
252
|
+
status,
|
|
253
|
+
stdout: Buffer.concat(outChunks),
|
|
254
|
+
stderr: Buffer.concat(errChunks),
|
|
255
|
+
error,
|
|
256
|
+
start,
|
|
257
|
+
duration_ms: Date.now() - start,
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
const timer = options.timeout > 0
|
|
261
|
+
? setTimeout(() => {
|
|
262
|
+
timedOut = true;
|
|
263
|
+
try {
|
|
264
|
+
child.kill('SIGTERM');
|
|
265
|
+
}
|
|
266
|
+
catch { /* ignore */ }
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
try {
|
|
269
|
+
child.kill('SIGKILL');
|
|
270
|
+
}
|
|
271
|
+
catch { /* ignore */ }
|
|
272
|
+
}, 1500).unref();
|
|
273
|
+
const err = Object.assign(new Error(`ETIMEDOUT after ${options.timeout}ms`), { code: 'ETIMEDOUT' });
|
|
274
|
+
finish(null, err);
|
|
275
|
+
}, options.timeout)
|
|
276
|
+
: null;
|
|
277
|
+
child.stdout?.on('data', (chunk) => {
|
|
278
|
+
if (outLen < options.maxBuffer) {
|
|
279
|
+
outChunks.push(chunk);
|
|
280
|
+
outLen += chunk.length;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
child.stderr?.on('data', (chunk) => {
|
|
284
|
+
if (errLen < options.maxBuffer) {
|
|
285
|
+
errChunks.push(chunk);
|
|
286
|
+
errLen += chunk.length;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
child.on('error', (err) => {
|
|
290
|
+
if (!timedOut)
|
|
291
|
+
finish(null, err);
|
|
292
|
+
});
|
|
293
|
+
child.on('close', (code) => {
|
|
294
|
+
if (!timedOut)
|
|
295
|
+
finish(code);
|
|
296
|
+
});
|
|
297
|
+
});
|
|
223
298
|
}
|
|
224
299
|
async function runCheckOnce(check, cwd, timeoutMs = 60000, opts = {}) {
|
|
225
300
|
if (typeof check.timeout_ms === 'number' && check.timeout_ms > 0)
|
|
@@ -253,7 +328,7 @@ async function runCheckOnce(check, cwd, timeoutMs = 60000, opts = {}) {
|
|
|
253
328
|
const exportsExpected = check.exports_expected ?? [];
|
|
254
329
|
if (contracted.length > 0 || exportsExpected.length > 0) {
|
|
255
330
|
const absent = contracted.filter((file) => !fs_1.default.existsSync(path_1.default.resolve(cwd, file)));
|
|
256
|
-
const leaks = absent.length > 0 ? [] : contracted.filter((file) => referencesOxeInternals(path_1.default.resolve(cwd, file)));
|
|
331
|
+
const leaks = (absent.length > 0 || opts.allowOxeRefs) ? [] : contracted.filter((file) => referencesOxeInternals(path_1.default.resolve(cwd, file)));
|
|
257
332
|
const exportOutcome = absent.length > 0 || leaks.length > 0
|
|
258
333
|
? { missing: [], unsupported: [] }
|
|
259
334
|
: (0, contract_exports_1.checkExpectedExports)(cwd, exportsExpected);
|
|
@@ -325,19 +400,43 @@ async function runCheckOnce(check, cwd, timeoutMs = 60000, opts = {}) {
|
|
|
325
400
|
result = cached;
|
|
326
401
|
start = cached.start;
|
|
327
402
|
}
|
|
403
|
+
else if (opts.useAsync && inFlightMemo && !opts.fresh && inFlightMemo.has(memoKey)) {
|
|
404
|
+
result = await inFlightMemo.get(memoKey);
|
|
405
|
+
start = result.start;
|
|
406
|
+
}
|
|
328
407
|
else {
|
|
329
408
|
// Use a shell so the full command string is interpreted (handles quotes, &&, node -e "...").
|
|
330
409
|
// The child never inherits node:test context: it would emit a serialized protocol, not TAP.
|
|
331
410
|
const shell = (0, shell_argv_1.shellInvocation)(check.command);
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
411
|
+
if (opts.useAsync) {
|
|
412
|
+
const promise = spawnAsyncCommand(shell.file, shell.args, {
|
|
413
|
+
cwd,
|
|
414
|
+
env: (0, shell_argv_1.childProcessEnv)(),
|
|
415
|
+
timeout: timeoutMs,
|
|
416
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
417
|
+
windowsVerbatimArguments: shell.windowsVerbatimArguments,
|
|
418
|
+
});
|
|
419
|
+
if (inFlightMemo && !opts.fresh)
|
|
420
|
+
inFlightMemo.set(memoKey, promise);
|
|
421
|
+
try {
|
|
422
|
+
result = await promise;
|
|
423
|
+
}
|
|
424
|
+
finally {
|
|
425
|
+
if (inFlightMemo)
|
|
426
|
+
inFlightMemo.delete(memoKey);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
const spawned = (0, child_process_1.spawnSync)(shell.file, shell.args, {
|
|
431
|
+
cwd,
|
|
432
|
+
env: (0, shell_argv_1.childProcessEnv)(),
|
|
433
|
+
timeout: timeoutMs,
|
|
434
|
+
// a Gradle/Android build prints a lot before and around the test lines: 2 MB cut it (ENOBUFS)
|
|
435
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
436
|
+
windowsVerbatimArguments: shell.windowsVerbatimArguments,
|
|
437
|
+
});
|
|
438
|
+
result = { status: spawned.status, stdout: spawned.stdout, stderr: spawned.stderr, error: spawned.error, start, duration_ms: Date.now() - start };
|
|
439
|
+
}
|
|
341
440
|
if (commandMemo)
|
|
342
441
|
commandMemo.set(memoKey, result);
|
|
343
442
|
}
|
|
@@ -428,64 +527,132 @@ async function runSuite(suite, cwd, timeoutMs = 60000) {
|
|
|
428
527
|
return results;
|
|
429
528
|
});
|
|
430
529
|
}
|
|
530
|
+
function frozenFilesIntact(check, cwd) {
|
|
531
|
+
const frozen = check.frozen_files ?? [];
|
|
532
|
+
if (frozen.length === 0)
|
|
533
|
+
return true;
|
|
534
|
+
for (const f of frozen) {
|
|
535
|
+
if (f.sha256 === null)
|
|
536
|
+
return false;
|
|
537
|
+
const abs = path_1.default.resolve(cwd, f.path);
|
|
538
|
+
if (!fs_1.default.existsSync(abs) || !frozenFileMatches(abs, f.sha256))
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
431
543
|
async function executeSuite(suite, cwd, options) {
|
|
432
|
-
const
|
|
433
|
-
const
|
|
544
|
+
const checks = suite.checks ?? [];
|
|
545
|
+
const results = new Array(checks.length);
|
|
546
|
+
const verificationResults = new Array(checks.length);
|
|
434
547
|
const evidenceRefs = new Map();
|
|
435
548
|
const timeoutMs = options.timeoutMs ?? 60000;
|
|
436
549
|
const attemptNumber = options.attemptNumber ?? 1;
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
550
|
+
const rawConcurrency = Number(options.concurrency ?? 1);
|
|
551
|
+
const concurrency = Number.isFinite(rawConcurrency) && rawConcurrency > 1
|
|
552
|
+
? Math.min(16, Math.floor(rawConcurrency))
|
|
553
|
+
: 1;
|
|
554
|
+
const runOne = async (idx) => {
|
|
555
|
+
const check = checks[idx];
|
|
556
|
+
const provider = options.pluginRegistry?.verifierProviderFor(check.type);
|
|
557
|
+
let result;
|
|
558
|
+
let verificationResult;
|
|
559
|
+
const cachedHit = !provider && options.regressionCache?.get(check.id);
|
|
560
|
+
if (cachedHit && cachedHit.status === 'pass' && frozenFilesIntact(check, cwd)) {
|
|
561
|
+
result = {
|
|
562
|
+
...cachedHit,
|
|
563
|
+
check_id: check.id,
|
|
564
|
+
acceptance_ref: check.acceptance_ref,
|
|
565
|
+
duration_ms: 0,
|
|
566
|
+
cached: true,
|
|
567
|
+
};
|
|
568
|
+
const collected = options.evidenceStore
|
|
569
|
+
? await collectCheckEvidence(options.evidenceStore, check, result, {
|
|
570
|
+
run_id: options.runId,
|
|
447
571
|
work_item_id: options.workItemId,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
572
|
+
attempt_number: attemptNumber,
|
|
573
|
+
})
|
|
574
|
+
: { refs: [], summaryRef: null };
|
|
575
|
+
result.evidence_refs = collected.refs;
|
|
576
|
+
result.summary_evidence_ref = collected.summaryRef;
|
|
577
|
+
verificationResult = {
|
|
578
|
+
verification_id: `vr-${crypto_1.default.randomBytes(4).toString('hex')}`,
|
|
579
|
+
work_item_id: options.workItemId,
|
|
580
|
+
check_id: check.id,
|
|
581
|
+
status: result.status,
|
|
582
|
+
evidence_refs: collected.refs,
|
|
583
|
+
summary: result.stdout || 'cached pass',
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
else if (provider) {
|
|
587
|
+
const providerResult = await provider.execute({
|
|
588
|
+
check_id: check.id,
|
|
589
|
+
check_type: check.type,
|
|
590
|
+
command: check.command,
|
|
591
|
+
work_item_id: options.workItemId,
|
|
592
|
+
workspace_root: cwd,
|
|
593
|
+
evidence_dir: '',
|
|
594
|
+
});
|
|
595
|
+
result = {
|
|
596
|
+
check_id: check.id,
|
|
597
|
+
acceptance_ref: check.acceptance_ref,
|
|
598
|
+
status: providerResult.status,
|
|
599
|
+
stdout: providerResult.summary ?? '',
|
|
600
|
+
stderr: '',
|
|
601
|
+
exit_code: providerResult.status === 'pass' ? 0 : 1,
|
|
602
|
+
duration_ms: 0,
|
|
603
|
+
error: providerResult.status === 'error' ? providerResult.summary ?? 'provider error' : null,
|
|
604
|
+
evidence_refs: providerResult.evidence_refs,
|
|
605
|
+
};
|
|
606
|
+
verificationResult = providerResult;
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
result = await runCheck(check, cwd, timeoutMs, {
|
|
610
|
+
allowOxeRefs: options.allowOxeRefs,
|
|
611
|
+
useAsync: concurrency > 1,
|
|
612
|
+
});
|
|
613
|
+
const collected = options.evidenceStore
|
|
614
|
+
? await collectCheckEvidence(options.evidenceStore, check, result, {
|
|
615
|
+
run_id: options.runId,
|
|
477
616
|
work_item_id: options.workItemId,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
617
|
+
attempt_number: attemptNumber,
|
|
618
|
+
})
|
|
619
|
+
: { refs: [], summaryRef: null };
|
|
620
|
+
result.evidence_refs = collected.refs;
|
|
621
|
+
result.summary_evidence_ref = collected.summaryRef;
|
|
622
|
+
verificationResult = {
|
|
623
|
+
verification_id: `vr-${crypto_1.default.randomBytes(4).toString('hex')}`,
|
|
624
|
+
work_item_id: options.workItemId,
|
|
625
|
+
check_id: check.id,
|
|
626
|
+
status: result.status,
|
|
627
|
+
evidence_refs: collected.refs,
|
|
628
|
+
summary: result.error || result.stderr || result.stdout || null,
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
if (result.evidence_refs && result.evidence_refs.length > 0) {
|
|
632
|
+
evidenceRefs.set(check.id, result.evidence_refs);
|
|
633
|
+
}
|
|
634
|
+
results[idx] = result;
|
|
635
|
+
verificationResults[idx] = verificationResult;
|
|
636
|
+
};
|
|
637
|
+
await withCommandMemo(async () => {
|
|
638
|
+
if (concurrency <= 1 || checks.length <= 1) {
|
|
639
|
+
for (let i = 0; i < checks.length; i += 1) {
|
|
640
|
+
await runOne(i);
|
|
486
641
|
}
|
|
487
|
-
|
|
488
|
-
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
let nextIdx = 0;
|
|
645
|
+
const workerCount = Math.min(concurrency, checks.length);
|
|
646
|
+
const worker = async () => {
|
|
647
|
+
while (true) {
|
|
648
|
+
const idx = nextIdx;
|
|
649
|
+
nextIdx += 1;
|
|
650
|
+
if (idx >= checks.length)
|
|
651
|
+
return;
|
|
652
|
+
await runOne(idx);
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
await Promise.all(Array.from({ length: workerCount }, () => worker()));
|
|
489
656
|
}
|
|
490
657
|
});
|
|
491
658
|
const manifest = (0, verification_manifest_1.buildManifest)(options.runId, results, {
|
|
@@ -537,6 +704,9 @@ async function verifyRun(input) {
|
|
|
537
704
|
attemptNumber: input.attemptNumber,
|
|
538
705
|
evidenceStore: input.evidenceStore,
|
|
539
706
|
pluginRegistry: input.pluginRegistry,
|
|
707
|
+
concurrency: input.concurrency,
|
|
708
|
+
allowOxeRefs: input.allowOxeRefs,
|
|
709
|
+
regressionCache: input.regressionCache,
|
|
540
710
|
});
|
|
541
711
|
(0, verification_manifest_1.saveManifest)(input.projectRoot, input.runId, executed.manifest);
|
|
542
712
|
(0, verification_manifest_1.saveRiskLedger)(input.projectRoot, input.runId, executed.risk_ledger);
|
package/oxe/templates/CONFIG.md
CHANGED
|
@@ -6,7 +6,8 @@ Copie `oxe/templates/config.template.json` para **`.oxe/config.json`** no seu pr
|
|
|
6
6
|
|
|
7
7
|
| Chave | Tipo | Significado |
|
|
8
8
|
|-------|------|-------------|
|
|
9
|
-
| `profile` | string | Profile de execução: `balanced` (padrão) \| `strict` \| `fast` \| `legacy`. Expande automaticamente outras keys — keys explícitas prevalecem. Ver tabela abaixo. |
|
|
9
|
+
| `profile` | string | Profile de execução: `balanced` (padrão) \| `strict` \| `fast` \| `legacy` \| `lean`. Expande automaticamente outras keys — keys explícitas prevalecem. Ver tabela abaixo. |
|
|
10
|
+
| `preset` / `presets` | string \| string[] | Preset(s) declarativo(s) de domínio (`cli`, `web`, `desktop-mobile`, `brand-strict`) resolvidos por `bin/lib/oxe-presets.cjs`. Chaves explícitas em `oxe.config.json`/`.oxe/config.json` sempre prevalecem sobre o preset. |
|
|
10
11
|
| `discuss_before_plan` | boolean | Se `true`, o fluxo recomenda **`oxe:discuss`** entre spec e plan. |
|
|
11
12
|
| `verification_depth` | string | Profundidade da verificação: `standard` (padrão) \| `thorough` (ativa Camada 5 — validate-gaps automático) \| `quick` (skip camadas 3–4 e UAT). |
|
|
12
13
|
| `plan_confidence_threshold` | number | Limiar mínimo de confiança para o `execute` aceitar um `PLAN.md`. Padrão canónico: `90`, com gate estrito (`Confiança` precisa ser **maior que** o limiar). Valores menores que 90 não reduzem esse gate. |
|
|
@@ -32,6 +33,7 @@ Copie `oxe/templates/config.template.json` para **`.oxe/config.json`** no seu pr
|
|
|
32
33
|
| `verify_timeout_ms` | number | Opcional (OXB-072). Limite por check no `runtime verify`; padrão 600000 (10 min). Um check que passa do limite sai como `error` com `timed_out`, não como FAIL. Um teste de aceite pode ter o próprio `timeout_ms` no PLAN.json. |
|
|
33
34
|
| `executor.scratch_ignore` | string[] \| false | Opcional (OXB-159). Arquivos de rascunho que uma tentativa deixa no repositório e que não contam como violação de escopo. São removidos quando a tentativa os criou (novos e não versionados). Padrão: `*.log` e `*.tsbuildinfo` na raiz (um glob sem `/` vale só para a raiz; `**` atravessa pastas). `false` desliga. Cada tarefa também tem `.oxe/tmp/<tarefa>/`, citada no prompt, que o git ignora e que é apagada quando a tarefa passa. |
|
|
34
35
|
| `worktree.copy_local` | string[] | Opcional (OXB-163). Arquivos locais da máquina, fora do git (ex.: `mobile/android/local.properties` com `sdk.dir`, `.env.local`), que uma worktree nova precisa para compilar. São copiados pelo `program init --from`, pela worktree temporária do `promote` e pelas worktrees do `--parallel-mutating`. Por padrão nada é copiado, porque um arquivo local pode ter segredos. Um arquivo versionado ou que já existe no destino nunca é sobrescrito. Aceita `*` e `**`. |
|
|
36
|
+
| `worktree.auto_gc` / `worktree.warn_above` / `worktree.hygiene` | string \| bool / number / bool | Opcional (OXB-222-13). Higiene operacional segura de worktrees: `worktree.auto_gc` controla o hook pós-close do `runtimeProgramClose` (`"warn"` padrão = apenas resumo read-only; `"prune"` = `git worktree prune`; `"apply"` = remove worktrees limpas e mergeadas protegendo destinos de junctions ativas `junction_target_in_use`; `false` = desligado). `worktree.warn_above` (padrão `5`) define o limiar de alerta no `doctor --project` e `onboard` (`worktree.hygiene: false` silencia). CLI: `oxe-cc gc-worktrees --merged [--include-nested] [--ignore-agent-settings] [--apply]`. |
|
|
35
37
|
| `executor.max_context_chars` / `executor.max_context_action` | number / string | Opcional (OxeChat F4 T12). Teto do contexto que uma tentativa acumula (caracteres). Passado o teto, o padrão `"warn"` registra uma vez (evento `ExecutorContextCap`) e segue; `"retry"` fecha a tentativa como "contexto cheio", e a próxima começa um contexto novo com o que ficou na árvore, dentro de `max_retries` (nunca uma tentativa a mais). Também aceita `execute.*`. |
|
|
36
38
|
| `executor.max_run_ms` | number | Opcional (OXB-165). Limite de duração do `runtime execute` inteiro, verificado entre ondas. Padrão: sem limite (a guarda de progresso parado já cobre travamentos). `--max-run-ms` tem precedência. |
|
|
37
39
|
| `checkpoint_check` | string | Opcional (OXB-170). Comando do projeto (ex.: `npm run typecheck`) que roda na árvore do **próprio** commit de checkpoint: uma worktree temporária com junction do node_modules, desfeito antes da remoção. Vermelho desfaz o commit, e a tarefa fica `checkpoint_failed` (não done). `checkpoint_check_timeout_ms` (padrão 900000). Desligado por padrão, porque custa um typecheck por tarefa. |
|
|
@@ -66,6 +68,11 @@ Copie `oxe/templates/config.template.json` para **`.oxe/config.json`** no seu pr
|
|
|
66
68
|
| `alm` | object | Opcional. ALM do projeto (Jira ou Azure DevOps); sem ele, o fluxo segue igual. Ver a seção abaixo. |
|
|
67
69
|
| `delivery` | string | object | Opcional. `"pr"` ou `{ "mode": "pr", "deploy_env": "staging" }`: depois do verify verde, o próximo passo guia a entrega (`/oxe-ship`: PR → CI/merge → deploy anexado → close). Sem ela, a fase fecha com o commit local do close, como antes. |
|
|
68
70
|
| `verify` | object | Opcional. `verify.remote` roda os checks pesados no CI do repositório (ver a seção abaixo); `verify.where` força onde roda cada check, critério ou tarefa (`{ "A7": "remote", "gate-lint": "local" }`). |
|
|
71
|
+
| `phase_gates` | array | Opcional. Gates de fase (`{ "id", "kind", "command", "paths" \| "globs" }`). Com `paths` ou `globs`, o gate só dispara quando o diff da fase toca algum padrão correspondente (com fallback seguro para rodar o gate quando não há base de diff); sem `paths`/`globs`, roda sempre. Também suporta gatilhos em `preflight.triggers`. |
|
|
72
|
+
| `sync.version_pins` | array | Opcional (OXB-222-03). Constantes de versão de schema atualizadas atomicamente pelo `oxe-cc sync` (e no `runtime promote`) junto com a renumeração de migrações SQLite: `[{ "file": "src/db/schema.ts", "pattern": "LATEST_DB_VERSION\\s*=\\s*(\\d+)", "source": "max_migration" }]`. |
|
|
73
|
+
| `stripEnvPrefixes` / `envSanitize` | array \| object | Opcional (OXB-G02 / OXB-222-09). Prefixos de variáveis de ambiente removidos de subprocessos do runtime (padrão `["OXESPACE_", "AI_MEMORY_"]`). `oxe-cc doctor --project` também alerta (sem bloquear) quando variáveis do shell atual coincidem com `stripEnvPrefixes`. |
|
|
74
|
+
| `grill` (CLI) | — | Fluxo guiado de descoberta: `oxe-cc grill import --from <briefing.md\|json>` importa fatos/perguntas/respostas em lote (mantendo confirmações abertas para o humano) e `oxe-cc grill promote --card <KEY>` promove um grill de `.oxe/alm/grill/` para `.oxe/grill/` para uso com `spec check`. |
|
|
75
|
+
| `onboard` (CLI) | — | `oxe-cc onboard [--json] [--write]`: gera dossiê 100% read-only e agnóstico de onboarding detectando stack, CI (GitHub Actions, GitLab CI, Azure Pipelines, Bitbucket, CircleCI, Jenkins ou local), ALM (Jira, Azure DevOps, custom ou sem ALM), `leaked_env` e lacunas entre CI e `phase_gates` locais. |
|
|
69
76
|
|
|
70
77
|
## ALM (`alm`): Jira ou Azure DevOps
|
|
71
78
|
|
|
@@ -140,6 +147,11 @@ Os checks pesados (e2e, build empacotado, Android) rodam no CI do repositório n
|
|
|
140
147
|
- **Espera leve e retomável:** sem `gh run watch` de longa duração. São consultas curtas (`poll_seconds`, padrão 30) com o estado em `.oxe/program/remote-verify.json`; o verify seguinte retoma o mesmo run. Com `detach: true`, o verify dispara o run e retorna na hora.
|
|
141
148
|
- **Trace da CI:** quando um job falha, os artefatos (`artifacts`, padrão `*trace*`, `*playwright-report*`, `*test-results*`, `*screenshot*`; `[]` desliga) são baixados para `.oxe/evidence/remote/`. Com `where: "both"`, o check roda aqui e na CI; vermelho só na CI vira `ci_only`, e a leitura certa é o trace da CI, não uma reprodução local.
|
|
142
149
|
- **`verify.min_free_mb`:** com menos memória livre que isso, nenhum check pesado roda na máquina. Ele vai para a CI quando há `verify.remote`; sem ela, fica como "não verificado (memória baixa)" e o verify termina parcial.
|
|
150
|
+
- **`verify.concurrency`:** número máximo de checks independentes executados em paralelo no `runtime verify` (padrão `1`; recomendado `4` em máquinas modernas), preservando ordem determinística dos resultados.
|
|
151
|
+
- **`verify.incremental_regression`:** quando `true`, ativa cache incremental seguro em `.oxe/runs/verify-regression-cache.json` por `(check_id, command, tree_fingerprint)` para reutilizar passes verdes válidos sem nunca cachear falhas ou testes adulterados.
|
|
152
|
+
- **`verify.allow_oxe_refs`:** quando `true`, desativa o falso positivo `oxe_internal_reference` em projetos que manipulam artefatos `.oxe/` (como o próprio `oxe-build`).
|
|
153
|
+
- **`ci.provider`:** opcional (`"github"` | `"gitlab"` | `"azure-devops"` | `"local"`) para o `CiAdapter` usado por `ship` e `release`; quando omitido, é detectado automaticamente pelo remote git e pelos arquivos de pipeline com fallback `"local"` offline.
|
|
154
|
+
- **`oxe-cc onboard --propose-config [--apply]`:** traduz pipelines detectados (GitHub Actions, GitLab CI, Azure Pipelines, Bitbucket, CircleCI, Jenkins) em proposta declarativa de `phase_gates`, `profile: "lean"` e `worktree.auto_gc` (`--dry-run` padrão, `--apply` mescla sem sobrescrever chaves do usuário).
|
|
143
155
|
|
|
144
156
|
## Retomada automática do execute (`autoresume`)
|
|
145
157
|
|
|
@@ -189,6 +201,7 @@ Regra: nada chega a um PR sem vir do `oxe-cc runtime execute` (trailer `OXE-Task
|
|
|
189
201
|
| `commit_msg` | o hook `commit-msg` do `oxe-cc guards install`: `require` (padrão) recusa commit sem origem; `append` só avisa; `off` desliga. Com um quick aberto, o hook acrescenta os trailers dele |
|
|
190
202
|
| `exempt.authored` | um autor isento só nos caminhos dele: `[{ "author": "github-actions[bot]", "paths": ["<pasta das goldens>/"] }]`. É o bot que regrava as goldens, e o mesmo bot em outro caminho é recusado |
|
|
191
203
|
| `require_card` | o commit de quick precisa de `OXE-Card` (padrão: `true` quando há ALM) |
|
|
204
|
+
| `allow_no_alm_quick` | permite commits de quick (`OXE-Quick`) sem `OXE-Card` mesmo com ALM configurado (nunca isenta commits comuns sem trailer) |
|
|
192
205
|
| `base` | a base do `oxe-cc ship check-origin` sem argumento (padrão `origin/main`) |
|
|
193
206
|
| `since` | o corte: um commit (SHA) ou uma data. É histórico, e não é cobrado, o que já está no commit de corte, o que tem data anterior à dele ou, com uma data, o que é anterior a ela |
|
|
194
207
|
| `exempt.commits` | isenção pontual: `[{ "sha": "<40 hex>", "reason": "…", "by": "<papel>" }]`. Toda isenção usada aparece no relatório; uma entrada sem SHA completo, reason ou by é recusada e o check-origin sai com 1. O caminho normal continua sendo o trailer |
|
package/oxe/workflows/help.md
CHANGED
|
@@ -77,6 +77,9 @@ Estes são os únicos comandos que você precisa conhecer para seguir o framewor
|
|
|
77
77
|
/oxe-capabilities → listar, instalar, remover ou atualizar capabilities nativas do projeto
|
|
78
78
|
/oxe-skill → descobrir, invocar e gerenciar skills OXE via @<id>
|
|
79
79
|
/oxe-alm → configurar e operar o ALM (Jira / Azure DevOps, por REST ou MCP)
|
|
80
|
+
oxe-cc onboard → dossiê 100% read-only e agnóstico (multi-CI, multi-ALM, ambiente e lacunas de gates) para novos agentes/devs (`--json`, `--write`, `--propose-config [--apply]`)
|
|
81
|
+
oxe-cc agents → coordenação multi-agente local entre worktrees (`register|heartbeat|release|list|collisions|send|inbox` via `<git-common-dir>/oxe/`)
|
|
82
|
+
oxe-cc reevaluate → reavalia tarefas pendentes do `PLAN.json` contra commits novos na base (`no_impact` | `mechanical_sync` | `contract_drift`)
|
|
80
83
|
oxe-cc azure → autenticar, sincronizar inventário e operar Azure com checkpoint formal
|
|
81
84
|
```
|
|
82
85
|
|
|
@@ -14,7 +14,8 @@ Levar a fase ativa do plano ao fechamento **numa sessão só**: implementar cada
|
|
|
14
14
|
<context>
|
|
15
15
|
- Fonte: `.oxe/PLAN.json` (tarefas, ondas, `files`, `verify.commands`) e os testes de aceite congelados que cada tarefa cita. Leia o código que a tarefa toca; nada de leitura ampla.
|
|
16
16
|
- **Teste de aceite congelado não se edita.** Se um deles estiver errado (contradiz a SPEC ou outro teste), pare e relate: a saída é `oxe-cc plan amend-test <arquivo> --reason "<CR>"`, com o OK do usuário. Nunca enfraqueça, pule ou reescreva um teste para passar.
|
|
17
|
-
- Fique dentro de `files` da tarefa. Precisa de um arquivo a mais:
|
|
17
|
+
- Fique dentro de `files` da tarefa. Precisa de um arquivo a mais (ex.: fix de CI ou cobertura): use `oxe-cc plan scope add T<n> <arquivo> --auto-cr --reason "<motivo>"` (atualiza `PLAN.json` + `IMPLEMENTATION-PACK.json` atomicamente e registra o CR auditável), em vez de editar os JSONs à mão, e diga isso no resumo.
|
|
18
|
+
- Saídas `--json` (`runtime verify --json`, `plan lint --json`, `status --json`) são compactas por padrão (`< 4 KB`) para preservar contexto; o relatório completo do verify fica gravado em `.oxe/runs/<run_id>/verify-full.json` e `--full` devolve o payload completo quando necessário.
|
|
18
19
|
- Testes além dos congelados: só o que eles não cobrem (borda interna, erro de infraestrutura). Não duplique em teste de unidade o que o teste de aceite já afirma.
|
|
19
20
|
- Use `oxe-cc`, nunca `npx oxe-cc`. Sign-off e aprovação são do usuário: nunca rode `runtime signoff`, `spec approve` ou `decision confirm` em nome dele.
|
|
20
21
|
- Exceções também são do usuário: nunca passe `--accept-drift`, `--defer-signoff`, `--accept-unpromoted`, `--no-rollback-check`, `--allow-dirty` ou `--force` por conta própria. Se o `phase close` pedir uma delas, pare e mostre o motivo.
|
package/oxe/workflows/ship.md
CHANGED
|
@@ -32,7 +32,7 @@ Levar o trabalho verificado até produção, um passo verde por vez: **PR → CI
|
|
|
32
32
|
3. `git status --short`: mudança fora do escopo do plano para a entrega e vira pergunta ao usuário.
|
|
33
33
|
|
|
34
34
|
### Passo 1 — PR
|
|
35
|
-
- Para cada tarefa de um plano (`PLAN.json`) a promover: `oxe-cc runtime promote T<n> --base main --open-pr`. O título leva a chave do ALM, e o PR roda as checagens de integração.
|
|
35
|
+
- Para cada tarefa de um plano (`PLAN.json`) a promover: `oxe-cc runtime promote T<n> --base main --open-pr`. O título leva a chave do ALM, e o PR roda as checagens de integração. Quando há colisão de migrações sequenciais ou pinos de versão declarados em `sync.version_pins`, o promote dispara `oxe-cc sync` (também executável manualmente com `oxe-cc sync --apply`) para renumerar e sincronizar os pinos atomicamente antes do push.
|
|
36
36
|
- Para entregar um **`/oxe-quick`** (sem `PLAN.json`): `oxe-cc quick promote --open-pr` (use `--dry-run` para revisar antes; base: `--base <branch>`, `delivery.base` ou o padrão do remoto; numa branch ≠ base). O PR do quick segue o Passo 2 (CI e merge em `oxe-cc ship status`) antes de fechar. Ele roda `ship check-origin`, faz push da branch atual e abre o PR já com `Fecha <KEY>` (quando houver card ALM) e o resumo de verificação no corpo.
|
|
37
37
|
- Mostre a URL. A falha de promoção vem com o motivo: corrija e promova de novo; não force.
|
|
38
38
|
|
|
@@ -44,7 +44,8 @@ Levar o trabalho verificado até produção, um passo verde por vez: **PR → CI
|
|
|
44
44
|
- PR fora de fase, de um card ou o repositório inteiro: `oxe-cc ship status --pr <n>` · `--card <KEY>` · `--repo` (com os rótulos do trem); `--comment --apply` põe o veredito no PR, onde o trem e a CI leem.
|
|
45
45
|
- Antes do merge: `oxe-cc ship check-origin <#PR>`. Todo commit vem do `runtime execute` (`OXE-Task`) ou de um quick registrado (`OXE-Quick`); as isenções são só as de `origin.exempt`.
|
|
46
46
|
- O merge é do usuário ou do trem de merge do repositório. O OXE detecta o merge (`gh pr view`) e registra.
|
|
47
|
-
- Fase com CI exigido no close: `oxe-cc runtime ci --attach <run> --head <sha>`.
|
|
47
|
+
- Fase com CI exigido no close: `oxe-cc runtime ci --attach <run> --head <sha>`. Para medir retrabalho pós-verify, taxa de CI verde de primeira e roteamento empírico de modelos offline a partir dos registros locais, rode `oxe-cc runtime scorecard --with-ci --with-routing [--json]`.
|
|
48
|
+
- Provedores de CI/VCS: `ship status` e `release` usam o `CiAdapter` provider-agnóstico (`github`/`gh`, `gitlab`/`glab`, `azure-devops`/`az` ou `local` 100% offline). Quando novos commits pousam na base durante uma fase longa, rode `oxe-cc reevaluate --against <ref> --json` para classificar tarefas pendentes em `no_impact`, `mechanical_sync` ou `contract_drift`.
|
|
48
49
|
|
|
49
50
|
### Passo 3 — Deploy
|
|
50
51
|
- Depois do merge, e quando houver ambiente: `oxe-cc runtime deploy --attach <env> --version <v> --ref <tag|url> --check "<smoke>"`. Isso só registra e roda as checagens pós-deploy; o deploy em si é de quem é dono.
|
|
@@ -54,6 +55,7 @@ Levar o trabalho verificado até produção, um passo verde por vez: **PR → CI
|
|
|
54
55
|
2. **Com programa:** `oxe-cc runtime program close`: regressão congelada, contratos e commit da fase (exige `--by <papel> --reason "…"` quando combinado com `--by-ci`, `--no-rollback-check` ou `--accept-drift`). Num branch com PR aberto, o close não commita (use um branch separado ou `--force-branch`).
|
|
55
56
|
**Sem programa:** não há `program close`. Com o merge registrado (e o deploy anexado, quando houver ambiente), o ciclo está fechado; atualize `STATE.md` com a entrega (PR, merge, deploy).
|
|
56
57
|
3. Com ALM: `oxe-cc alm sync --apply`, que leva os itens a "lançado".
|
|
58
|
+
4. **Higiene de worktrees:** o `program close` avalia `worktree.auto_gc` (`"warn"` por padrão; `"prune"` ou `"apply"` opt-in em `.oxe/config.json`). Quando houver worktrees antigos ou `.claude/worktrees/` acumulados, limpe com segurança via `oxe-cc gc-worktrees --merged --apply` (ou `--include-nested --ignore-agent-settings --apply`) — destinos de junctions ativas são protegidos automaticamente (`junction_target_in_use`).
|
|
57
59
|
|
|
58
60
|
### Passo X — Defeito depois da entrega (`--defect`)
|
|
59
61
|
1. Pergunte a reprodução, o impacto e o critério ou a história de origem (uma pergunta por vez, com a recomendada).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxe-cc",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "OXE — spec-driven workflows in .oxe/ with runtime enterprise, evidence-first verification and multi-runtime integrations (npx)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -124,11 +124,11 @@
|
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"c8": "^11.0.0",
|
|
126
126
|
"eslint": "^9.31.0",
|
|
127
|
-
"globals": "^15.
|
|
127
|
+
"globals": "^15.15.0",
|
|
128
128
|
"typescript": "^5.9.3"
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@types/node": "^18.19.
|
|
132
|
-
"semver": "^7.
|
|
131
|
+
"@types/node": "^18.19.130",
|
|
132
|
+
"semver": "^7.8.6"
|
|
133
133
|
}
|
|
134
134
|
}
|