@warpgogol/forge 9.3.0 → 9.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/os/flow/scripts.d.ts.map +1 -1
- package/dist/os/flow/scripts.js +5 -1
- package/dist/os/flow/scripts.js.map +1 -1
- package/os/flow/scripts.ts +10 -5
- package/os/flow/tests/scripts.test.ts +13 -0
- package/package.json +1 -1
- package/profiles/forge-shell.yaml +1 -2
- package/profiles/knowledge.yaml +1 -1
- package/profiles/system.yaml +2 -2
- package/profiles/typescript.yaml +0 -1
- package/src/tests/profile-flow-hooks.test.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
For the full commit history, see the [GitHub releases page](https://github.com/syrokomskyi/forge/releases).
|
|
8
8
|
|
|
9
|
+
## [9.3.1] — 2026-11-04
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Integration gates of profiles without artifacts**: `system`, `forge-shell` and `knowledge` scaffolded a `hooks/integration-gate.sh` that ran `forge validate`, which exits 1 on a profile without artifacts, so every integration was refused once forge was installed. `system` now gates on `system.map.validate`, the other two on `forge doctor`. Existing repositories change the line in their own `hooks/integration-gate.sh`.
|
|
14
|
+
- **Refusals name their reason**: a flow hook that fails with output only on stdout now reports that output instead of an empty reason.
|
|
15
|
+
- **Profile READMEs** no longer tell `typescript`, `forge-shell` and `knowledge` repositories to run `forge validate`.
|
|
16
|
+
|
|
9
17
|
## [9.3.0] — 2026-11-04
|
|
10
18
|
|
|
11
19
|
_System repositories: Forge can now coordinate several products from one repository. Releases verify a package before tagging it, and failed publications no longer keep `flow.push` red._
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../os/flow/scripts.ts"],"names":[],"mappings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M,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAClE,OAAO,CAAC,gBAAgB,CAAC,CAuB3B"}
|
package/dist/os/flow/scripts.js
CHANGED
|
@@ -35,11 +35,15 @@ export async function runFlowScript(io, name, opts) {
|
|
|
35
35
|
return { status: "skipped", exitCode: null, stderrTail: "", stdout: "" };
|
|
36
36
|
}
|
|
37
37
|
const result = await io.exec("sh", [scriptPath], { cwd: opts.cwd, env: opts.env });
|
|
38
|
-
|
|
38
|
+
// A failing hook may report only on stdout (forge commands do); an empty tail
|
|
39
|
+
// would leave the refusal without a reason.
|
|
40
|
+
const tailOf = (text) => text
|
|
39
41
|
.split("\n")
|
|
40
42
|
.filter((line) => line.length > 0)
|
|
41
43
|
.slice(-STDERR_TAIL_LINES)
|
|
42
44
|
.join("\n");
|
|
45
|
+
const stderrTail = tailOf(result.stderr);
|
|
46
|
+
const tail = stderrTail === "" && result.exitCode !== 0 ? tailOf(result.stdout) : stderrTail;
|
|
43
47
|
const stdout = result.stdout.length > STDOUT_CAP
|
|
44
48
|
? `${result.stdout.slice(0, STDOUT_CAP)}…[truncated]`
|
|
45
49
|
: result.stdout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../os/flow/scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAoBjC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,EAAe,EACf,IAAoB,EACpB,IAAmE;IAEnE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,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AAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACnF,8EAA8E;IAC9E,4CAA4C;IAC5C,MAAM,MAAM,GAAG,CAAC,IAAY,EAAU,EAAE,CACtC,IAAI;SACD,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,KAAK,CAAC,CAAC,iBAAiB,CAAC;SACzB,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,UAAU,KAAK,EAAE,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAC7F,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU;QAC/B,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc;QACrD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACpB,OAAO,MAAM,CAAC,QAAQ,KAAK,CAAC;QAC1B,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;QACzE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAChF,CAAC"}
|
package/os/flow/scripts.ts
CHANGED
|
@@ -60,11 +60,16 @@ export async function runFlowScript(
|
|
|
60
60
|
return { status: "skipped", exitCode: null, stderrTail: "", stdout: "" };
|
|
61
61
|
}
|
|
62
62
|
const result = await io.exec("sh", [scriptPath], { cwd: opts.cwd, env: opts.env });
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
// A failing hook may report only on stdout (forge commands do); an empty tail
|
|
64
|
+
// would leave the refusal without a reason.
|
|
65
|
+
const tailOf = (text: string): string =>
|
|
66
|
+
text
|
|
67
|
+
.split("\n")
|
|
68
|
+
.filter((line) => line.length > 0)
|
|
69
|
+
.slice(-STDERR_TAIL_LINES)
|
|
70
|
+
.join("\n");
|
|
71
|
+
const stderrTail = tailOf(result.stderr);
|
|
72
|
+
const tail = stderrTail === "" && result.exitCode !== 0 ? tailOf(result.stdout) : stderrTail;
|
|
68
73
|
const stdout =
|
|
69
74
|
result.stdout.length > STDOUT_CAP
|
|
70
75
|
? `${result.stdout.slice(0, STDOUT_CAP)}…[truncated]`
|
|
@@ -82,6 +82,19 @@ describe("runFlowScript", () => {
|
|
|
82
82
|
expect(result.stderrTail).not.toContain("line-4\n");
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
+
it("a failure that wrote only to stdout reports the stdout tail", async () => {
|
|
86
|
+
const primary = await dir();
|
|
87
|
+
const branch = await dir();
|
|
88
|
+
await writeScript(primary, "integration-gate", `echo "the reason"\nexit 1`);
|
|
89
|
+
const result = await runFlowScript(ambientIo, "integration-gate", {
|
|
90
|
+
primary,
|
|
91
|
+
cwd: branch,
|
|
92
|
+
env: {},
|
|
93
|
+
});
|
|
94
|
+
expect(result.status).toBe("failed");
|
|
95
|
+
expect(result.stderrTail).toContain("the reason");
|
|
96
|
+
});
|
|
97
|
+
|
|
85
98
|
it("uses the primary copy even when the branch worktree carries a different one (G1)", async () => {
|
|
86
99
|
const primary = await dir();
|
|
87
100
|
const branch = await dir();
|
package/package.json
CHANGED
|
@@ -593,7 +593,6 @@ workspace:
|
|
|
593
593
|
|
|
594
594
|
```sh
|
|
595
595
|
pnpm exec forge doctor
|
|
596
|
-
pnpm exec forge validate
|
|
597
596
|
```
|
|
598
597
|
|
|
599
598
|
## Stack
|
|
@@ -614,7 +613,7 @@ workspace:
|
|
|
614
613
|
# cwd: the worktree under judgment; non-zero exit refuses.
|
|
615
614
|
set -eu
|
|
616
615
|
if [ -e node_modules/.bin/forge ]; then
|
|
617
|
-
pnpm exec forge
|
|
616
|
+
pnpm exec forge doctor
|
|
618
617
|
else
|
|
619
618
|
echo "integration-gate: forge is not installed — skipping validation" >&2
|
|
620
619
|
exit 0
|
package/profiles/knowledge.yaml
CHANGED
|
@@ -437,7 +437,7 @@ workspace:
|
|
|
437
437
|
# cwd: the worktree under judgment; non-zero exit refuses.
|
|
438
438
|
set -eu
|
|
439
439
|
if [ -e node_modules/.bin/forge ]; then
|
|
440
|
-
pnpm exec forge
|
|
440
|
+
pnpm exec forge doctor
|
|
441
441
|
else
|
|
442
442
|
echo "integration-gate: forge is not installed — skipping validation" >&2
|
|
443
443
|
exit 0
|
package/profiles/system.yaml
CHANGED
|
@@ -620,7 +620,7 @@ workspace:
|
|
|
620
620
|
|
|
621
621
|
```sh
|
|
622
622
|
pnpm exec forge doctor
|
|
623
|
-
pnpm exec forge validate
|
|
623
|
+
pnpm exec forge system.map.validate
|
|
624
624
|
```
|
|
625
625
|
|
|
626
626
|
## Stack
|
|
@@ -641,7 +641,7 @@ workspace:
|
|
|
641
641
|
# cwd: the worktree under judgment; non-zero exit refuses.
|
|
642
642
|
set -eu
|
|
643
643
|
if [ -e node_modules/.bin/forge ]; then
|
|
644
|
-
pnpm exec forge validate
|
|
644
|
+
pnpm exec forge system.map.validate
|
|
645
645
|
else
|
|
646
646
|
echo "integration-gate: forge is not installed — skipping validation" >&2
|
|
647
647
|
exit 0
|
package/profiles/typescript.yaml
CHANGED
|
@@ -54,6 +54,15 @@ describe("RFC-1500: built-in profiles ship flow hooks (AC-4)", () => {
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
// forge validate exits 1 on a profile without artifacts, so such a gate
|
|
58
|
+
// would refuse every integration as soon as forge is installed.
|
|
59
|
+
it("integration-gate.sh runs forge validate only when the profile declares artifacts", () => {
|
|
60
|
+
const gate = files.find((f) => f.path === "hooks/integration-gate.sh");
|
|
61
|
+
expect(gate).toBeDefined();
|
|
62
|
+
const callsValidate = /\bforge validate\b/.test(gate!.content);
|
|
63
|
+
expect(callsValidate && (profile.artifacts ?? []).length === 0).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
|
|
57
66
|
for (const hookPath of HOOK_PATHS) {
|
|
58
67
|
it(`${hookPath} starts with #!/bin/sh and parses with sh -n`, async () => {
|
|
59
68
|
const entry = files.find((f) => f.path === hookPath);
|
|
@@ -74,4 +83,10 @@ describe("RFC-1500: built-in profiles ship flow hooks (AC-4)", () => {
|
|
|
74
83
|
}
|
|
75
84
|
});
|
|
76
85
|
}
|
|
86
|
+
|
|
87
|
+
it("the system profile gates integrations on system.map.validate", () => {
|
|
88
|
+
const system = profiles.find((p) => p.id === "system");
|
|
89
|
+
const gate = system?.workspace.files.find((f) => f.path === "hooks/integration-gate.sh");
|
|
90
|
+
expect(gate?.content).toContain("pnpm exec forge system.map.validate");
|
|
91
|
+
});
|
|
77
92
|
});
|