@warpgogol/forge 9.4.1 → 9.5.0
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/CHANGELOG.md +15 -0
- package/bin/cli.ts +152 -11
- package/dist/bin/cli.js +125 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/flow/dirty-classify.d.ts +7 -0
- package/dist/os/flow/dirty-classify.d.ts.map +1 -1
- package/dist/os/flow/dirty-classify.js +11 -0
- package/dist/os/flow/dirty-classify.js.map +1 -1
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +3 -2
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-check.js +9 -9
- package/dist/os/flow/handlers/flow-check.js.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +59 -26
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -1
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-open.js +14 -19
- package/dist/os/flow/handlers/flow-open.js.map +1 -1
- package/dist/os/flow/index.d.ts +1 -0
- package/dist/os/flow/index.d.ts.map +1 -1
- package/dist/os/flow/index.js +5 -3
- package/dist/os/flow/index.js.map +1 -1
- package/dist/os/flow/preflight.d.ts +24 -0
- package/dist/os/flow/preflight.d.ts.map +1 -1
- package/dist/os/flow/preflight.js +354 -10
- package/dist/os/flow/preflight.js.map +1 -1
- package/dist/os/flow/registry.d.ts +2 -2
- package/dist/os/gate-run/detach.d.ts +27 -0
- package/dist/os/gate-run/detach.d.ts.map +1 -0
- package/dist/os/gate-run/detach.js +85 -0
- package/dist/os/gate-run/detach.js.map +1 -0
- package/dist/os/gate-run/gate-run.module.d.ts +3 -0
- package/dist/os/gate-run/gate-run.module.d.ts.map +1 -0
- package/dist/os/gate-run/gate-run.module.js +23 -0
- package/dist/os/gate-run/gate-run.module.js.map +1 -0
- package/dist/os/gate-run/index.d.ts +7 -0
- package/dist/os/gate-run/index.d.ts.map +1 -0
- package/dist/os/gate-run/index.js +5 -0
- package/dist/os/gate-run/index.js.map +1 -0
- package/dist/os/gate-run/record.d.ts +47 -0
- package/dist/os/gate-run/record.d.ts.map +1 -0
- package/dist/os/gate-run/record.js +157 -0
- package/dist/os/gate-run/record.js.map +1 -0
- package/dist/os/gate-run/status.d.ts +41 -0
- package/dist/os/gate-run/status.d.ts.map +1 -0
- package/dist/os/gate-run/status.js +142 -0
- package/dist/os/gate-run/status.js.map +1 -0
- package/dist/os/gate-run/types.d.ts +47 -0
- package/dist/os/gate-run/types.d.ts.map +1 -0
- package/dist/os/gate-run/types.js +24 -0
- package/dist/os/gate-run/types.js.map +1 -0
- package/dist/os/rfc/evidence-annotation.d.ts +26 -0
- package/dist/os/rfc/evidence-annotation.d.ts.map +1 -0
- package/dist/os/rfc/evidence-annotation.js +52 -0
- package/dist/os/rfc/evidence-annotation.js.map +1 -0
- package/dist/os/rfc/handlers/fixed-inputs.d.ts.map +1 -1
- package/dist/os/rfc/handlers/fixed-inputs.js +7 -1
- package/dist/os/rfc/handlers/fixed-inputs.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +21 -28
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +127 -7
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +3 -2
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/src/cli-flags.d.ts.map +1 -1
- package/dist/src/cli-flags.js +6 -0
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/types.d.ts +7 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -8
- package/dist/src/types.js.map +1 -1
- package/os/flow/dirty-classify.ts +13 -0
- package/os/flow/flow.module.ts +3 -2
- package/os/flow/handlers/flow-check.ts +17 -18
- package/os/flow/handlers/flow-integrate.ts +75 -35
- package/os/flow/handlers/flow-open.ts +24 -31
- package/os/flow/index.ts +5 -7
- package/os/flow/preflight.ts +351 -9
- package/os/flow/tests/flow-integrate.preflight.test.ts +26 -5
- package/os/flow/tests/flow-integrate.test.ts +68 -2
- package/os/flow/tests/lockfile-induced.test.ts +328 -0
- package/os/gate-run/detach.ts +106 -0
- package/os/gate-run/gate-run.module.ts +25 -0
- package/os/gate-run/index.ts +16 -0
- package/os/gate-run/record.ts +194 -0
- package/os/gate-run/status.ts +168 -0
- package/os/gate-run/tests/gate-run-detach.test.ts +144 -0
- package/os/gate-run/tests/gate-run-record.test.ts +200 -0
- package/os/gate-run/types.ts +73 -0
- package/os/rfc/evidence-annotation.ts +61 -0
- package/os/rfc/handlers/fixed-inputs.test.ts +70 -0
- package/os/rfc/handlers/fixed-inputs.ts +11 -1
- package/os/rfc/handlers/implement-stamp.ts +25 -28
- package/os/rfc/handlers/list-create.test.ts +14 -5
- package/os/rfc/handlers/validate-evidence-shape.test.ts +218 -0
- package/os/rfc/handlers/validate-probe-meta.test.ts +71 -0
- package/os/rfc/handlers/validate-rules.ts +169 -17
- package/os/rfc/handlers/validate-transient-probes.test.ts +222 -0
- package/os/rfc/rfc-0000-template.md +10 -10
- package/os/rfc/rfc.module.ts +3 -2
- package/package.json +17 -1
- package/skills/fo/fo-session-retro/SKILL.md +4 -2
- package/src/cli-flags.ts +7 -0
- package/src/types.ts +9 -8
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AA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aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,mFAAmF;IACnF,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,wEAAwE;IACxE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,qFAAqF;AACrF,MAAM,MAAM,kBAAkB,GAAG,CAC/B,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KACnC,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
|
package/dist/src/types.js
CHANGED
|
@@ -9,18 +9,12 @@ can be registered in a Warpgogol kernel without direct dependency.</purpose>
|
|
|
9
9
|
</non-goals>
|
|
10
10
|
</MODULE_CONTRACT>
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
|
-
<item>RFC-1360: step 2 — env-input declaration sweep (59 commands)
|
|
13
|
-
|
|
14
|
-
Declare every reachable env read on its owning command across engine/site/
|
|
15
|
-
forge (fresh full-registry replay worklist: 151 ENV-INPUT-01, 60 commands).
|
|
16
|
-
ForgeCommandMetadata gains the mirrored envInputs contract field. The
|
|
17
|
-
npm_execpath ambient read in open-source-page.ts is removed for a
|
|
18
|
-
deterministic PATH spawn (DNA-105) — undeclarable name class, ledger Q-9.</item>
|
|
19
12
|
<item>RFC-1366: kernel resolves mission workpieceEnv + KERNEL-ENV-01 gate on required envInputs</item>
|
|
20
13
|
<item>RFC-1461: declare rules[] severity via CommandRuleDecl workspace-wide (RFC-1461)</item>
|
|
21
14
|
<item>RFC-1463: composite gates report complete violation sets and self-ensure prerequisites — ensure/compositeGate metadata, executor ensure runner, blockedBy skip tracking, ENSURE-01..04 + GATE-CMP-01, runCompositeGate</item>
|
|
22
15
|
<item>RFC-1486: review r1 — committed-state adoption gate, uncommitted-hook committedness, step-failure trail, idempotency declaration, lazy asset resolution</item>
|
|
23
|
-
<
|
|
16
|
+
<item>RFC-1568: durable gate-run records, --detach mechanics, and forge CLI wiring</item>
|
|
17
|
+
<history>RFC-0518, RFC-1097, RFC-1147, RFC-1231, RFC-1306, RFC-1354, RFC-1360</history>
|
|
24
18
|
</CHANGE_SUMMARY>
|
|
25
19
|
*/
|
|
26
20
|
export {};
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;EAkBE"}
|
|
@@ -20,6 +20,7 @@ classifyDirt, which emits the same enum.</purpose>
|
|
|
20
20
|
<item>RFC-1531: add flow.integrate remediation flags on the shared dirty classifier</item>
|
|
21
21
|
<item>RFC-1543: attribute shared-checkout dirt to live ops and expose peers (RFC-1543)</item>
|
|
22
22
|
<item>RFC-1544: attribute mission lockfile churn to owning checkout and auto-resolve foreign importer diffs (RFC-1544)</item>
|
|
23
|
+
<item>ADR-0129: F-0186/F-0187 — FLOW-INT-03 names paths + three-way remedy, FLOW-OPEN-01 same hint, forge CLI kernel-command hint</item>
|
|
23
24
|
</CHANGE_SUMMARY>
|
|
24
25
|
*/
|
|
25
26
|
|
|
@@ -59,6 +60,18 @@ export interface ClassifiedDirtyEntry {
|
|
|
59
60
|
/** Fixed autocommit sweep subject (FI-1) — AC-9 probes this literal. */
|
|
60
61
|
export const SWEEP_COMMIT_SUBJECT = "chore(flow): sweep session leftovers";
|
|
61
62
|
|
|
63
|
+
/**
|
|
64
|
+
* ADR-0129 (F-0186): the remedy for unattributed dirt in the primary checkout
|
|
65
|
+
* depends on who owns the content — "commit or revert" alone is wrong for
|
|
66
|
+
* foreign authored work. Shared verbatim by FLOW-INT-03 (refusal) and
|
|
67
|
+
* FLOW-OPEN-01 (warning).
|
|
68
|
+
*/
|
|
69
|
+
export const FOREIGN_PRIMARY_DIRT_HINT =
|
|
70
|
+
"pick the remedy by whose work it is: (1) your own work — commit it in the primary; " +
|
|
71
|
+
"(2) work that belongs to a session — copy the file into that session's worktree, " +
|
|
72
|
+
"then restore the primary copy with `git show HEAD:<path> > <path>`; " +
|
|
73
|
+
"(3) another session's work in progress — wait for it, or ask its owner";
|
|
74
|
+
|
|
62
75
|
/**
|
|
63
76
|
* Classes `--auto-clean` may pass without deleting anything: the RFC-1537
|
|
64
77
|
* regenerable family (journaled, never deleted, never committed — AC-3's
|
package/os/flow/flow.module.ts
CHANGED
|
@@ -9,12 +9,12 @@ the idempotent two-phase repository adoption (FLOW-ADOPT-01..06, -08).</purpose>
|
|
|
9
9
|
</non-goals>
|
|
10
10
|
</MODULE_CONTRACT>
|
|
11
11
|
<CHANGE_SUMMARY>
|
|
12
|
-
<item>RFC-1533: surface pending flow branches in flow.open and the pre-user-prompt nudge</item>
|
|
13
12
|
<item>RFC-1537: classify regenerable worktree dirt and journal integrate refusals cheapest-first</item>
|
|
14
13
|
<item>RFC-1538: revalidate integration preconditions post-lock and reuse the session engine</item>
|
|
15
14
|
<item>RFC-1531: add flow.integrate remediation flags on the shared dirty classifier</item>
|
|
16
15
|
<item>RFC-1543: attribute shared-checkout dirt to live ops and expose peers (RFC-1543)</item>
|
|
17
|
-
<
|
|
16
|
+
<item>RFC-1568: durable gate-run records, --detach mechanics, and forge CLI wiring</item>
|
|
17
|
+
<history>RFC-1486, RFC-1487, RFC-1488, RFC-1490, RFC-1491, RFC-1498, RFC-1502, RFC-1503, RFC-1517, RFC-1528, RFC-1533</history>
|
|
18
18
|
</CHANGE_SUMMARY>
|
|
19
19
|
*/
|
|
20
20
|
|
|
@@ -250,6 +250,7 @@ export async function createForgeFlowModule(): Promise<ForgeModule> {
|
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
name: "flow.integrate",
|
|
253
|
+
detachable: true,
|
|
253
254
|
description:
|
|
254
255
|
"Integrate a registered auto branch into develop as a linear " +
|
|
255
256
|
"fast-forward (RFC-1487), idempotent and rerun-safe: under the " +
|
|
@@ -16,7 +16,6 @@ by flow.install step 9.</purpose>
|
|
|
16
16
|
<item>A stray auto branch (RFC-1498) reports FLOW-07 the moment it exists — it has no registry entry and no worktree, so the 72 h staleness grace never applied to it.</item>
|
|
17
17
|
</KEY_DECISIONS>
|
|
18
18
|
<CHANGE_SUMMARY>
|
|
19
|
-
<item>RFC-1490: pre-merge-commit guard mode + per-mode op vocabulary; amends the wave-1 guard RFC's backmerge escape (AC-11)</item>
|
|
20
19
|
<item>RFC-1491: step 2 — pre-push guard mode, install steps pre-push + markers, FLOW-10</item>
|
|
21
20
|
<item>RFC-1498: step 1 — FLOW-07 for stray auto branches
|
|
22
21
|
|
|
@@ -25,7 +24,8 @@ collectFlowStatus exposes unregisteredBranchesWithoutWorktree — local auto/* b
|
|
|
25
24
|
|
|
26
25
|
markerSource accepts only network-shaped origins — http/https/ssh/git schemes or the scp user-at-host form — and returns { source, rejectedOrigin }. A local path or file:// URL falls back to the repository directory basename with rejectedOrigin naming the kind (local-path or file-url), so no machine-local path is ever written into an extract repository marker; embedded credentials are still stripped from network URLs. flow.install resolves the source at plan time, stores it on the plan for the execute phase, and the markers step warns origin rejected (kind) — using the directory name, never printing the path. Tests AC-3 (local path and file:// rejected, basename used, path absent from the step detail) and AC-4 (scp URL kept verbatim, https credentials stripped). Also carries the KEY_DECISIONS compass notes for step 1's stray-branch rule.</item>
|
|
27
26
|
<item>RFC-1536: owning-checkout routing, FLOW-OPEN-01 dirty-primary warning, shared governance-id allocation (RFC+ADR)</item>
|
|
28
|
-
<
|
|
27
|
+
<item>ADR-0129: F-0186/F-0187 — FLOW-INT-03 names paths + three-way remedy, FLOW-OPEN-01 same hint, forge CLI kernel-command hint</item>
|
|
28
|
+
<history>RFC-1486, RFC-1487, RFC-1488, RFC-1490</history>
|
|
29
29
|
</CHANGE_SUMMARY>
|
|
30
30
|
*/
|
|
31
31
|
|
|
@@ -39,6 +39,7 @@ import type {
|
|
|
39
39
|
} from "../../../src/types.ts";
|
|
40
40
|
import { resolveIo } from "../../../src/utils/io.ts";
|
|
41
41
|
import { classifyBranch } from "../branch-name.ts";
|
|
42
|
+
import { FOREIGN_PRIMARY_DIRT_HINT } from "../dirty-classify.ts";
|
|
42
43
|
import {
|
|
43
44
|
branchExists,
|
|
44
45
|
configGet,
|
|
@@ -61,11 +62,7 @@ import {
|
|
|
61
62
|
import { MARKER_FILE, markerContentIsValid } from "../markers.ts";
|
|
62
63
|
import { detectRepoKind, readRepoRootFile } from "../repo-kind.ts";
|
|
63
64
|
import { collectFlowStatus } from "./flow-status.ts";
|
|
64
|
-
import {
|
|
65
|
-
discoverReleaseLines,
|
|
66
|
-
readLineVersionFile,
|
|
67
|
-
type ReleaseLine,
|
|
68
|
-
} from "../release-lines.ts";
|
|
65
|
+
import { discoverReleaseLines, readLineVersionFile, type ReleaseLine } from "../release-lines.ts";
|
|
69
66
|
import { listLineTags } from "../release-tags.ts";
|
|
70
67
|
import { compareVersions, parseVersion } from "../semver.ts";
|
|
71
68
|
import { STALE_AFTER_HOURS } from "../registry.ts";
|
|
@@ -181,8 +178,7 @@ export async function collectFlowCheck(
|
|
|
181
178
|
`primary checkout carries ${paths.length} tracked mutation(s): ${shown.join(", ")}` +
|
|
182
179
|
(paths.length > shown.length ? ` (+${paths.length - shown.length} more)` : "") +
|
|
183
180
|
" — they are NOT swept into the worktree; commit or move them first",
|
|
184
|
-
fixHint:
|
|
185
|
-
"commit them in the primary checkout or move them into the session worktree before integrating",
|
|
181
|
+
fixHint: FOREIGN_PRIMARY_DIRT_HINT,
|
|
186
182
|
});
|
|
187
183
|
}
|
|
188
184
|
} catch {
|
|
@@ -262,9 +258,7 @@ export async function collectFlowCheck(
|
|
|
262
258
|
// view: stale auto branches warn, and registry/git/worktree disagreements
|
|
263
259
|
// warn (a schema-invalid registry escalates to error). Skipped on bare
|
|
264
260
|
// repositories — a bare repo has no worktrees to inspect.
|
|
265
|
-
const status = bare
|
|
266
|
-
? null
|
|
267
|
-
: await collectFlowStatus(repoRoot, io, { now: opts?.now });
|
|
261
|
+
const status = bare ? null : await collectFlowStatus(repoRoot, io, { now: opts?.now });
|
|
268
262
|
for (const b of status?.data.branches ?? []) {
|
|
269
263
|
if (b.stale) {
|
|
270
264
|
diagnostics.push({
|
|
@@ -291,7 +285,8 @@ export async function collectFlowCheck(
|
|
|
291
285
|
ruleId: "FLOW-07",
|
|
292
286
|
severity: "warning",
|
|
293
287
|
message: `registry entry '${e.name}' names a branch ref that does not exist`,
|
|
294
|
-
fixHint:
|
|
288
|
+
fixHint:
|
|
289
|
+
"re-run flow.integrate/flow.discard to finish the cleanup, or repair the registry entry",
|
|
295
290
|
});
|
|
296
291
|
}
|
|
297
292
|
for (const e of status?.missingWorktreeEntries ?? []) {
|
|
@@ -299,7 +294,8 @@ export async function collectFlowCheck(
|
|
|
299
294
|
ruleId: "FLOW-07",
|
|
300
295
|
severity: "warning",
|
|
301
296
|
message: `registry entry '${e.name}' names worktree ${e.worktree}, which does not exist`,
|
|
302
|
-
fixHint:
|
|
297
|
+
fixHint:
|
|
298
|
+
"re-run flow.integrate/flow.discard to finish the cleanup, or repair the registry entry",
|
|
303
299
|
});
|
|
304
300
|
}
|
|
305
301
|
for (const path of status?.unregisteredWorktrees ?? []) {
|
|
@@ -319,7 +315,7 @@ export async function collectFlowCheck(
|
|
|
319
315
|
message: `branch '${name}' has no registry entry and no worktree`,
|
|
320
316
|
fixHint:
|
|
321
317
|
"inspect with flow.status; integrate it through a registered session or drop it " +
|
|
322
|
-
|
|
318
|
+
'with flow.discard --reason "<why>" — a branch with unique commits needs a human decision',
|
|
323
319
|
});
|
|
324
320
|
}
|
|
325
321
|
|
|
@@ -370,7 +366,8 @@ async function collectLineDiagnostics(
|
|
|
370
366
|
: fileVersion === null || compareVersions(fileVersion, tagVersion) !== 0;
|
|
371
367
|
if (differs) {
|
|
372
368
|
const fileHigher =
|
|
373
|
-
fileVersion !== null &&
|
|
369
|
+
fileVersion !== null &&
|
|
370
|
+
(tagVersion === null || compareVersions(fileVersion, tagVersion) > 0);
|
|
374
371
|
diagnostics.push({
|
|
375
372
|
ruleId: "FLOW-08",
|
|
376
373
|
severity: "error",
|
|
@@ -395,7 +392,8 @@ async function collectLineDiagnostics(
|
|
|
395
392
|
severity: "error",
|
|
396
393
|
file: markerPath,
|
|
397
394
|
message: `package line '${line.id}' has no valid forge.generated.yaml in ${line.paths[0]}`,
|
|
398
|
-
fixHint:
|
|
395
|
+
fixHint:
|
|
396
|
+
"run pnpm exec forge flow.install — the markers step writes it into the adoption commit",
|
|
399
397
|
});
|
|
400
398
|
}
|
|
401
399
|
const extractPath = `${line.paths[0]}/extract.config.yaml`;
|
|
@@ -408,7 +406,8 @@ async function collectLineDiagnostics(
|
|
|
408
406
|
severity: "warning",
|
|
409
407
|
file: extractPath,
|
|
410
408
|
message: `release line '${line.id}' declares versionBump in ${extractPath} — repo-extract would rewrite the version during export`,
|
|
411
|
-
fixHint:
|
|
409
|
+
fixHint:
|
|
410
|
+
"remove versionBump from extract.config.yaml — versions are cut by the release flow",
|
|
412
411
|
});
|
|
413
412
|
}
|
|
414
413
|
}
|
|
@@ -20,12 +20,12 @@ at cleanup without moving develop again.</purpose>
|
|
|
20
20
|
<item>Task-file preservation runs inside the cleanup branch BEFORE the worktree-teardown hook and only for owner.kind task — a `git clean -fdx` teardown would destroy `.forge/task/` first, and a copy failure refuses cleanup (FLOW-INT-04) so the report is never lost with the worktree (RFC-1509 Q-16).</item>
|
|
21
21
|
</KEY_DECISIONS>
|
|
22
22
|
<CHANGE_SUMMARY>
|
|
23
|
-
<item>RFC-1531: remediation flags --reattach/--auto-clean/--autocommit on the classified dirty set, FLOW-INT-17 remediation-failure refusals, classified FLOW-INT-01 data</item>
|
|
24
|
-
<item>RFC-1532: persist integration-gate reports per attempt and link them from the flow journal</item>
|
|
25
23
|
<item>RFC-1545: standalone generated-conflict regeneration in flow.integrate</item>
|
|
26
24
|
<item>RFC-1543: attribute shared-checkout dirt to live ops and expose peers (RFC-1543)</item>
|
|
27
25
|
<item>RFC-1544: attribute mission lockfile churn to owning checkout and auto-resolve foreign importer diffs (RFC-1544)</item>
|
|
28
|
-
<
|
|
26
|
+
<item>ADR-0128: FLOW-INT-02 names rebase stderr tail + porcelain status when no unmerged paths; cap path list at 20 (+N more) (ADR-0128 F-0188)</item>
|
|
27
|
+
<item>ADR-0130: foreign-open-mission restore writes HEAD verbatim — whole diff classified as importer churn, a block splice would leave induced additions to be swept</item>
|
|
28
|
+
<history>RFC-1487, RFC-1490, RFC-1491, RFC-1504, RFC-1509, RFC-1515, RFC-1528, RFC-1531, RFC-1532, RFC-1536, RFC-1537, RFC-1538</history>
|
|
29
29
|
</CHANGE_SUMMARY>
|
|
30
30
|
*/
|
|
31
31
|
|
|
@@ -167,6 +167,58 @@ function refuse(
|
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/**
|
|
171
|
+
* ADR-0128 (F-0188): FLOW-INT-02 always carries an actionable cause.
|
|
172
|
+
* Unmerged paths are capped at 20 with a (+N more) tail; when the rebase
|
|
173
|
+
* failed without unmerged paths the message names the cause instead —
|
|
174
|
+
* the rebase stderr tail plus the worktree's porcelain status.
|
|
175
|
+
*/
|
|
176
|
+
async function rebaseConflictRefusal(
|
|
177
|
+
branchWorktree: string,
|
|
178
|
+
io: WorkspaceIO,
|
|
179
|
+
rebase: { stderr?: string; stdout?: string },
|
|
180
|
+
paths: string[],
|
|
181
|
+
partial: Partial<FlowIntegrateData>,
|
|
182
|
+
messageSuffix = "",
|
|
183
|
+
): Promise<FlowIntegrateData> {
|
|
184
|
+
const porcelain = await git(branchWorktree, io, ["status", "--porcelain"]);
|
|
185
|
+
const statusPorcelain = porcelain.stdout
|
|
186
|
+
.split("\n")
|
|
187
|
+
.map((l) => l.trimEnd())
|
|
188
|
+
.filter((l) => l.length > 0)
|
|
189
|
+
.slice(0, 20);
|
|
190
|
+
const stderrLines = (rebase.stderr ?? rebase.stdout ?? "")
|
|
191
|
+
.split("\n")
|
|
192
|
+
.map((l) => l.trimEnd())
|
|
193
|
+
.filter((l) => l.length > 0);
|
|
194
|
+
const rebaseStderrTail = stderrLines.slice(-20);
|
|
195
|
+
let message: string;
|
|
196
|
+
let fixHint: string;
|
|
197
|
+
if (paths.length > 0) {
|
|
198
|
+
const shown = paths.slice(0, 20);
|
|
199
|
+
const more = paths.length - shown.length;
|
|
200
|
+
message = `rebase onto develop conflicts in: ${shown.join(", ")}${more > 0 ? ` (+${more} more)` : ""}${messageSuffix}`;
|
|
201
|
+
fixHint =
|
|
202
|
+
"resolve the listed conflicts in the session worktree, commit, and re-run flow.integrate";
|
|
203
|
+
} else {
|
|
204
|
+
const cause =
|
|
205
|
+
rebaseStderrTail.length > 0
|
|
206
|
+
? `rebase stderr tail: ${rebaseStderrTail.join(" | ")}`
|
|
207
|
+
: "no unmerged paths and empty rebase output";
|
|
208
|
+
const dirt =
|
|
209
|
+
statusPorcelain.length > 0
|
|
210
|
+
? `worktree status: ${statusPorcelain.join(" | ")}`
|
|
211
|
+
: "worktree status: clean";
|
|
212
|
+
message = `rebase onto develop failed without unmerged paths — ${cause} — ${dirt}${messageSuffix}`;
|
|
213
|
+
fixHint = "clean the listed worktree state, then re-run flow.integrate";
|
|
214
|
+
}
|
|
215
|
+
return refuse("FLOW-INT-02", message, fixHint, partial, {
|
|
216
|
+
conflictedPaths: paths,
|
|
217
|
+
rebaseStderrTail,
|
|
218
|
+
statusPorcelain,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
170
222
|
async function resolveEntry(
|
|
171
223
|
repoRoot: string,
|
|
172
224
|
io: WorkspaceIO,
|
|
@@ -720,8 +772,6 @@ async function integrateFlowBranchAttempt(
|
|
|
720
772
|
let staleImporterCommitSha: string | undefined;
|
|
721
773
|
if (dirty.entries.some((line) => line.slice(3).trim() === "pnpm-lock.yaml")) {
|
|
722
774
|
const { classifyDirt, resolveImporterReferents } = await import("../preflight.ts");
|
|
723
|
-
const { extractImporterBlock, insertImporterBlock } =
|
|
724
|
-
await import("../../mission/importer-block.ts");
|
|
725
775
|
const pruneVerdict = await classifyDirt(
|
|
726
776
|
branchWorktree,
|
|
727
777
|
io,
|
|
@@ -735,27 +785,21 @@ async function integrateFlowBranchAttempt(
|
|
|
735
785
|
lockTolerated?.class === "foreign-open-mission" &&
|
|
736
786
|
lockTolerated.missionIds !== undefined
|
|
737
787
|
) {
|
|
788
|
+
// ADR-0130: write HEAD verbatim — the diff already classified as
|
|
789
|
+
// importer churn end-to-end (strict prune, or prune + induced
|
|
790
|
+
// `optional: true`/`packages:`/`snapshots:` additions via the
|
|
791
|
+
// extended classifier), so the committed file is the canonical
|
|
792
|
+
// state and a whole-file restore reverts exactly that churn. A
|
|
793
|
+
// block splice would leave the induced additions behind, which
|
|
794
|
+
// is what used to land in the sweep commit.
|
|
738
795
|
const head = await git(branchWorktree, io, ["show", "HEAD:pnpm-lock.yaml"]);
|
|
739
796
|
if (head.exitCode === 0) {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
const spliced = insertImporterBlock(next, key, block);
|
|
747
|
-
if (spliced === null) continue;
|
|
748
|
-
next = spliced;
|
|
749
|
-
restored.push(id);
|
|
750
|
-
}
|
|
751
|
-
if (restored.length > 0) {
|
|
752
|
-
await io.writeFile(join(branchWorktree, "pnpm-lock.yaml"), next);
|
|
753
|
-
restoredImporters = restored;
|
|
754
|
-
opts.onProgress?.(
|
|
755
|
-
`restored foreign mission importer(s): ${restored.map((id) => `missions/${id}/workpiece`).join(", ")}`,
|
|
756
|
-
);
|
|
757
|
-
dirty = await statusDirty(branchWorktree, io);
|
|
758
|
-
}
|
|
797
|
+
await io.writeFile(join(branchWorktree, "pnpm-lock.yaml"), head.stdout);
|
|
798
|
+
restoredImporters = lockTolerated.missionIds;
|
|
799
|
+
opts.onProgress?.(
|
|
800
|
+
`restored foreign mission importer(s): ${lockTolerated.missionIds.map((id) => `missions/${id}/workpiece`).join(", ")}`,
|
|
801
|
+
);
|
|
802
|
+
dirty = await statusDirty(branchWorktree, io);
|
|
759
803
|
}
|
|
760
804
|
} else if (lockTolerated?.class === "importer-prune-stale") {
|
|
761
805
|
const add = await git(branchWorktree, io, ["add", "pnpm-lock.yaml"]);
|
|
@@ -1026,12 +1070,13 @@ async function integrateFlowBranchAttempt(
|
|
|
1026
1070
|
verdict.owners.length === paths.length;
|
|
1027
1071
|
if (!resolvable) {
|
|
1028
1072
|
await git(branchWorktree, io, ["rebase", "--abort"]);
|
|
1029
|
-
return
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1073
|
+
return rebaseConflictRefusal(
|
|
1074
|
+
branchWorktree,
|
|
1075
|
+
io,
|
|
1076
|
+
rebase,
|
|
1077
|
+
paths,
|
|
1034
1078
|
{ branch, developBefore },
|
|
1079
|
+
verdict.owners.length > 0 ? " — mixed generated/non-generated conflict set" : "",
|
|
1035
1080
|
);
|
|
1036
1081
|
}
|
|
1037
1082
|
let failed = false;
|
|
@@ -1081,12 +1126,7 @@ async function integrateFlowBranchAttempt(
|
|
|
1081
1126
|
.map((l) => l.trim())
|
|
1082
1127
|
.filter((l) => l.length > 0);
|
|
1083
1128
|
await git(branchWorktree, io, ["rebase", "--abort"]);
|
|
1084
|
-
return
|
|
1085
|
-
"FLOW-INT-02",
|
|
1086
|
-
`rebase onto develop conflicts in: ${paths.join(", ") || "(unknown paths)"}`,
|
|
1087
|
-
"resolve the rebase inside the session worktree, commit, and re-run flow.integrate",
|
|
1088
|
-
{ branch, developBefore },
|
|
1089
|
-
);
|
|
1129
|
+
return rebaseConflictRefusal(branchWorktree, io, rebase, paths, { branch, developBefore });
|
|
1090
1130
|
}
|
|
1091
1131
|
}
|
|
1092
1132
|
|
|
@@ -18,12 +18,11 @@ hooks/worktree-setup.sh.</purpose>
|
|
|
18
18
|
<item>A failed setup script is reported, never rolled back — the worktree and registry entry stay, and the command exits 1 (DNA-106).</item>
|
|
19
19
|
</KEY_DECISIONS>
|
|
20
20
|
<CHANGE_SUMMARY>
|
|
21
|
-
<item>RFC-1490: step 6 — flow.fix + fix-mode cut (patch-only, rebase on moved main, gate target main, trailing back-merge)</item>
|
|
22
|
-
<item>RFC-1490: independent-review pass — lock-held planning, fix-branch verification, spec-shaped data, coverage</item>
|
|
23
21
|
<item>ADR-0124: enable git rerere in flow-managed repositories</item>
|
|
24
22
|
<item>RFC-1536: owning-checkout routing, FLOW-OPEN-01 dirty-primary warning, shared governance-id allocation (RFC+ADR)</item>
|
|
25
23
|
<item>RFC-1536: evidence — routing/warning tests, FLOW-OPEN-10 validation renumber, owning-worktree doc rule, frictions F-0091/F-0096/F-0106/F-0119 addressed</item>
|
|
26
24
|
<item>RFC-1533: pending-branch summary + primaryMutations on the result; FLOW-OPEN-02 freed for the registry-unreadable warning (refusal renumbered to FLOW-OPEN-11)</item>
|
|
25
|
+
<item>ADR-0129: F-0186/F-0187 — FLOW-INT-03 names paths + three-way remedy, FLOW-OPEN-01 same hint, forge CLI kernel-command hint</item>
|
|
27
26
|
<history>RFC-1487, RFC-1490</history>
|
|
28
27
|
</CHANGE_SUMMARY>
|
|
29
28
|
*/
|
|
@@ -47,6 +46,7 @@ import {
|
|
|
47
46
|
topLevel,
|
|
48
47
|
} from "../git.ts";
|
|
49
48
|
import { formatFlowBranch, parseFlowBranch, type FlowBranchKind } from "../branch-name.ts";
|
|
49
|
+
import { FOREIGN_PRIMARY_DIRT_HINT } from "../dirty-classify.ts";
|
|
50
50
|
import { LockTimeoutError } from "../locks.ts";
|
|
51
51
|
import { detectRepoKind } from "../repo-kind.ts";
|
|
52
52
|
import {
|
|
@@ -134,10 +134,7 @@ function refuse(ruleId: string, message: string, fixHint: string): FlowOpenData
|
|
|
134
134
|
const SLUG_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
135
135
|
|
|
136
136
|
/** Highest NN for `date` among candidate auto branch names; returns max+1. */
|
|
137
|
-
export function nextFlowSeq(
|
|
138
|
-
names: string[],
|
|
139
|
-
yymmdd: string,
|
|
140
|
-
): number {
|
|
137
|
+
export function nextFlowSeq(names: string[], yymmdd: string): number {
|
|
141
138
|
let max = 0;
|
|
142
139
|
for (const raw of names) {
|
|
143
140
|
const parsed = parseFlowBranch(raw);
|
|
@@ -157,7 +154,11 @@ export async function openFlowBranch(
|
|
|
157
154
|
): Promise<FlowOpenData> {
|
|
158
155
|
// Flags — FLOW-OPEN-10/05 first, before any git fact is consulted.
|
|
159
156
|
if (opts.kind !== "session" && opts.kind !== "task") {
|
|
160
|
-
return refuse(
|
|
157
|
+
return refuse(
|
|
158
|
+
"FLOW-OPEN-10",
|
|
159
|
+
`invalid --kind '${opts.kind}'`,
|
|
160
|
+
"use --kind session or --kind task",
|
|
161
|
+
);
|
|
161
162
|
}
|
|
162
163
|
if (opts.kind === "task" && (opts.owner === null || opts.owner === "")) {
|
|
163
164
|
return refuse(
|
|
@@ -249,10 +250,11 @@ export async function openFlowBranchCore(
|
|
|
249
250
|
severity: "warning",
|
|
250
251
|
message:
|
|
251
252
|
`primary checkout carries ${primaryMutations.length} tracked mutation(s): ${shown.join(", ")}` +
|
|
252
|
-
(primaryMutations.length > shown.length
|
|
253
|
+
(primaryMutations.length > shown.length
|
|
254
|
+
? ` (+${primaryMutations.length - shown.length} more)`
|
|
255
|
+
: "") +
|
|
253
256
|
" — they are NOT swept into the worktree; commit or move them first",
|
|
254
|
-
fixHint:
|
|
255
|
-
"commit them in the primary checkout or move them into the session worktree before integrating",
|
|
257
|
+
fixHint: FOREIGN_PRIMARY_DIRT_HINT,
|
|
256
258
|
});
|
|
257
259
|
}
|
|
258
260
|
}
|
|
@@ -326,8 +328,7 @@ export async function openFlowBranchCore(
|
|
|
326
328
|
{
|
|
327
329
|
ruleId: "FLOW-OPEN-02" as const,
|
|
328
330
|
severity: "warning" as const,
|
|
329
|
-
message:
|
|
330
|
-
"flow registry absent or unreadable — pending-branch summary unavailable",
|
|
331
|
+
message: "flow registry absent or unreadable — pending-branch summary unavailable",
|
|
331
332
|
fixHint: `run flow.check for registry diagnostics; repair or remove ${registryPath(common)}`,
|
|
332
333
|
},
|
|
333
334
|
],
|
|
@@ -339,9 +340,7 @@ export async function openFlowBranchCore(
|
|
|
339
340
|
if (!(await io.exists(registryPath(common)))) return unreadable;
|
|
340
341
|
const status = await collectFlowStatus(repoRoot, io, { now });
|
|
341
342
|
if (status.registryError) throw status.registryError;
|
|
342
|
-
const siblings = status.data.branches.filter(
|
|
343
|
-
(b) => b.registered && b.name !== excludeName,
|
|
344
|
-
);
|
|
343
|
+
const siblings = status.data.branches.filter((b) => b.registered && b.name !== excludeName);
|
|
345
344
|
return {
|
|
346
345
|
pending: {
|
|
347
346
|
total: siblings.length,
|
|
@@ -360,7 +359,12 @@ export async function openFlowBranchCore(
|
|
|
360
359
|
};
|
|
361
360
|
|
|
362
361
|
for (let attempt = 1; attempt <= OPEN_MAX_ATTEMPTS; attempt++) {
|
|
363
|
-
const name = formatFlowBranch({
|
|
362
|
+
const name = formatFlowBranch({
|
|
363
|
+
kind: opts.kind as FlowBranchKind,
|
|
364
|
+
date: now,
|
|
365
|
+
seq,
|
|
366
|
+
slug: opts.slug,
|
|
367
|
+
});
|
|
364
368
|
// candidates gains each tried name so a collision retry picks the next NN.
|
|
365
369
|
const worktree = flowWorktreePath(primary, name);
|
|
366
370
|
|
|
@@ -388,16 +392,10 @@ export async function openFlowBranchCore(
|
|
|
388
392
|
};
|
|
389
393
|
}
|
|
390
394
|
|
|
391
|
-
const add = await git(primary, io, [
|
|
392
|
-
"worktree",
|
|
393
|
-
"add",
|
|
394
|
-
"-b",
|
|
395
|
-
name,
|
|
396
|
-
worktree,
|
|
397
|
-
baseRef,
|
|
398
|
-
]);
|
|
395
|
+
const add = await git(primary, io, ["worktree", "add", "-b", name, worktree, baseRef]);
|
|
399
396
|
if (add.exitCode !== 0) {
|
|
400
|
-
const collision =
|
|
397
|
+
const collision =
|
|
398
|
+
add.stderr.includes("already exists") || add.stderr.includes("is already used");
|
|
401
399
|
if (collision) {
|
|
402
400
|
if (attempt < OPEN_MAX_ATTEMPTS) {
|
|
403
401
|
seq = nextFlowSeq([...candidates, name], today);
|
|
@@ -490,12 +488,7 @@ export async function openFlowBranchCore(
|
|
|
490
488
|
setup,
|
|
491
489
|
primaryMutations,
|
|
492
490
|
pending: pending.pending,
|
|
493
|
-
diagnostics: [
|
|
494
|
-
...dirtyPrimaryDiags,
|
|
495
|
-
...pending.diags,
|
|
496
|
-
...rerereDiags,
|
|
497
|
-
...setupDiag,
|
|
498
|
-
],
|
|
491
|
+
diagnostics: [...dirtyPrimaryDiags, ...pending.diags, ...rerereDiags, ...setupDiag],
|
|
499
492
|
};
|
|
500
493
|
}
|
|
501
494
|
return refuse(
|
package/os/flow/index.ts
CHANGED
|
@@ -15,14 +15,14 @@ reachable, else the version-file value.</purpose>
|
|
|
15
15
|
<item>Untagged is not an error — it resolves to the version-file value; only a missing or unparsable version file throws.</item>
|
|
16
16
|
</KEY_DECISIONS>
|
|
17
17
|
<CHANGE_SUMMARY>
|
|
18
|
-
<item>RFC-1494: step 1 — isFlowAdopted public export</item>
|
|
19
18
|
<item>RFC-1495: step 1 - forge state roots</item>
|
|
20
19
|
<item>RFC-1495: steps 2-3 - workshop paths resolver and call-site migration</item>
|
|
21
20
|
<item>RFC-1519: add advisory gate-verdict store for scoped pass reuse across reruns and the commit-integrate boundary</item>
|
|
22
21
|
<item>RFC-1549: route generated onboarding-status commits through session flow on fixed branches
|
|
23
22
|
|
|
24
23
|
commitWerkstattSideEffects skips git add+commit when classifyBranch() yields non-flow (protected/nonconforming), reports written outputPaths; status-hook and deploy/leitstand results propagate onboardingStatus metadata; leitstand.promote surfaces an optional session-worktree integration nextStep. Flow-branch commit behavior unchanged; mission-open fixture rebased to conforming auto/task-YYMMDD-NN branch. AC-1..AC-3 checked.</item>
|
|
25
|
-
<
|
|
24
|
+
<item>RFC-1568: durable gate-run records, --detach mechanics, and forge CLI wiring</item>
|
|
25
|
+
<history>RFC-1493, RFC-1494</history>
|
|
26
26
|
</CHANGE_SUMMARY>
|
|
27
27
|
*/
|
|
28
28
|
|
|
@@ -32,11 +32,7 @@ import { hasManagedBlock, PRECOMMIT_FILE } from "./guard-files.ts";
|
|
|
32
32
|
import { deriveLineVersion } from "./line-version.ts";
|
|
33
33
|
import { detectRepoKind } from "./repo-kind.ts";
|
|
34
34
|
import { discoverReleaseLines } from "./release-lines.ts";
|
|
35
|
-
import {
|
|
36
|
-
primaryWorktree,
|
|
37
|
-
resolveStateRoots,
|
|
38
|
-
type StateRoots,
|
|
39
|
-
} from "./worktree-path.ts";
|
|
35
|
+
import { primaryWorktree, resolveStateRoots, type StateRoots } from "./worktree-path.ts";
|
|
40
36
|
|
|
41
37
|
// RFC-1495: state-root resolution — Forge owns the roots (mission.archive,
|
|
42
38
|
// werkstatt.lock.recover build state paths and Forge must not import
|
|
@@ -47,6 +43,8 @@ export type { StateRoots };
|
|
|
47
43
|
export type { FlowWorktree } from "./git.ts";
|
|
48
44
|
export { classifyBranch } from "./branch-name.ts";
|
|
49
45
|
export type { BranchClass } from "./branch-name.ts";
|
|
46
|
+
// RFC-1568: gate-run hosts share the common-git-dir resolution.
|
|
47
|
+
export { commonGitDir } from "./registry.ts";
|
|
50
48
|
|
|
51
49
|
export interface RepositoryLineVersion {
|
|
52
50
|
/** "6.451.0+12.ab12cd34e" for a tagged line, "6.451.0" from the version file otherwise. */
|