pi-usereq 0.43.0 → 0.45.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 +27 -0
- package/README.md +1 -1
- package/package.json +7 -2
- package/pi-usereq/docs/REFERENCES.md +185 -143
- package/pi-usereq/docs/REQUIREMENTS.md +23 -8
- package/pi-usereq/docs/WORKFLOW.md +14 -7
- package/scripts/install-static-checkers.ts +48 -1
- package/src/core/static-check.ts +13 -7
- package/src/index.ts +235 -20
- package/tests/extension-registration.test.ts +17 -7
|
@@ -3633,7 +3633,7 @@ test("worktree-enabled prompt commands honor overridden worktree prefixes", asyn
|
|
|
3633
3633
|
}
|
|
3634
3634
|
});
|
|
3635
3635
|
|
|
3636
|
-
test("worktree-backed prompt failures
|
|
3636
|
+
test("worktree-backed prompt failures keep the worktree session, retain worktree, and park in error", async () => {
|
|
3637
3637
|
const { projectBase } = initFixtureRepo({ fixtures: [] });
|
|
3638
3638
|
const previousCwd = process.cwd();
|
|
3639
3639
|
try {
|
|
@@ -3658,8 +3658,11 @@ test("worktree-backed prompt failures skip merge, restore base-path, and retain
|
|
|
3658
3658
|
messages: [{ role: "assistant", stopReason: "error", content: [] }],
|
|
3659
3659
|
}, ctx);
|
|
3660
3660
|
|
|
3661
|
-
|
|
3662
|
-
|
|
3661
|
+
// The original base-path session MUST NOT be resumed on failure; the
|
|
3662
|
+
// client stays on the worktree execution session so the failure stays
|
|
3663
|
+
// visible until req-reset restores base-path and removes the worktree.
|
|
3664
|
+
assert.equal(process.cwd(), executionBasePath);
|
|
3665
|
+
assert.equal(ctx.cwd, executionBasePath);
|
|
3663
3666
|
assert.equal(fs.existsSync(executionBasePath), true);
|
|
3664
3667
|
assert.equal(fs.existsSync(path.join(projectBase, "src", "failed.ts")), false);
|
|
3665
3668
|
assert.equal(
|
|
@@ -3674,8 +3677,8 @@ test("worktree-backed prompt failures skip merge, restore base-path, and retain
|
|
|
3674
3677
|
assert.equal(
|
|
3675
3678
|
ctx.__state.statuses.get("pi-usereq"),
|
|
3676
3679
|
buildExpectedFakeStatusText({
|
|
3677
|
-
workflowState: "
|
|
3678
|
-
basePath: buildExpectedFakeBasePath(
|
|
3680
|
+
workflowState: "error",
|
|
3681
|
+
basePath: buildExpectedFakeBasePath(executionBasePath),
|
|
3679
3682
|
docsDir: DEFAULT_DOCS_DIR,
|
|
3680
3683
|
testsDir: "tests",
|
|
3681
3684
|
srcDir: ["src"],
|
|
@@ -6689,10 +6692,17 @@ test("configuration menu omits removed static-check raw-spec and reference actio
|
|
|
6689
6692
|
const renderedStaticCheckMenu = (ctx.__state.customRenderLines[1] ?? []).join("\n");
|
|
6690
6693
|
const staticCheckItems = ctx.__state.selectCalls[1]?.items ?? [];
|
|
6691
6694
|
assert.match(renderedStaticCheckMenu, /Add static code checker/);
|
|
6695
|
+
assert.match(renderedStaticCheckMenu, /View static code checker/);
|
|
6692
6696
|
assert.match(renderedStaticCheckMenu, /Remove static code checker/);
|
|
6693
|
-
assert.
|
|
6697
|
+
assert.match(renderedStaticCheckMenu, /Reset static code checker/);
|
|
6698
|
+
assert.deepEqual(staticCheckItems.slice(0, 4), [
|
|
6699
|
+
"Add static code checker",
|
|
6700
|
+
"View static code checker",
|
|
6701
|
+
"Remove static code checker",
|
|
6702
|
+
"Reset static code checker",
|
|
6703
|
+
]);
|
|
6694
6704
|
assert.deepEqual(
|
|
6695
|
-
staticCheckItems.slice(
|
|
6705
|
+
staticCheckItems.slice(4, 24),
|
|
6696
6706
|
getSupportedStaticCheckLanguageSupport().map((entry) => entry.language),
|
|
6697
6707
|
);
|
|
6698
6708
|
assert.deepEqual(staticCheckItems.slice(-1), ["Reset defaults"]);
|