@outerlayer/cli 0.37.0-next.20261104205100 → 0.37.0-next.20261105001951
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/dist/build-info.json +1 -1
- package/dist/{check-VOJWXIRZ.js → check-WG7ONVYM.js} +6 -6
- package/dist/{chunk-3Z5GISKU.js → chunk-4E3ALN2D.js} +111 -12
- package/dist/{chunk-W6GP4CNN.js → chunk-7UG2MMFU.js} +1 -1
- package/dist/{chunk-LLZG5A2J.js → chunk-ICLXEZEB.js} +1 -1
- package/dist/{chunk-VNMTA2JE.js → chunk-MIJGB43I.js} +1 -1
- package/dist/{chunk-SQWYFCEU.js → chunk-NQPQH6Y5.js} +1 -1
- package/dist/{chunk-TSYTPW6Y.js → chunk-RTNUZPAC.js} +2 -3
- package/dist/{chunk-ERGU3OZP.js → chunk-WLALSXAN.js} +5 -5
- package/dist/{chunk-FX4ZG4E5.js → chunk-WRFUGRUX.js} +1 -1
- package/dist/{cli-FFPFIMPZ.js → cli-42G6B7EO.js} +28 -25
- package/dist/{command-MYYGFCW3.js → command-5GGBCD4S.js} +3 -3
- package/dist/{container-start-ICNSSPBS.js → container-start-45TQNJQE.js} +4 -4
- package/dist/{doctor-LEGPWSQ3.js → doctor-GFROWFS3.js} +4 -4
- package/dist/{host-checks-VGJVO23Y.js → host-checks-KDJZIFBQ.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{init-F3L4CTBJ.js → init-QBWRPNZP.js} +2 -2
- package/dist/{init-Z6ZVLUJ5.js → init-V45VLEQO.js} +2 -2
- package/dist/{init-agent-DO233UTF.js → init-agent-2XMCGKPV.js} +2 -2
- package/dist/{init-cmd-AKIPYTNP.js → init-cmd-JY2UXAYR.js} +1 -1
- package/dist/{loop-MUPQOIW6.js → loop-V5ZC753N.js} +6 -6
- package/dist/{machine-WFZ5KM76.js → machine-4M4RUHG2.js} +2 -2
- package/dist/{runner-key-2SKLS37E.js → runner-key-OS7EKYZS.js} +2 -2
- package/dist/{status-WZCEHCL2.js → status-ODVVTDA2.js} +2 -2
- package/dist/{update-steps-5BGDQTVG.js → update-steps-ZW2EDSYC.js} +3 -3
- package/dist/{work-proofs-cmd-P33QGSIQ.js → work-proofs-cmd-DDVTBWPI.js} +2 -2
- package/dist/{work-proofs-record-FN6M7BIZ.js → work-proofs-record-W45UBFHM.js} +66 -8
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +26 -12
- package/skill-pack/maintained/outerlayer-build/references/evidence.md +8 -5
- package/skill-pack/maintained/outerlayer-cli/references/merge-base-branch.md +23 -11
- package/dist/{chunk-6SC66WGJ.js → chunk-BNYBHWYH.js} +172 -172
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { RunnerStartError, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-
|
|
3
|
+
export { RunnerStartError, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-WLALSXAN.js';
|
|
4
4
|
import './chunk-PNZN656P.js';
|
|
5
5
|
import './chunk-2QFRAMJX.js';
|
|
6
6
|
import './chunk-LVZ3UV7T.js';
|
|
7
7
|
import './chunk-3JVYMD4G.js';
|
|
8
8
|
import './chunk-E7R2GIAW.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import './chunk-7UG2MMFU.js';
|
|
10
|
+
import './chunk-NQPQH6Y5.js';
|
|
11
11
|
import './chunk-IDYLPN4X.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-ICLXEZEB.js';
|
|
13
13
|
import './chunk-IJU6DMQA.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-RTNUZPAC.js';
|
|
15
|
+
import './chunk-BNYBHWYH.js';
|
|
16
16
|
import './chunk-2PGI6RDE.js';
|
|
17
17
|
import './chunk-I3LTIAOR.js';
|
|
18
18
|
import './chunk-ZHOPDD7U.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-RTNUZPAC.js';
|
|
4
|
+
import './chunk-BNYBHWYH.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.js';
|
|
7
7
|
import './chunk-ZHOPDD7U.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { readConfigObject, RunnerInitError } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { readConfigObject, RunnerInitError } from './chunk-RTNUZPAC.js';
|
|
4
|
+
import './chunk-BNYBHWYH.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.js';
|
|
7
7
|
import './chunk-ZHOPDD7U.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-RTNUZPAC.js';
|
|
4
|
+
import './chunk-BNYBHWYH.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.js';
|
|
7
7
|
import './chunk-ZHOPDD7U.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-NQPQH6Y5.js';
|
|
4
|
+
import './chunk-RTNUZPAC.js';
|
|
5
|
+
import './chunk-BNYBHWYH.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
7
7
|
import './chunk-I3LTIAOR.js';
|
|
8
8
|
import './chunk-ZHOPDD7U.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-4E3ALN2D.js';
|
|
4
|
+
import './chunk-BNYBHWYH.js';
|
|
5
5
|
import './chunk-6BS4DDCY.js';
|
|
6
6
|
import './chunk-6MWBZHBW.js';
|
|
7
7
|
import './chunk-GBCQ3KHH.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, classifyProofsAt, runWorkProofs, proofsCommentId, kindProblem, proofsCommentBody } from './chunk-
|
|
3
|
+
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, proofsCommentBody } from './chunk-4E3ALN2D.js';
|
|
4
4
|
import { runEmitDemo } from './chunk-RFCAK6OI.js';
|
|
5
5
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
6
6
|
import { runWorkComment } from './chunk-2LXO2YIW.js';
|
|
7
7
|
import { runEmitArtifact } from './chunk-HN76DIHX.js';
|
|
8
|
-
import { runnerMatcher } from './chunk-
|
|
8
|
+
import { runnerMatcher } from './chunk-BNYBHWYH.js';
|
|
9
9
|
import './chunk-2PGI6RDE.js';
|
|
10
10
|
import { runSync } from './chunk-KCNL7KX2.js';
|
|
11
11
|
import './chunk-ZRITZJ36.js';
|
|
@@ -49,7 +49,7 @@ import { resolveRepoIdentity } from './chunk-ZQNYV4OZ.js';
|
|
|
49
49
|
import { ARTIFACT_MAX_CAPTION_LENGTH } from './chunk-2JIGPSVF.js';
|
|
50
50
|
import './chunk-Z5GEFMRW.js';
|
|
51
51
|
import { spawnSync, spawn } from 'child_process';
|
|
52
|
-
import { mkdtempSync, rmSync, openSync, closeSync, readdirSync, readFileSync } from 'fs';
|
|
52
|
+
import { mkdtempSync, writeFileSync, rmSync, openSync, closeSync, readdirSync, readFileSync } from 'fs';
|
|
53
53
|
import { tmpdir } from 'os';
|
|
54
54
|
import { join } from 'path';
|
|
55
55
|
|
|
@@ -245,7 +245,8 @@ async function runWorkProofsRecord(opts) {
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
const heads = /* @__PURE__ */ new Set([head.toLowerCase(), ...otherPullRequestHeads(body.pullRequests ?? [], ownPr, identity.gitRepo)]);
|
|
248
|
-
const
|
|
248
|
+
const recordsTests = body.criteria?.testProofsReported === true && await testProofMode(cwd) === "any";
|
|
249
|
+
const states = classifyProofsAt(body, heads, { tests: recordsTests });
|
|
249
250
|
const todo = states.filter((state) => state.state !== "current").map((state) => state.id);
|
|
250
251
|
if (todo.length === 0) {
|
|
251
252
|
const closing2 = await runWorkProofs({ ...opts, item, env, quiet: true, checkoutHead: head, fetchImpl });
|
|
@@ -267,9 +268,31 @@ async function runWorkProofsRecord(opts) {
|
|
|
267
268
|
const proofOf = (id) => declared.get(id).proof;
|
|
268
269
|
const reasons = /* @__PURE__ */ new Map();
|
|
269
270
|
const emitted = /* @__PURE__ */ new Map();
|
|
270
|
-
const
|
|
271
|
+
const testIds = todo.filter((id) => proofOf(id) === "test");
|
|
272
|
+
const testsOf = /* @__PURE__ */ new Map();
|
|
273
|
+
const matchesRunner = runnerMatcher(config.runners);
|
|
274
|
+
const found = discoverTestFiles(root, todo.filter((id) => proofOf(id) !== "test"), config.runners);
|
|
275
|
+
for (const id of testIds) {
|
|
276
|
+
const tests = declared.get(id).newestProof?.tests;
|
|
277
|
+
if (tests === void 0) {
|
|
278
|
+
reasons.set(id, "no earlier results were recorded for it, so there is no test to run again. Run its tests and emit the results with --for, naming each test with --test <name>=<path>:<line>");
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
const files = testFilesOf(tests);
|
|
282
|
+
if (files.length === 0) {
|
|
283
|
+
reasons.set(id, "its earlier results name no test file, so there is no test to run again. Emit the results again naming each test with --test <name>=<path>:<line>");
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
const unmatched = files.filter((file) => matchesRunner(file) === void 0);
|
|
287
|
+
if (unmatched.length > 0) {
|
|
288
|
+
reasons.set(id, `no runner in ${CONFIG_FILE} matches ${unmatched.join(", ")}`);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
testsOf.set(id, tests);
|
|
292
|
+
found.set(id, files);
|
|
293
|
+
}
|
|
271
294
|
for (const id of todo) {
|
|
272
|
-
if (!found.has(id)) reasons.set(id, NO_TEST);
|
|
295
|
+
if (!found.has(id) && !reasons.has(id)) reasons.set(id, NO_TEST);
|
|
273
296
|
}
|
|
274
297
|
const plan = planRuns([...new Set([...found.values()].flat())], config.runners);
|
|
275
298
|
const logDir = mkdtempSync(join(tmpdir(), "outerlayer-proofs-"));
|
|
@@ -333,13 +356,15 @@ async function runWorkProofsRecord(opts) {
|
|
|
333
356
|
}
|
|
334
357
|
const proofOut = mkdtempSync(join(tmpdir(), "outerlayer-proof-out-"));
|
|
335
358
|
proofOuts.push(proofOut);
|
|
359
|
+
const startedMs = Date.now() - 1e3;
|
|
336
360
|
const result = await runCommand(fillFiles(runner.command, files), { cwd: root, env: { ...baseEnv, OUTERLAYER_PROOF_OUT: proofOut }, timeoutMs, logDir, groups });
|
|
361
|
+
const results = freshXmlFiles([proofOut, root], startedMs);
|
|
337
362
|
const failure = result.timedOut ? `the runner for ${runner.files} timed out after ${Math.round(timeoutMs / 1e3)} s` : result.status === 0 ? void 0 : `the runner for ${runner.files} exited with status ${result.status}`;
|
|
338
363
|
if (failure !== void 0) {
|
|
339
364
|
say(failure);
|
|
340
365
|
if (result.tail !== "") say(result.tail);
|
|
341
366
|
}
|
|
342
|
-
runs.push({ glob: runner.files, proofOut, criteria, failure, tail: result.tail });
|
|
367
|
+
runs.push({ glob: runner.files, proofOut, criteria, failure, tail: result.tail, results });
|
|
343
368
|
}
|
|
344
369
|
} finally {
|
|
345
370
|
if (setupStarted) {
|
|
@@ -376,10 +401,43 @@ async function runWorkProofsRecord(opts) {
|
|
|
376
401
|
for (const id of chapterCriteria(manifests[0])) chapters.add(id);
|
|
377
402
|
await recordDemo(manifests[0], chapters);
|
|
378
403
|
}
|
|
404
|
+
for (const [id, tests] of testsOf) {
|
|
405
|
+
const ran = runs.filter((run) => run.criteria.includes(id));
|
|
406
|
+
if (ran.length === 0) continue;
|
|
407
|
+
const fail = (reason) => {
|
|
408
|
+
reasons.set(id, reason);
|
|
409
|
+
say(`Not recorded, ${id}: ${reason}`);
|
|
410
|
+
};
|
|
411
|
+
const joined = joinResults([...new Set(ran.flatMap((run) => run.results))], new Set(tests.items.map((test) => test.name)), root);
|
|
412
|
+
if (!joined.ok) {
|
|
413
|
+
const failed = ran.find((run) => run.failure !== void 0)?.failure;
|
|
414
|
+
fail(failed === void 0 ? joined.reason : `${failed}, and ${joined.reason}`);
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
const resultsFile = join(logDir, `${id}.xml`);
|
|
418
|
+
writeFileSync(resultsFile, joined.xml);
|
|
419
|
+
try {
|
|
420
|
+
const caption = (declared.get(id).text ?? `Test results for ${id}`).slice(0, ARTIFACT_MAX_CAPTION_LENGTH);
|
|
421
|
+
const before = spooledCount;
|
|
422
|
+
const selectors = testSelectors(tests);
|
|
423
|
+
const result = await emitArtifact({ ...common, file: resultsFile, caption, criterionId: id, ...selectors.length > 0 ? { tests: selectors } : {}, ...ownPr === void 0 ? {} : { pr: ownPr } });
|
|
424
|
+
const artifactId = result.record?.artifactId ?? result.data?.clientArtifactId;
|
|
425
|
+
if (artifactId === void 0) {
|
|
426
|
+
fail("the upload returned no artifact id");
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
emitted.set(id, artifactId);
|
|
430
|
+
if (spooledCount > before) spooledCriteria.add(id);
|
|
431
|
+
say(`Ran again for ${id}: ${joined.files.join(", ")}`);
|
|
432
|
+
} catch (err) {
|
|
433
|
+
fail(`the upload failed: ${oneLine(String(err instanceof Error ? err.message : err))}`);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
379
436
|
for (const run of runs) {
|
|
380
437
|
const names = topLevelFiles(run.proofOut);
|
|
381
438
|
for (const name of names) {
|
|
382
439
|
const id = proofFileCriterion(name, new Set(declared.keys()));
|
|
440
|
+
if (id === void 0 && name.endsWith(".xml") && testIds.length > 0) continue;
|
|
383
441
|
if (id === void 0) {
|
|
384
442
|
say(`Ignored ${name}: its name is not the id of a declared criterion.`);
|
|
385
443
|
continue;
|
|
@@ -491,7 +549,7 @@ async function runWorkProofsRecord(opts) {
|
|
|
491
549
|
let finalStates = states;
|
|
492
550
|
try {
|
|
493
551
|
const { data: fresh } = await getJson(creds.url, `/v1/work-items/${item}`, creds.apiKey, creds.appId, fetchImpl);
|
|
494
|
-
finalStates = classifyProofsAt(fresh, heads);
|
|
552
|
+
finalStates = classifyProofsAt(fresh, heads, { tests: recordsTests });
|
|
495
553
|
} catch (err) {
|
|
496
554
|
say(`The item could not be read again, so the list below may be out of date: ${oneLine(String(err instanceof Error ? err.message : err))}`);
|
|
497
555
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outerlayer/cli",
|
|
3
|
-
"version": "0.37.0-next.
|
|
3
|
+
"version": "0.37.0-next.20261105001951",
|
|
4
4
|
"description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Magu Studios, Inc.",
|
|
@@ -229,11 +229,14 @@ before the push.
|
|
|
229
229
|
pull request, and the factory host starts a run that fixes a check that
|
|
230
230
|
fails there. Run here, they hold the push for up to an hour while the base
|
|
231
231
|
branch moves.
|
|
232
|
-
5. Check for a conflict with the base branch
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
6.
|
|
232
|
+
5. Check for a conflict with the base branch and push, in the one command
|
|
233
|
+
`.outerlayer/skills/outerlayer-cli/references/merge-base-branch.md`
|
|
234
|
+
gives. The push runs only when the merge is clean. Never push in a
|
|
235
|
+
separate command.
|
|
236
|
+
6. When that command did not push because the branch conflicts, merge the
|
|
237
|
+
base branch as merge-base-branch.md says. Resolve every conflict on the
|
|
238
|
+
branch, never in a web editor. Gate the merge's diff, then push. The hooks
|
|
239
|
+
run, and you never bypass them.
|
|
237
240
|
|
|
238
241
|
A check that fails is a red gate, and you never push over it.
|
|
239
242
|
|
|
@@ -310,16 +313,27 @@ each proof that is not current, and runs them.
|
|
|
310
313
|
kind the criterion declares. The test writes outside the repository, so there is
|
|
311
314
|
nothing to ignore or commit.
|
|
312
315
|
- A `test` proof is a JUnit XML file of test results, bound to the criterion.
|
|
313
|
-
|
|
314
|
-
|
|
316
|
+
Record it yourself the first time, unless the policy file sets
|
|
317
|
+
`criteria.test_proof: ci`. CI then records it. Run the repository's test
|
|
315
318
|
command with its JUnit reporter, such as
|
|
316
319
|
`vitest run --reporter=junit --outputFile=<file>`, `pytest --junitxml=<file>`
|
|
317
320
|
or `node --test --test-reporter=junit --test-reporter-destination=<file>`.
|
|
318
|
-
|
|
321
|
+
Maven and Gradle write it themselves. Then run
|
|
319
322
|
`outerlayer emit artifact <file> --caption "<one sentence>" --for <criterion id>`.
|
|
320
|
-
Add `--test "<test name>"` for each test that proves the
|
|
321
|
-
criterion is
|
|
322
|
-
|
|
323
|
+
Add `--test "<test name>=<path>:<line>"` for each test that proves the
|
|
324
|
+
criterion. The path is the test file from the repository root, and the line
|
|
325
|
+
is where the test starts. Results from several test classes go in one file
|
|
326
|
+
under one `<testsuites>` element.
|
|
327
|
+
- From then on, `--record` and the host run those tests again at each new head,
|
|
328
|
+
through the runner whose `files` glob matches the test file. So make sure
|
|
329
|
+
such a runner exists, passes `{files}` to the test command, and that the test
|
|
330
|
+
tool writes JUnit XML: into `$OUTERLAYER_PROOF_OUT`, or where it writes by
|
|
331
|
+
default. A Maven runner, for example:
|
|
332
|
+
|
|
333
|
+
```yaml
|
|
334
|
+
- files: "apps/api/src/test/java/**/*Test.java"
|
|
335
|
+
command: 'cd apps/api && ./mvnw -q test -Dtest="$(for f in {files}; do basename "$f" .java; done | paste -sd, -)"'
|
|
336
|
+
```
|
|
323
337
|
- A proof that no test can make stays without a test. Give the reason in
|
|
324
338
|
`build-reports/evidence.md`.
|
|
325
339
|
|
|
@@ -327,7 +341,7 @@ Commit the setup file and every test. Then run
|
|
|
327
341
|
`outerlayer work proofs --record` from the committed checkout. It stops when a
|
|
328
342
|
tracked file differs from HEAD. It runs only what is committed at HEAD, and
|
|
329
343
|
emits each proof at HEAD. It skips a proof that is current. Never emit by hand
|
|
330
|
-
a proof that a test can make, except a `test` proof, as above. Always pass `--pr <number>` when the item links
|
|
344
|
+
a proof that a test can make, except a `test` proof the first time, as above. Always pass `--pr <number>` when the item links
|
|
331
345
|
more than one pull request in the repository.
|
|
332
346
|
|
|
333
347
|
The output names each proof that is still not current, with the reason. Fix
|
|
@@ -51,11 +51,14 @@ recorded. In a runner build, the host runs `outerlayer work proofs --record
|
|
|
51
51
|
that the tests record each proof. A proof that is out of date only because a
|
|
52
52
|
later commit moved the head needs no reason: the host records it again.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
A criterion that declares `proof: test` is recorded the first time as the
|
|
55
|
+
Evidence brief in [agent-briefs.md](agent-briefs.md) says, unless the policy
|
|
56
|
+
file sets `criteria.test_proof: ci`. After that, `--record` runs the same tests
|
|
57
|
+
again and records their results, as the host does at the final commit. It can
|
|
58
|
+
do so only when each test was named with its file and line, and a runner in
|
|
59
|
+
`.outerlayer-proofs.yaml` matches that file. The list command names a proof
|
|
60
|
+
the host cannot record again, and why. Fix the proofs file before the run
|
|
61
|
+
ends. The final report names each test proof with its artifact.
|
|
59
62
|
|
|
60
63
|
Run the list command once more before the run ends. A criterion still listed
|
|
61
64
|
as out of date or missing goes in `build-reports/evidence.md` with the reason.
|
|
@@ -8,6 +8,12 @@ for both.
|
|
|
8
8
|
Merge the base branch. Never rebase, and never force-push. A merge keeps the
|
|
9
9
|
commits a reviewer already read and keeps review comments on their lines.
|
|
10
10
|
|
|
11
|
+
## Contents
|
|
12
|
+
|
|
13
|
+
- A build's last sync: merge only on a conflict
|
|
14
|
+
- The merge
|
|
15
|
+
- When you cannot resolve it
|
|
16
|
+
|
|
11
17
|
## A build's last sync: merge only on a conflict
|
|
12
18
|
|
|
13
19
|
A build checks for a conflict as the last step before its push, after its
|
|
@@ -15,17 +21,23 @@ gate passed. It merges the base branch only when the two conflict. CI tests a
|
|
|
15
21
|
pull request merged into its base, so a branch that merges cleanly needs no
|
|
16
22
|
merge to be tested. A branch that conflicts gets no CI run at all.
|
|
17
23
|
|
|
18
|
-
1. Fetch the base branch
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
git merge-tree --write-tree HEAD origin/<base>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
1. Fetch the base branch, check the merge without changing the branch, and
|
|
25
|
+
push, all in this one command:
|
|
26
|
+
|
|
27
|
+
git fetch origin <base> && git merge-tree --write-tree HEAD origin/<base> >/dev/null && git push origin HEAD
|
|
28
|
+
|
|
29
|
+
The push runs only when the merge is clean. Never run the check and the
|
|
30
|
+
push as separate commands, or join them with `;`. Then a branch that
|
|
31
|
+
conflicts is pushed anyway, and its pull request opens with a conflict.
|
|
32
|
+
2. When the command pushed, the sync is done. Merge nothing.
|
|
33
|
+
3. When `git merge-tree` exits 1, the branch conflicts with the base, and
|
|
34
|
+
nothing was pushed. Follow every step of the merge, then push straight
|
|
35
|
+
after the gate passes. When the base moves again during that gate, push
|
|
36
|
+
anyway. The build's mergeability check catches a new conflict once the
|
|
37
|
+
pull request is open.
|
|
38
|
+
4. When the fetch fails, or `git merge-tree` exits with any other code,
|
|
39
|
+
nothing was pushed. Run the command again. When it fails a second time,
|
|
40
|
+
hand off as the calling skill says.
|
|
29
41
|
|
|
30
42
|
A run that resolves a merge conflict on an open pull request skips this check
|
|
31
43
|
and follows every step of the merge.
|