@shivaedev/quality 0.61.0 → 0.61.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 +10 -0
- package/README.md +1 -1
- package/dist/adapters/queueReadoutFindings.d.ts.map +1 -1
- package/dist/adapters/queueReadoutFindings.js +5 -2
- package/dist/adapters/queueReadoutFindings.js.map +1 -1
- package/dist/adapters/queueTestingOrigin.js +1 -1
- package/dist/adapters/queueTestingOrigin.js.map +1 -1
- package/dist/rules/stories/queueReadouts.js +1 -1
- package/dist/rules/stories/queueReadouts.js.map +1 -1
- package/package.json +14 -14
- package/src/adapters/queueReadoutFindings.ts +5 -2
- package/src/adapters/queueTestingOrigin.ts +1 -1
- package/src/rules/stories/queueReadouts.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.61.1 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Require Effect 4.0.7 and its matching companion packages. Install the 4.0.7 Effect stack together.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Recognize the test-kits controller import and its jobs stories when checking story assertions against queue storage; applications and other kits remain checked.
|
|
12
|
+
|
|
3
13
|
## 0.61.0 - 2026-11-04
|
|
4
14
|
|
|
5
15
|
### Added
|
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ Settle on the engine's own signal through a kit verb. A deadline bounds a failur
|
|
|
297
297
|
|
|
298
298
|
`tests/positive-refusals` reports `.not.toBe` and `.not.toEqual` on a readout or field whose name ends in `outcome` (case insensitive), including locally stored readout aliases. In the same story, positively assert a concrete domain reason or public response on that same outcome with `toBe`, `toEqual`, `toMatchObject` or an `outcomes` row. For example, pair `expect(yield* submitOutcome()).not.toBe("saved")` with `expect(yield* submitOutcome()).toBe("unauthorized")`, or replace the negative check with the positive one. Another story, another outcome, an empty object or a boolean does not supply that evidence. The rule uses the same story-file scope and prerequisite exemptions as `tests/domain-outcomes`; it checks visible assertion syntax, while review establishes that a readout preserves unexpected failures.
|
|
299
299
|
|
|
300
|
-
`tests/queue-readouts` reports access to jobs-testing's `jobs` and `snapshot` readouts in tests and `test-support/`, including wrappers that return counts or job states. An enqueued job does not prove the work ran: assert the application's visible result instead. Worker controls and waits remain available. The check recognizes receivers named `jobsTesting`, controllers constructed with `makePgBossTesting` or annotated with the imported `PgBossTesting` type, local and imported aliases, destructuring and literal bracket access. It does not evaluate dynamic property names or arbitrary controller factories. The package named `@shivaedev/jobs` is exempt, at the repository root or wherever it lives in the workspace; nested application packages remain checked. This rule refuses config exceptions and inline suppressions.
|
|
300
|
+
`tests/queue-readouts` reports access to jobs-testing's `jobs` and `snapshot` readouts in tests and `test-support/`, including wrappers that return counts or job states. An enqueued job does not prove the work ran: assert the application's visible result instead. Worker controls and waits remain available. The check recognizes receivers named `jobsTesting`, controllers constructed with `makePgBossTesting` or annotated with the imported `PgBossTesting` type, local and imported aliases, destructuring and literal bracket access. It does not evaluate dynamic property names or arbitrary controller factories. The package named `@shivaedev/jobs` is exempt, at the repository root or wherever it lives in the workspace; test-kits also owns readout evidence under its `src/jobs/` and `src/test-support/jobs/` folders. Other test-kits domains and nested application packages remain checked. This rule refuses config exceptions and inline suppressions.
|
|
301
301
|
|
|
302
302
|
`boundaries/queue-sql` rejects SQL mentioning the private `pgboss.` schema. Apps use their queue definitions and let workers process jobs; there is no queue-purge API by design. `boundaries/auth-sql` rejects SQL accessing Better Auth's `user`, `account`, `session` and `verification` tables. App tables reference users by foreign key: migrations may reference only `user(id)` with `ON DELETE CASCADE` or `ON DELETE SET NULL`. Import `userReference` from `@shivaedev/identity/server/better-auth/userReference.ts` and interpolate `sql(userReference.table)` and `sql(userReference.column)` in the reference. Apps use identity for account data; `options.owners` names platform's own auth implementation and its migrations. These rules inspect SQL templates, literal query calls and query variables, and inventoried `.sql` files. They do not evaluate arbitrary runtime SQL construction.
|
|
303
303
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueReadoutFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/queueReadoutFindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,eAAO,MAAM,oBAAoB;;;;
|
|
1
|
+
{"version":3,"file":"queueReadoutFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/queueReadoutFindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,eAAO,MAAM,oBAAoB;;;;uEAwB/B,CAAC"}
|
|
@@ -15,8 +15,11 @@ export const queueReadoutFindings = Effect.fn("Stories.queueReadoutFindings")(fu
|
|
|
15
15
|
const program = storyProgram(inputs, graph);
|
|
16
16
|
const origin = queueTestingOrigin(program.getTypeChecker());
|
|
17
17
|
return inputs.sources.flatMap((file) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const workspace = packageOf(graph.packages, file.path);
|
|
19
|
+
const owner = workspace?.name ?? root?.name;
|
|
20
|
+
const local = workspace === undefined ? file.path : file.path.slice(workspace.directory.length + 1);
|
|
21
|
+
const controller = owner === "@shivaedev/test-kits" && (local.startsWith("src/jobs/") || local.startsWith("src/test-support/jobs/"));
|
|
22
|
+
if (!isTestCode(file.path) || owner === "@shivaedev/jobs" || controller) {
|
|
20
23
|
return [];
|
|
21
24
|
}
|
|
22
25
|
const source = program.getSourceFile(join(inputs.root, file.path));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueReadoutFindings.js","sourceRoot":"","sources":["../../src/adapters/queueReadoutFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW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@ -1,7 +1,7 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { importFrom } from "#rules/stories/importOrigin.ts";
|
|
3
3
|
import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
4
|
-
const TESTING_MODULE = "@shivaedev/jobs/
|
|
4
|
+
const TESTING_MODULE = "@shivaedev/test-kits/jobs/testing.ts";
|
|
5
5
|
function importedOrigin(node) {
|
|
6
6
|
if (importFrom(node) !== TESTING_MODULE) {
|
|
7
7
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueTestingOrigin.js","sourceRoot":"","sources":["../../src/adapters/queueTestingOrigin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIjE,MAAM,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"queueTestingOrigin.js","sourceRoot":"","sources":["../../src/adapters/queueTestingOrigin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIjE,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAE9D,SAAS,cAAc,CAAC,IAAa;IACpC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,cAAc,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,IAAI,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IA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Readouts = defineRule({
|
|
4
4
|
check: queueReadoutFindings,
|
|
5
|
-
description: "Application tests assert job results, never jobs-testing queue storage;
|
|
5
|
+
description: "Application tests assert job results, never jobs-testing queue storage; jobs and the test-kits controller test their own readouts.",
|
|
6
6
|
id: "tests/queue-readouts",
|
|
7
7
|
registrable: false,
|
|
8
8
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueReadouts.js","sourceRoot":"","sources":["../../../src/rules/stories/queueReadouts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACvC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"queueReadouts.js","sourceRoot":"","sources":["../../../src/rules/stories/queueReadouts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACvC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,oIAAoI;IACjJ,EAAE,EAAE,sBAAsB;IAC1B,WAAW,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/quality",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.1",
|
|
4
4
|
"description": "Repository quality gate with typed rules, a baseline of existing debt and a registry of reasoned exceptions",
|
|
5
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/quality#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@biomejs/biome": "2.6.3",
|
|
54
|
-
"@shivaedev/errors": "0.9.
|
|
55
|
-
"@shivaedev/heavy-lock": "0.10.
|
|
56
|
-
"@shivaedev/service": "0.7.
|
|
54
|
+
"@shivaedev/errors": "0.9.1",
|
|
55
|
+
"@shivaedev/heavy-lock": "0.10.1",
|
|
56
|
+
"@shivaedev/service": "0.7.1",
|
|
57
57
|
"@vitest/coverage-v8": "5.0.5",
|
|
58
58
|
"ignore": "7.0.14",
|
|
59
59
|
"knip": "6.43.0",
|
|
@@ -61,21 +61,21 @@
|
|
|
61
61
|
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@effect/platform-node": "4.0.
|
|
65
|
-
"@effect/platform-node-shared": "4.0.
|
|
66
|
-
"@effect/vitest": "4.0.
|
|
67
|
-
"@shivaedev/test": "0.15.
|
|
68
|
-
"@shivaedev/test-story": "0.39.
|
|
64
|
+
"@effect/platform-node": "4.0.7",
|
|
65
|
+
"@effect/platform-node-shared": "4.0.7",
|
|
66
|
+
"@effect/vitest": "4.0.7",
|
|
67
|
+
"@shivaedev/test": "0.15.1",
|
|
68
|
+
"@shivaedev/test-story": "0.39.1",
|
|
69
69
|
"@types/node": "24.19.2",
|
|
70
70
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
71
|
-
"effect": "4.0.
|
|
71
|
+
"effect": "4.0.7",
|
|
72
72
|
"vitest": "5.0.5"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@effect/platform-node": "4.0.
|
|
76
|
-
"@effect/platform-node-shared": "4.0.
|
|
77
|
-
"@shivaedev/test-story": "0.39.
|
|
78
|
-
"effect": "4.0.
|
|
75
|
+
"@effect/platform-node": "4.0.7",
|
|
76
|
+
"@effect/platform-node-shared": "4.0.7",
|
|
77
|
+
"@shivaedev/test-story": "0.39.1",
|
|
78
|
+
"effect": "4.0.7",
|
|
79
79
|
"vitest": "5.0.5"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
@@ -19,8 +19,11 @@ export const queueReadoutFindings = Effect.fn("Stories.queueReadoutFindings")(fu
|
|
|
19
19
|
const program = storyProgram(inputs, graph);
|
|
20
20
|
const origin = queueTestingOrigin(program.getTypeChecker());
|
|
21
21
|
return inputs.sources.flatMap((file) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const workspace = packageOf(graph.packages, file.path);
|
|
23
|
+
const owner = workspace?.name ?? root?.name;
|
|
24
|
+
const local = workspace === undefined ? file.path : file.path.slice(workspace.directory.length + 1);
|
|
25
|
+
const controller = owner === "@shivaedev/test-kits" && (local.startsWith("src/jobs/") || local.startsWith("src/test-support/jobs/"));
|
|
26
|
+
if (!isTestCode(file.path) || owner === "@shivaedev/jobs" || controller) {
|
|
24
27
|
return [];
|
|
25
28
|
}
|
|
26
29
|
const source = program.getSourceFile(join(inputs.root, file.path));
|
|
@@ -4,7 +4,7 @@ import { memberName, unwrapped } from "#rules/stories/syntax.ts";
|
|
|
4
4
|
|
|
5
5
|
type Origin = "module" | "factory" | "controller" | "readout" | undefined;
|
|
6
6
|
|
|
7
|
-
const TESTING_MODULE = "@shivaedev/jobs/
|
|
7
|
+
const TESTING_MODULE = "@shivaedev/test-kits/jobs/testing.ts";
|
|
8
8
|
|
|
9
9
|
function importedOrigin(node: ts.Node): Origin {
|
|
10
10
|
if (importFrom(node) !== TESTING_MODULE) {
|
|
@@ -3,7 +3,7 @@ import { defineRule } from "#rule.ts";
|
|
|
3
3
|
|
|
4
4
|
export const queueReadouts = defineRule({
|
|
5
5
|
check: queueReadoutFindings,
|
|
6
|
-
description: "Application tests assert job results, never jobs-testing queue storage;
|
|
6
|
+
description: "Application tests assert job results, never jobs-testing queue storage; jobs and the test-kits controller test their own readouts.",
|
|
7
7
|
id: "tests/queue-readouts",
|
|
8
8
|
registrable: false,
|
|
9
9
|
});
|