@open-qa/qa 0.1.0-alpha.4 → 0.1.0-alpha.5
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/THIRD_PARTY.md +5 -0
- package/drizzle/0017_provider_notifications.sql +13 -0
- package/drizzle/0018_classification_registry.sql +39 -0
- package/drizzle/0019_trial_audit.sql +44 -0
- package/drizzle/meta/0017_snapshot.json +2092 -0
- package/drizzle/meta/0018_snapshot.json +2102 -0
- package/drizzle/meta/0019_snapshot.json +2451 -0
- package/drizzle/meta/_journal.json +21 -0
- package/package.json +12 -7
- package/src/access-binding.d.ts +8 -0
- package/src/access-binding.js +26 -0
- package/src/adapters/classification-write.d.ts +87 -0
- package/src/adapters/classification-write.js +64 -0
- package/src/adapters/e2b-executor.js +4 -0
- package/src/adapters/file-run-store.d.ts +186 -41
- package/src/adapters/file-run-store.js +87 -19
- package/src/adapters/file-trial-audit.d.ts +280 -0
- package/src/adapters/file-trial-audit.js +105 -0
- package/src/adapters/pg-classification-store.d.ts +98 -20
- package/src/adapters/pg-classification-store.js +84 -44
- package/src/adapters/pg-run-store.d.ts +1 -0
- package/src/adapters/pg-run-store.js +70 -9
- package/src/adapters/run-metadata.d.ts +2 -0
- package/src/adapters/run-metadata.js +10 -0
- package/src/adapters/secret-manager-credential-resolver.d.ts +1 -1
- package/src/attempt-audit.d.ts +363 -0
- package/src/attempt-audit.js +253 -0
- package/src/audit-command.d.ts +13 -0
- package/src/audit-command.js +77 -0
- package/src/classification-command.d.ts +14 -9
- package/src/classification-command.js +119 -26
- package/src/classification-model.d.ts +10 -3
- package/src/classification-model.js +40 -24
- package/src/classification-notifier.d.ts +4 -3
- package/src/classification-notifier.js +26 -6
- package/src/classify-runs.d.ts +2 -1
- package/src/classify-runs.js +39 -3
- package/src/cli-program.js +53 -7
- package/src/commands.d.ts +1 -0
- package/src/commands.js +2 -0
- package/src/db/database.d.ts +7 -0
- package/src/db/database.js +15 -0
- package/src/db/event-chunks.d.ts +38 -29
- package/src/db/flow-status.d.ts +7 -3
- package/src/db/flow-status.js +240 -16
- package/src/db/queries.d.ts +24 -1
- package/src/db/queries.js +22 -0
- package/src/db/schema.d.ts +333 -4
- package/src/db/schema.js +83 -11
- package/src/db/trial-audit.d.ts +526 -0
- package/src/db/trial-audit.js +84 -0
- package/src/draft-api.d.ts +25 -421
- package/src/draft-api.js +10 -3
- package/src/engine.d.ts +47 -4
- package/src/engine.js +97 -8
- package/src/execution-snapshot.d.ts +1 -1
- package/src/execution-snapshot.js +22 -17
- package/src/export-command.d.ts +6 -0
- package/src/export-command.js +106 -0
- package/src/flow-check.js +1 -1
- package/src/flow-loader.d.ts +72 -6
- package/src/flow-loader.js +76 -12
- package/src/http-stage-client.d.ts +98 -1
- package/src/independent-model.js +53 -6
- package/src/judge-review-store.d.ts +13 -0
- package/src/judge-review-store.js +58 -0
- package/src/local-host-executor.d.ts +3 -1
- package/src/local-host-executor.js +2 -0
- package/src/quarantine-command.d.ts +5 -1
- package/src/quarantine-command.js +56 -13
- package/src/remote-command.js +2 -0
- package/src/report/browser.js +37 -37
- package/src/report/ctrf.d.ts +983 -0
- package/src/report/ctrf.js +306 -0
- package/src/report/generate.d.ts +1 -1
- package/src/report/generate.js +29 -6
- package/src/report/load.d.ts +738 -42
- package/src/report/load.js +78 -6
- package/src/result-notifier.js +1 -1
- package/src/result-trace.d.ts +62 -0
- package/src/result-trace.js +81 -0
- package/src/run-command.d.ts +2 -0
- package/src/run-command.js +285 -62
- package/src/run-setup-error.d.ts +1 -1
- package/src/run-setup-error.js +2 -2
- package/src/server/app.js +5 -4
- package/src/server/index.d.ts +2 -0
- package/src/server/index.js +11 -2
- package/src/server/repository.d.ts +166 -29
- package/src/server/repository.js +14 -2
- package/src/studio-review.js +1 -1
- package/src/system-config.d.ts +2 -2
- package/src/system-config.js +5 -4
- package/src/trial-audit.d.ts +630 -0
- package/src/trial-audit.js +272 -0
- package/src/visual-baseline.d.ts +4 -0
- package/src/visual-baseline.js +42 -0
- package/src/webhook-notification.d.ts +15 -0
- package/src/webhook-notification.js +61 -0
- package/src/worker/execution.d.ts +2 -1
- package/src/worker/execution.js +122 -3
- package/src/worker/index.d.ts +4 -0
- package/src/worker/index.js +10 -1
- package/src/worker/quarantine-notifications.js +2 -2
- package/src/worker/queue.d.ts +6 -2
- package/src/worker/queue.js +80 -19
- package/src/worker/result-notifications.d.ts +10 -2
- package/src/worker/result-notifications.js +120 -23
- package/src/worker/store.js +6 -3
package/THIRD_PARTY.md
CHANGED
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
| Geist test fonts | Adjacent LICENSE.txt (SIL OFL) |
|
|
7
7
|
| Bundled dependencies and runtime fonts | Dependency package LICENSE/NOTICE files inside the Studio runtime archive |
|
|
8
8
|
| rrweb report runtime | Inline legal notices in the generated report bundle |
|
|
9
|
+
| CTRF 0.3.0 test schema | apps/qa/fixtures/ctrf/LICENSE.txt (MIT) |
|
|
9
10
|
|
|
10
11
|
Registry dependencies retain their respective licenses. Synthetic media reproduction steps are recorded in
|
|
11
12
|
apps/qa/docs/public-fixtures.md. Installed dependency inventory is provided as
|
|
12
13
|
CycloneDX SBOM evidence alongside release artifacts.
|
|
14
|
+
|
|
15
|
+
The stage uses the unmodified [`@axe-core/playwright` 4.14.0 wrapper](https://github.com/dequelabs/axe-core-npm/tree/2375f7f5523a2accaeef91a3cb12e30a46e7fbea/packages/playwright)
|
|
16
|
+
and the [`axe-core` 4.14.0 engine](https://github.com/dequelabs/axe-core). Both registry
|
|
17
|
+
packages include their [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/) notices.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
ALTER TABLE "qa"."result_notifications" DROP CONSTRAINT "result_notification_channel";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "qa"."result_notifications" ADD COLUMN "kind" text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "qa"."result_notifications" ADD COLUMN "provider" text;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "qa"."result_notifications" ADD CONSTRAINT "result_notification_route" CHECK (("qa"."result_notifications"."kind" IS NULL AND "qa"."result_notifications"."provider" IS NULL) OR (
|
|
5
|
+
"qa"."result_notifications"."kind" IS NOT NULL AND "qa"."result_notifications"."provider" IS NOT NULL
|
|
6
|
+
AND "qa"."result_notifications"."kind" ~ '^[a-z][a-z0-9.-]{0,63}$'
|
|
7
|
+
AND "qa"."result_notifications"."provider" ~ '^[a-z][a-z0-9-]{0,63}$'
|
|
8
|
+
));--> statement-breakpoint
|
|
9
|
+
ALTER TABLE "qa"."result_notifications" ADD CONSTRAINT "result_notification_channel" CHECK ("qa"."result_notifications"."channel" ~ '^[a-z][a-z0-9-]{0,69}$');
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
UPDATE "qa"."result_notifications"
|
|
12
|
+
SET "kind" = 'batch.completed', "provider" = "channel"
|
|
13
|
+
WHERE "channel" IN ('commit', 'pr', 'discord');
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
ALTER TABLE "qa"."classification_labels" DROP CONSTRAINT "classification_label_category";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "qa"."classification_labels" DROP CONSTRAINT "classification_prediction_category";--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "qa"."runs" DROP CONSTRAINT "run_classification";--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "qa"."runs" DROP CONSTRAINT "run_classification_metadata";--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "qa"."classification_labels" ADD COLUMN "details" jsonb;--> statement-breakpoint
|
|
6
|
+
ALTER TABLE "qa"."classification_labels" ADD CONSTRAINT "classification_label_details" CHECK (jsonb_typeof("qa"."classification_labels"."details") = 'object'
|
|
7
|
+
AND (NOT ("qa"."classification_labels"."details" ? 'taxonomy') OR (
|
|
8
|
+
jsonb_typeof("qa"."classification_labels"."details"->'taxonomy') = 'object'
|
|
9
|
+
AND jsonb_typeof("qa"."classification_labels"."details"->'taxonomy'->'project') = 'string'
|
|
10
|
+
AND "qa"."classification_labels"."details"->'taxonomy'->>'project' = "qa"."classification_labels"."project_id"
|
|
11
|
+
AND jsonb_typeof("qa"."classification_labels"."details"->'taxonomy'->'version') = 'string'
|
|
12
|
+
AND length("qa"."classification_labels"."details"->'taxonomy'->>'version') BETWEEN 1 AND 70
|
|
13
|
+
) IS TRUE));--> statement-breakpoint
|
|
14
|
+
ALTER TABLE "qa"."classification_labels" ADD CONSTRAINT "classification_label_category" CHECK (length("qa"."classification_labels"."category") BETWEEN 1 AND 70);--> statement-breakpoint
|
|
15
|
+
ALTER TABLE "qa"."classification_labels" ADD CONSTRAINT "classification_prediction_category" CHECK (jsonb_typeof("qa"."classification_labels"."predicted") = 'null' OR (jsonb_typeof("qa"."classification_labels"."predicted") = 'object'
|
|
16
|
+
AND (NOT ("qa"."classification_labels"."predicted" ? 'category') OR jsonb_typeof("qa"."classification_labels"."predicted"->'category') IN ('null', 'string'))
|
|
17
|
+
AND (NOT ("qa"."classification_labels"."predicted" ? 'taxonomy') OR (
|
|
18
|
+
jsonb_typeof("qa"."classification_labels"."predicted"->'taxonomy') = 'object'
|
|
19
|
+
AND jsonb_typeof("qa"."classification_labels"."predicted"->'taxonomy'->'project') = 'string'
|
|
20
|
+
AND "qa"."classification_labels"."predicted"->'taxonomy'->>'project' = "qa"."classification_labels"."project_id"
|
|
21
|
+
AND jsonb_typeof("qa"."classification_labels"."predicted"->'taxonomy'->'version') = 'string'
|
|
22
|
+
AND length("qa"."classification_labels"."predicted"->'taxonomy'->>'version') BETWEEN 1 AND 70
|
|
23
|
+
) IS TRUE)));--> statement-breakpoint
|
|
24
|
+
ALTER TABLE "qa"."runs" ADD CONSTRAINT "run_classification" CHECK (length("qa"."runs"."classification") BETWEEN 1 AND 70);--> statement-breakpoint
|
|
25
|
+
ALTER TABLE "qa"."runs" ADD CONSTRAINT "run_classification_metadata" CHECK (NOT ("qa"."runs"."metadata" ? 'failureClassification')
|
|
26
|
+
OR jsonb_typeof("qa"."runs"."metadata"->'failureClassification') = 'null'
|
|
27
|
+
OR (jsonb_typeof("qa"."runs"."metadata"->'failureClassification') = 'object'
|
|
28
|
+
AND (NOT (("qa"."runs"."metadata"->'failureClassification') ? 'category') OR jsonb_typeof(("qa"."runs"."metadata"->'failureClassification')->'category') IN ('null', 'string'))
|
|
29
|
+
AND (NOT ("qa"."runs"."metadata"->'failureClassification' ? 'taxonomy') OR (
|
|
30
|
+
(NOT (("qa"."runs"."metadata"->'failureClassification') ? 'taxonomy') OR (
|
|
31
|
+
jsonb_typeof(("qa"."runs"."metadata"->'failureClassification')->'taxonomy') = 'object'
|
|
32
|
+
AND jsonb_typeof(("qa"."runs"."metadata"->'failureClassification')->'taxonomy'->'project') = 'string'
|
|
33
|
+
AND ("qa"."runs"."metadata"->'failureClassification')->'taxonomy'->>'project' = "qa"."runs"."project_id"
|
|
34
|
+
AND jsonb_typeof(("qa"."runs"."metadata"->'failureClassification')->'taxonomy'->'version') = 'string'
|
|
35
|
+
AND length(("qa"."runs"."metadata"->'failureClassification')->'taxonomy'->>'version') BETWEEN 1 AND 70
|
|
36
|
+
) IS TRUE)
|
|
37
|
+
AND ("qa"."runs"."metadata"->'failureClassification' ? 'category')
|
|
38
|
+
AND "qa"."runs"."metadata"->'failureClassification'->>'category' IS NOT DISTINCT FROM "qa"."runs"."classification"
|
|
39
|
+
))));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
CREATE TABLE "qa"."audit_decisions" (
|
|
2
|
+
"project_id" text NOT NULL,
|
|
3
|
+
"subject" text NOT NULL,
|
|
4
|
+
"key" text NOT NULL,
|
|
5
|
+
"document" jsonb NOT NULL,
|
|
6
|
+
CONSTRAINT "audit_decisions_project_id_subject_key_pk" PRIMARY KEY("project_id","subject","key")
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE TABLE "qa"."trial_group_receipts" (
|
|
10
|
+
"project_id" text NOT NULL,
|
|
11
|
+
"group_id" text NOT NULL,
|
|
12
|
+
"key" text NOT NULL,
|
|
13
|
+
"document" jsonb NOT NULL,
|
|
14
|
+
CONSTRAINT "trial_group_receipts_project_id_group_id_key_pk" PRIMARY KEY("project_id","group_id","key")
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
CREATE TABLE "qa"."trial_groups" (
|
|
18
|
+
"project_id" text NOT NULL,
|
|
19
|
+
"group_id" text NOT NULL,
|
|
20
|
+
"flow" text NOT NULL,
|
|
21
|
+
"started_at" double precision NOT NULL,
|
|
22
|
+
"document" jsonb NOT NULL,
|
|
23
|
+
CONSTRAINT "trial_groups_project_id_group_id_pk" PRIMARY KEY("project_id","group_id")
|
|
24
|
+
);
|
|
25
|
+
--> statement-breakpoint
|
|
26
|
+
ALTER TABLE "qa"."trial_group_receipts" ADD CONSTRAINT "trial_group_receipts_group" FOREIGN KEY ("project_id","group_id") REFERENCES "qa"."trial_groups"("project_id","group_id") ON DELETE no action ON UPDATE no action;
|
|
27
|
+
--> statement-breakpoint
|
|
28
|
+
CREATE INDEX "trial_groups_flow" ON "qa"."trial_groups" USING btree ("project_id","flow","started_at");
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
CREATE FUNCTION "qa"."reject_audit_mutation"() RETURNS trigger
|
|
31
|
+
LANGUAGE plpgsql AS $$
|
|
32
|
+
BEGIN
|
|
33
|
+
RAISE EXCEPTION 'QA audit tables are append-only';
|
|
34
|
+
END;
|
|
35
|
+
$$;
|
|
36
|
+
--> statement-breakpoint
|
|
37
|
+
CREATE TRIGGER "trial_groups_append_only" BEFORE UPDATE OR DELETE ON "qa"."trial_groups"
|
|
38
|
+
FOR EACH ROW EXECUTE FUNCTION "qa"."reject_audit_mutation"();
|
|
39
|
+
--> statement-breakpoint
|
|
40
|
+
CREATE TRIGGER "trial_group_receipts_append_only" BEFORE UPDATE OR DELETE ON "qa"."trial_group_receipts"
|
|
41
|
+
FOR EACH ROW EXECUTE FUNCTION "qa"."reject_audit_mutation"();
|
|
42
|
+
--> statement-breakpoint
|
|
43
|
+
CREATE TRIGGER "audit_decisions_append_only" BEFORE UPDATE OR DELETE ON "qa"."audit_decisions"
|
|
44
|
+
FOR EACH ROW EXECUTE FUNCTION "qa"."reject_audit_mutation"();
|