@attalabs/vinaya 0.44.0 → 0.47.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/README.md +6 -4
- package/dist/checks/bin/check-body-bare-digits.js +262 -201
- package/dist/checks/bin/check-branch-topology.js +70 -23
- package/dist/checks/bin/check-brief-shape.js +262 -201
- package/dist/checks/bin/check-changeset-coverage.js +94 -16
- package/dist/checks/bin/check-ci-shard-coverage.js +3 -0
- package/dist/checks/bin/check-closes-n.js +157 -40
- package/dist/checks/bin/check-coherence.js +365 -251
- package/dist/checks/bin/check-dispatch-readiness.js +3654 -469
- package/dist/checks/bin/check-doc-claims.js +262 -201
- package/dist/checks/bin/check-doc-coverage-push.js +272 -202
- package/dist/checks/bin/check-doc-coverage.js +272 -202
- package/dist/checks/bin/check-doctrine-no-procedures.js +262 -201
- package/dist/checks/bin/check-doctrine-portability.js +262 -201
- package/dist/checks/bin/check-evidence-fresh.js +10138 -2126
- package/dist/checks/bin/check-exec-bits.js +3 -0
- package/dist/checks/bin/check-first-push-dispatch.js +330 -230
- package/dist/checks/bin/check-issue-milestone-attach.js +94 -16
- package/dist/checks/bin/check-issue-objectives-numbering.js +262 -201
- package/dist/checks/bin/check-issue-parts-coverage.js +94 -16
- package/dist/checks/bin/check-issue-surface-globs.js +1062 -242
- package/dist/checks/bin/check-issue-title-grammar.js +21 -5
- package/dist/checks/bin/check-no-disk-state.js +5 -1
- package/dist/checks/bin/check-pr-premise-reassert.js +22 -2
- package/dist/checks/bin/check-pr-report-density.js +5 -1
- package/dist/checks/bin/check-principal-test-plan-wait.js +282 -207
- package/dist/checks/bin/check-quoted-command.js +262 -201
- package/dist/checks/bin/check-reader-resolvable-prose.js +262 -201
- package/dist/checks/bin/check-registry-gates.js +131 -34
- package/dist/checks/bin/check-retired-vocabulary.js +262 -201
- package/dist/checks/bin/check-review-gate.js +262 -201
- package/dist/checks/bin/check-single-plan-pr.js +5 -1
- package/dist/checks/bin/check-surface-scope.js +136 -38
- package/dist/checks/bin/check-test-plan.js +282 -207
- package/dist/checks/bin/check-token-collection-wired.js +3 -0
- package/dist/checks/bin/check-workspace-escape.js +3 -0
- package/dist/checks/bin/verify-coherence.js +237 -148
- package/dist/checks/bin/verify-dispatch.js +870 -66
- package/dist/checks/bin/verify-docs.js +13 -6
- package/dist/harness.js +57 -10
- package/dist/index.js +16670 -7196
- package/dist/lib/pre-push-cache-test-run.js +4488 -2170
- package/dist/lib/pre-push-changed-files.js +251 -12
- package/dist/lib/pre-push-mode.js +69 -19
- package/dist/lib/pre-push-progress-dir.js +10265 -2853
- package/dist/lib/pre-push-record-tests.js +67 -19
- package/dist/lib/pre-push-select-tests.js +520 -222
- package/dist/lib/push-progress-observer.js +9176 -1757
- package/dist/process.js +2 -0
- package/dist/programs/archive.js +8948 -1547
- package/dist/programs/audit.js +9176 -1772
- package/dist/programs/check.js +9248 -1845
- package/dist/programs/commit-msg.js +8984 -1583
- package/dist/programs/dev-review-loop.js +15621 -7626
- package/dist/programs/dispatch.js +9977 -2726
- package/dist/programs/log-emit.js +9011 -1660
- package/dist/programs/log-selftest.js +8908 -1507
- package/dist/programs/log-send.js +9081 -1594
- package/dist/programs/pr-report.js +9477 -1820
- package/dist/programs/pr-snapshot.js +8916 -1515
- package/dist/programs/pr-verify-evidence.js +9482 -1825
- package/dist/programs/pr.js +11773 -4082
- package/dist/programs/review-post.js +11141 -3496
- package/dist/programs/review-status.js +8997 -1533
- package/dist/programs/run-engine.js +22149 -18798
- package/dist/programs/sync.js +9030 -1629
- package/dist/programs/task-brief.js +10234 -1827
- package/dist/programs/task-sweep.js +9267 -1621
- package/dist/programs/task-tools-serve.js +77141 -16659
- package/dist/programs/tokens.js +8966 -1565
- package/dist/programs/waiver.js +8983 -1582
- package/dist/types/harness/kernel/dev-process-socket/loader/load-process.d.ts +1 -1
- package/dist/types/harness/processes/vinaya-strict/tools/legacy-markers.d.ts +8 -0
- package/dist/types/harness/processes/vinaya-strict/tools/task-contract/brief-validation.d.ts +17 -10
- package/dist/types/harness/processes/vinaya-strict/tools/task-contract/objectives.d.ts +5 -6
- package/dist/types/harness/processes/vinaya-strict/tools/task-contract/premise-check.d.ts +14 -0
- package/dist/vinaya-strict/checks/registry.ts +2 -2
- package/dist/vinaya-strict/executing/developer/developer-doctrine-shape.test.ts +8 -0
- package/dist/vinaya-strict/executing/developer/developer-turn-result.ts +1 -1
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.test.ts +2 -2
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.ts +30 -20
- package/dist/vinaya-strict/executing/developer/reference.md +5 -3
- package/dist/vinaya-strict/integration/config/vinaya-config-section.ts +29 -7
- package/dist/vinaya-strict/integration/policies/vinaya-policies.ts +4 -4
- package/dist/vinaya-strict/integration/process/process-integration.ts +5 -1
- package/dist/vinaya-strict/process.yaml +6 -1
- package/dist/vinaya-strict/thinking/plan-reviewer/doctrine.md +68 -0
- package/dist/vinaya-strict/thinking/plan-reviewer/grants.yaml +19 -0
- package/dist/vinaya-strict/thinking/plan-reviewer/output.schema.json +388 -0
- package/dist/vinaya-strict/thinking/planner/doctrine.md +4 -1
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.test.ts +10 -2
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.ts +5 -1
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.test.ts +198 -34
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.ts +120 -193
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.test.ts +629 -15
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.ts +726 -62
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.test.ts +505 -5
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.ts +636 -21
- package/package.json +3 -2
- package/studio-standalone/apps/vinaya-studio/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/build-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/.next/prerender-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/milestones/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/chunks/209.js +2 -2
- package/studio-standalone/apps/vinaya-studio/.next/server/chunks/951.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/middleware-build-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/pages/500.html +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/preview-props.json +3 -3
- package/studio-standalone/apps/vinaya-studio/.next/server/server-reference-manifest.json +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/151-c365f0ef8268ad13.js +1 -0
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/19-aa314f13784dcc58.js +4 -0
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/app/{layout-dfa2186095e797bd.js → layout-f038e8deecb2bf5f.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/app/milestones/{page-2fffb49104860a15.js → page-12314f4deb06a414.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/app/{page-6ae258f663623b2a.js → page-7a06aa3cdd046fa8.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/app/tasks/{page-2fffb49104860a15.js → page-12314f4deb06a414.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/css/8eb5ed5b65b9692e.css +1 -0
- package/studio-standalone/apps/vinaya-studio/log-follow.mjs +708 -93
- package/studio-standalone/apps/vinaya-studio/log-sync-folder-source.mjs +699 -84
- package/studio-standalone/apps/vinaya-studio/studio-server.mjs +4692 -3116
- package/vinaya-strict/artifacts/templates/brief-template.md +6 -0
- package/vinaya-strict/artifacts/templates/issue-rationale-template.md +7 -3
- package/vinaya-strict/artifacts/templates/pr-report-template.md +1 -1
- package/vinaya-strict/doctrine/contracts/planner-developer.md +4 -3
- package/vinaya-strict/doctrine/enforcement.md +4 -4
- package/vinaya-strict/doctrine/roles/principal.md +1 -1
- package/vinaya-strict/doctrine/state-machine.md +7 -2
- package/vinaya-strict/executing/developer/reference.md +5 -3
- package/vinaya-strict/thinking/plan-reviewer/doctrine.md +68 -0
- package/vinaya-strict/thinking/planner/doctrine.md +4 -1
- package/vinaya-strict/thinking/planner/reference.md +30 -9
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/151-23bea4cac9687151.js +0 -1
- package/studio-standalone/apps/vinaya-studio/.next/static/chunks/853-1d5548ff3a55a75f.js +0 -4
- package/studio-standalone/apps/vinaya-studio/.next/static/css/fb16828fc3128d4c.css +0 -1
- /package/studio-standalone/apps/vinaya-studio/.next/static/{_r9iZDxlkoek85d_3oaxL → bJrgAp9Kl4JsCUYkeAYez}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/.next/static/{_r9iZDxlkoek85d_3oaxL → bJrgAp9Kl4JsCUYkeAYez}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -23,6 +24,7 @@ var __toCommonJS = (from) => {
|
|
|
23
24
|
return entry;
|
|
24
25
|
};
|
|
25
26
|
var __moduleCache;
|
|
27
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
26
28
|
var __returnValue = (v) => v;
|
|
27
29
|
function __exportSetter(name, newValue) {
|
|
28
30
|
this[name] = __returnValue.bind(null, newValue);
|
|
@@ -47,6 +49,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
47
49
|
throw err[0];
|
|
48
50
|
return res;
|
|
49
51
|
};
|
|
52
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
50
53
|
|
|
51
54
|
// ../../harness/kernel/adapters/code-host/github/strip-code.ts
|
|
52
55
|
function maskCode(body) {
|
|
@@ -264,6 +267,7 @@ var init_doctrine_map = __esm(() => {
|
|
|
264
267
|
{ key: "roles/developer.md", source: "executing/developer/doctrine.md", role: "developer", ships: true },
|
|
265
268
|
{ key: "roles/developer/reference.md", source: "executing/developer/reference.md", ships: true },
|
|
266
269
|
{ key: "roles/operator.md", source: "executing/operator/doctrine.md", role: "operator", ships: true },
|
|
270
|
+
{ key: "roles/plan-reviewer.md", source: "thinking/plan-reviewer/doctrine.md", role: "plan-reviewer", ships: true },
|
|
267
271
|
{ key: "roles/planner.md", source: "thinking/planner/doctrine.md", role: "planner", ships: true },
|
|
268
272
|
{ key: "roles/planner/reference.md", source: "thinking/planner/reference.md", ships: true },
|
|
269
273
|
{ key: "roles/principal.md", source: "doctrine/roles/principal.md", role: "principal", ships: true },
|
|
@@ -1066,7 +1070,7 @@ function commentMarkerFamily(name) {
|
|
|
1066
1070
|
function anchorAlternation(spellings) {
|
|
1067
1071
|
return `(?:${spellings.map((spelling) => spelling.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`;
|
|
1068
1072
|
}
|
|
1069
|
-
var REGION_PREFIX, PROVENANCE_HEADING, CLAIM_ANCHOR, QUOTES_FILE_ANCHOR, VENDOR_EXAMPLE_ANCHOR, COMMENT_MARKER_PREFIX, FROZEN_BRIEF_MARKER, DEVELOPER_ROUND_MARKER, DEVELOPER_STOP_MARKER, LOOP_PUBLISHED_MARKER, LOOP_PAUSED_MARKER, LOOP_UNPUSHED_WORK_RESUME_MARKER, PRINCIPAL_RULING_MARKER, OBJECTIVES_VERSION_MARKER, DEFERRED_FINDINGS_MARKER, COMMENT_MARKER_PREFIX_CURRENT, COMMENT_MARKER_PREFIXES, COMMENT_MARKER_PREFIX_PATTERN, REGION_PREFIX_CURRENT, REGION_PREFIXES, PROVENANCE_HEADINGS, CLAIM_ANCHORS, QUOTES_FILE_ANCHORS, VENDOR_EXAMPLE_ANCHORS;
|
|
1073
|
+
var REGION_PREFIX, PROVENANCE_HEADING, CLAIM_ANCHOR, QUOTES_FILE_ANCHOR, VENDOR_EXAMPLE_ANCHOR, COMMENT_MARKER_PREFIX, FROZEN_BRIEF_MARKER, DEVELOPER_ROUND_MARKER, DEVELOPER_STOP_MARKER, LOOP_PUBLISHED_MARKER, LOOP_PAUSED_MARKER, LOOP_UNPUSHED_WORK_RESUME_MARKER, PRINCIPAL_RULING_MARKER, OBJECTIVES_VERSION_MARKER, DOCUMENTATION_EDIT_MARKER, DEFERRED_FINDINGS_MARKER, COMMENT_MARKER_PREFIX_CURRENT, COMMENT_MARKER_PREFIXES, COMMENT_MARKER_PREFIX_PATTERN, REGION_PREFIX_CURRENT, REGION_PREFIXES, PROVENANCE_HEADINGS, CLAIM_ANCHORS, QUOTES_FILE_ANCHORS, VENDOR_EXAMPLE_ANCHORS;
|
|
1070
1074
|
var init_legacy_markers = __esm(() => {
|
|
1071
1075
|
REGION_PREFIX = { old: "AEG", current: "VINAYA" };
|
|
1072
1076
|
PROVENANCE_HEADING = {
|
|
@@ -1088,6 +1092,7 @@ var init_legacy_markers = __esm(() => {
|
|
|
1088
1092
|
LOOP_UNPUSHED_WORK_RESUME_MARKER = commentMarkerFamily("loop:unpushed-work-resume");
|
|
1089
1093
|
PRINCIPAL_RULING_MARKER = commentMarkerFamily("principal:ruling");
|
|
1090
1094
|
OBJECTIVES_VERSION_MARKER = commentMarkerFamily("objectives");
|
|
1095
|
+
DOCUMENTATION_EDIT_MARKER = commentMarkerFamily("documentation");
|
|
1091
1096
|
DEFERRED_FINDINGS_MARKER = commentMarkerFamily("deferred-findings");
|
|
1092
1097
|
COMMENT_MARKER_PREFIX_CURRENT = COMMENT_MARKER_PREFIX.current;
|
|
1093
1098
|
COMMENT_MARKER_PREFIXES = [COMMENT_MARKER_PREFIX.current, COMMENT_MARKER_PREFIX.old];
|
|
@@ -1263,59 +1268,22 @@ var init_resolve_doctrine = __esm(() => {
|
|
|
1263
1268
|
});
|
|
1264
1269
|
|
|
1265
1270
|
// ../../harness/kernel/log/custom.ts
|
|
1266
|
-
import {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
CUSTOM_EVENT_NAME_PATTERN
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
});
|
|
1283
|
-
};
|
|
1284
|
-
if (name.length > CUSTOM_EVENT_NAME_MAX_LENGTH) {
|
|
1285
|
-
refuse(`the name must be at most ${CUSTOM_EVENT_NAME_MAX_LENGTH} characters`);
|
|
1286
|
-
}
|
|
1287
|
-
if (!CUSTOM_EVENT_NAME_PATTERN.test(name)) {
|
|
1288
|
-
refuse("the name must be `<namespace>.<event>` — lowercase letters, digits and `_`, a dot between them");
|
|
1289
|
-
} else if (name.split(".")[0] === CUSTOM_EVENT_RESERVED_NAMESPACE) {
|
|
1290
|
-
refuse(`the \`${CUSTOM_EVENT_RESERVED_NAMESPACE}.\` namespace is reserved for Vinaya's own events`);
|
|
1291
|
-
}
|
|
1292
|
-
const fieldEntries = Object.entries(declaration.fields);
|
|
1293
|
-
if (fieldEntries.length > CUSTOM_EVENT_MAX_FIELDS) {
|
|
1294
|
-
refuse(`at most ${CUSTOM_EVENT_MAX_FIELDS} fields may be declared (found ${fieldEntries.length})`, ["fields"]);
|
|
1295
|
-
}
|
|
1296
|
-
for (const [field, type] of fieldEntries) {
|
|
1297
|
-
if (field.length > CUSTOM_FIELD_NAME_MAX_LENGTH || !CUSTOM_FIELD_NAME_PATTERN.test(field)) {
|
|
1298
|
-
refuse(`field "${field}": a field name is lowercase letters, digits and \`_\`, starting with a letter, at most ${CUSTOM_FIELD_NAME_MAX_LENGTH} characters`, ["fields", field]);
|
|
1299
|
-
}
|
|
1300
|
-
if (typeof type === "string")
|
|
1301
|
-
continue;
|
|
1302
|
-
if (type.length === 0) {
|
|
1303
|
-
refuse(`field "${field}": a list of words must name at least one word`, ["fields", field]);
|
|
1304
|
-
}
|
|
1305
|
-
if (type.length > CUSTOM_FIELD_MAX_WORDS) {
|
|
1306
|
-
refuse(`field "${field}": a list of words may name at most ${CUSTOM_FIELD_MAX_WORDS}`, ["fields", field]);
|
|
1307
|
-
}
|
|
1308
|
-
const bad = type.filter((w) => w.length > CUSTOM_WORD_MAX_LENGTH || !CUSTOM_WORD_PATTERN.test(w));
|
|
1309
|
-
if (bad.length > 0) {
|
|
1310
|
-
refuse(`field "${field}": a listed word is lowercase letters, digits, \`_\` and \`-\`, at most ${CUSTOM_WORD_MAX_LENGTH} characters`, ["fields", field]);
|
|
1311
|
-
}
|
|
1312
|
-
if (new Set(type).size !== type.length) {
|
|
1313
|
-
refuse(`field "${field}": a list of words names a word twice`, ["fields", field]);
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
});
|
|
1318
|
-
});
|
|
1271
|
+
import {
|
|
1272
|
+
CUSTOM_EVENT_MAX_FIELDS,
|
|
1273
|
+
CUSTOM_EVENT_NAME_MAX_LENGTH,
|
|
1274
|
+
CUSTOM_EVENT_NAME_PATTERN,
|
|
1275
|
+
CUSTOM_EVENT_RESERVED_NAMESPACE,
|
|
1276
|
+
CUSTOM_FIELD_MAX_WORDS,
|
|
1277
|
+
CUSTOM_FIELD_NAME_MAX_LENGTH,
|
|
1278
|
+
CUSTOM_FIELD_NAME_PATTERN,
|
|
1279
|
+
CUSTOM_TEXT_MAX_LENGTH,
|
|
1280
|
+
CUSTOM_WORD_MAX_LENGTH,
|
|
1281
|
+
CUSTOM_WORD_PATTERN,
|
|
1282
|
+
CustomEventDeclarationsSchema,
|
|
1283
|
+
checkCustomEvent,
|
|
1284
|
+
UNRECORDABLE_FIELD_NAME
|
|
1285
|
+
} from "@attalabs/vinaya-log-sdk";
|
|
1286
|
+
var init_custom = () => {};
|
|
1319
1287
|
|
|
1320
1288
|
// ../../harness/kernel/gates/checks/contract.ts
|
|
1321
1289
|
function emitCheckError(error) {
|
|
@@ -1662,14 +1630,15 @@ ${detail}`;
|
|
|
1662
1630
|
return null;
|
|
1663
1631
|
}
|
|
1664
1632
|
}
|
|
1665
|
-
function loadTrustAnchorConfig(fetcher = fetchTrustAnchorConfig) {
|
|
1633
|
+
function loadTrustAnchorConfig(fetcher = fetchTrustAnchorConfig, loadOptions = {}) {
|
|
1634
|
+
const warn = loadOptions.quiet ? () => {} : warnTrustAnchorFallback;
|
|
1666
1635
|
let base64;
|
|
1667
1636
|
try {
|
|
1668
1637
|
base64 = fetcher();
|
|
1669
1638
|
} catch (err) {
|
|
1670
|
-
return trustAnchorFetchFailed(err);
|
|
1639
|
+
return trustAnchorFetchFailed(err, warn);
|
|
1671
1640
|
}
|
|
1672
|
-
return parseTrustAnchorContent(base64);
|
|
1641
|
+
return parseTrustAnchorContent(base64, warn);
|
|
1673
1642
|
}
|
|
1674
1643
|
function loadTrustAnchorConfigOrThrow(fetcher = fetchTrustAnchorConfig) {
|
|
1675
1644
|
let base64;
|
|
@@ -1728,9 +1697,9 @@ var installed = null, NO_CONFIG_PROVIDER_MESSAGE = "no configuration provider is
|
|
|
1728
1697
|
|
|
1729
1698
|
// ../../harness/kernel/config/schema/config-schema.ts
|
|
1730
1699
|
import { isAbsolute } from "node:path";
|
|
1731
|
-
import { z
|
|
1700
|
+
import { z } from "zod";
|
|
1732
1701
|
function checkEntrySchema(fields) {
|
|
1733
|
-
return
|
|
1702
|
+
return z.object(fields).superRefine((entry, ctx) => {
|
|
1734
1703
|
const env = entry.env;
|
|
1735
1704
|
if (!env)
|
|
1736
1705
|
return;
|
|
@@ -1740,14 +1709,14 @@ function checkEntrySchema(fields) {
|
|
|
1740
1709
|
const members = value.anyOf;
|
|
1741
1710
|
if (new Set(members).size !== members.length) {
|
|
1742
1711
|
ctx.addIssue({
|
|
1743
|
-
code:
|
|
1712
|
+
code: z.ZodIssueCode.custom,
|
|
1744
1713
|
message: `env.${key}.anyOf has duplicate members`,
|
|
1745
1714
|
path: ["env", key, "anyOf"]
|
|
1746
1715
|
});
|
|
1747
1716
|
}
|
|
1748
1717
|
if (!members.includes(key)) {
|
|
1749
1718
|
ctx.addIssue({
|
|
1750
|
-
code:
|
|
1719
|
+
code: z.ZodIssueCode.custom,
|
|
1751
1720
|
message: `env.${key}.anyOf must include "${key}" itself as a member`,
|
|
1752
1721
|
path: ["env", key, "anyOf"]
|
|
1753
1722
|
});
|
|
@@ -1770,26 +1739,31 @@ function hookBlockPathRule(prefixes) {
|
|
|
1770
1739
|
return { isCanonical, schema };
|
|
1771
1740
|
}
|
|
1772
1741
|
function managedManifestSchemas(agentVendors, hookBlockPrefixes) {
|
|
1773
|
-
const block =
|
|
1742
|
+
const block = z.object({
|
|
1774
1743
|
path: hookBlockPathRule(hookBlockPrefixes).schema,
|
|
1775
|
-
marker:
|
|
1776
|
-
comment:
|
|
1744
|
+
marker: z.string(),
|
|
1745
|
+
comment: z.enum(["hash", "html"])
|
|
1777
1746
|
});
|
|
1778
|
-
const manifest =
|
|
1779
|
-
version:
|
|
1780
|
-
files:
|
|
1781
|
-
blocks:
|
|
1782
|
-
labels:
|
|
1783
|
-
agents:
|
|
1747
|
+
const manifest = z.object({
|
|
1748
|
+
version: z.number().int().positive(),
|
|
1749
|
+
files: z.array(SafeRepoRelPath),
|
|
1750
|
+
blocks: z.array(block),
|
|
1751
|
+
labels: z.array(z.string()),
|
|
1752
|
+
agents: z.array(z.enum(agentVendors)).optional()
|
|
1784
1753
|
});
|
|
1785
1754
|
return { block, manifest };
|
|
1786
1755
|
}
|
|
1787
1756
|
function logsSchema(events) {
|
|
1788
|
-
return
|
|
1789
|
-
folder:
|
|
1790
|
-
url:
|
|
1791
|
-
|
|
1792
|
-
|
|
1757
|
+
return z.object({
|
|
1758
|
+
folder: z.string().min(1).refine((v) => isAbsolute(v), { message: "logs.folder: must be an absolute path" }).optional(),
|
|
1759
|
+
url: z.string().url().optional(),
|
|
1760
|
+
otlp: z.object({
|
|
1761
|
+
url: z.string().url().regex(/^https?:\/\//i),
|
|
1762
|
+
headers: z.record(z.string()).optional()
|
|
1763
|
+
}).strict().optional(),
|
|
1764
|
+
headers: z.record(z.string()).optional(),
|
|
1765
|
+
readHeaders: z.record(z.string()).optional(),
|
|
1766
|
+
keepDays: z.number({ invalid_type_error: "must be a whole number of days" }).int({ message: "must be a whole number of days" }).min(1, { message: "must be at least 1" }).optional(),
|
|
1793
1767
|
events: events.optional()
|
|
1794
1768
|
}).refine((v) => [v.folder, v.url].filter((x) => x !== undefined).length <= 1, {
|
|
1795
1769
|
message: "logs: set at most one of folder/url"
|
|
@@ -1797,22 +1771,22 @@ function logsSchema(events) {
|
|
|
1797
1771
|
message: "logs: headers requires url"
|
|
1798
1772
|
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
1799
1773
|
message: "logs: readHeaders requires url"
|
|
1800
|
-
}).or(
|
|
1774
|
+
}).or(z.literal(false)).optional();
|
|
1801
1775
|
}
|
|
1802
1776
|
function kernelConfigFragment(leaves) {
|
|
1803
1777
|
return {
|
|
1804
|
-
rings:
|
|
1805
|
-
ring1_forgeWriteInterception:
|
|
1806
|
-
ring2_asyncAudits:
|
|
1778
|
+
rings: z.object({
|
|
1779
|
+
ring1_forgeWriteInterception: z.boolean(),
|
|
1780
|
+
ring2_asyncAudits: z.boolean()
|
|
1807
1781
|
}).optional(),
|
|
1808
|
-
checks:
|
|
1782
|
+
checks: z.record(z.string(), checkEntrySchema(leaves.checkEntryFields)).optional(),
|
|
1809
1783
|
managed: managedManifestSchemas(leaves.agentVendors, leaves.hookBlockPrefixes).manifest.optional(),
|
|
1810
|
-
ci:
|
|
1811
|
-
logPublish:
|
|
1784
|
+
ci: z.object({ setup: z.string().min(1) }).optional(),
|
|
1785
|
+
logPublish: z.unknown().refine((v) => v === undefined, {
|
|
1812
1786
|
message: "logPublish is removed — telemetry is never posted to a tracker or a code host; configure `logs` instead (a folder or a server destination)"
|
|
1813
1787
|
}),
|
|
1814
|
-
runtimeDir:
|
|
1815
|
-
runner:
|
|
1788
|
+
runtimeDir: z.string().min(1).refine((v) => isAbsolute(v), { message: "runtimeDir: must be an absolute path" }).optional(),
|
|
1789
|
+
runner: z.enum(["standalone", "atta-engine"]).optional(),
|
|
1816
1790
|
logs: logsSchema(leaves.logEvents)
|
|
1817
1791
|
};
|
|
1818
1792
|
}
|
|
@@ -1852,25 +1826,25 @@ function resolveLogsHeaderValues(headers, env) {
|
|
|
1852
1826
|
}
|
|
1853
1827
|
var EnvEntrySchema, KERNEL_CHECK_ENTRY_FIELDS, SafeRepoRelPath, KERNEL_CONFIG_REFINEMENTS;
|
|
1854
1828
|
var init_config_schema = __esm(() => {
|
|
1855
|
-
EnvEntrySchema =
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1829
|
+
EnvEntrySchema = z.union([
|
|
1830
|
+
z.literal(true),
|
|
1831
|
+
z.object({ optional: z.literal(true) }),
|
|
1832
|
+
z.object({ anyOf: z.array(z.string()).min(2) }),
|
|
1833
|
+
z.string()
|
|
1860
1834
|
]);
|
|
1861
1835
|
KERNEL_CHECK_ENTRY_FIELDS = {
|
|
1862
|
-
run:
|
|
1863
|
-
scope:
|
|
1864
|
-
include:
|
|
1865
|
-
args:
|
|
1866
|
-
timeoutMs:
|
|
1867
|
-
env:
|
|
1868
|
-
requiresOpenPr:
|
|
1869
|
-
ownWorkflow:
|
|
1870
|
-
validates:
|
|
1871
|
-
advisory:
|
|
1836
|
+
run: z.string(),
|
|
1837
|
+
scope: z.enum(["diff", "full"]),
|
|
1838
|
+
include: z.array(z.string()).optional(),
|
|
1839
|
+
args: z.array(z.string()).optional(),
|
|
1840
|
+
timeoutMs: z.number().optional(),
|
|
1841
|
+
env: z.record(z.string(), EnvEntrySchema).optional(),
|
|
1842
|
+
requiresOpenPr: z.boolean().optional(),
|
|
1843
|
+
ownWorkflow: z.boolean().optional(),
|
|
1844
|
+
validates: z.enum(["body", "issue"]).optional(),
|
|
1845
|
+
advisory: z.literal(true).optional()
|
|
1872
1846
|
};
|
|
1873
|
-
SafeRepoRelPath =
|
|
1847
|
+
SafeRepoRelPath = z.string().refine(isSafeRepoRelPath, {
|
|
1874
1848
|
message: "must be a repo-root-relative path with no `..` segment or absolute root"
|
|
1875
1849
|
});
|
|
1876
1850
|
KERNEL_CONFIG_REFINEMENTS = [];
|
|
@@ -2333,6 +2307,23 @@ async function ghApiGetAllPagesAsync(pathWithoutPage, opts) {
|
|
|
2333
2307
|
}
|
|
2334
2308
|
throw new Error(`ghApiGetAllPagesAsync: "${pathWithoutPage}" did not terminate within ${MAX_PAGES} pages (${MAX_PAGES * MAX_PER_PAGE} items) — refusing to keep walking.`);
|
|
2335
2309
|
}
|
|
2310
|
+
async function ghLabelIssueCountsAsync(owner, repo, labelQuery) {
|
|
2311
|
+
const stdout = await runAsync([
|
|
2312
|
+
"api",
|
|
2313
|
+
"graphql",
|
|
2314
|
+
"--paginate",
|
|
2315
|
+
"-f",
|
|
2316
|
+
`query=${LABEL_ISSUE_COUNTS_QUERY.replace("$labelQuery", JSON.stringify(labelQuery))}`,
|
|
2317
|
+
"-f",
|
|
2318
|
+
`owner=${owner}`,
|
|
2319
|
+
"-f",
|
|
2320
|
+
`name=${repo}`,
|
|
2321
|
+
"--jq",
|
|
2322
|
+
".data.repository.labels.nodes[] | {name, open: .open.totalCount, total: .all.totalCount}"
|
|
2323
|
+
]);
|
|
2324
|
+
return stdout.split(`
|
|
2325
|
+
`).filter((line) => line.trim() !== "").map((line) => JSON.parse(line));
|
|
2326
|
+
}
|
|
2336
2327
|
function issueListByLabelArgs(owner, repo, label) {
|
|
2337
2328
|
return [
|
|
2338
2329
|
"issue",
|
|
@@ -2366,7 +2357,14 @@ async function ghIssueListByAnyLabelAsync(owner, repo, labels) {
|
|
|
2366
2357
|
const perLabel = await Promise.all(labels.map((l) => ghIssueListByLabelAsync(owner, repo, l)));
|
|
2367
2358
|
return dedupeByNumber(perLabel.flat());
|
|
2368
2359
|
}
|
|
2369
|
-
var execFileAsync2, systemEnv, MAX_PER_PAGE = 100, MAX_PAGES = 100
|
|
2360
|
+
var execFileAsync2, systemEnv, MAX_PER_PAGE = 100, MAX_PAGES = 100, LABEL_ISSUE_COUNTS_QUERY = `query($owner: String!, $name: String!, $endCursor: String) {
|
|
2361
|
+
repository(owner: $owner, name: $name) {
|
|
2362
|
+
labels(first: 100, after: $endCursor, query: $labelQuery) {
|
|
2363
|
+
pageInfo { hasNextPage endCursor }
|
|
2364
|
+
nodes { name open: issues(states: OPEN) { totalCount } all: issues { totalCount } }
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
}`;
|
|
2370
2368
|
var init_gh = __esm(() => {
|
|
2371
2369
|
execFileAsync2 = promisify2(execFile2);
|
|
2372
2370
|
systemEnv = {
|
|
@@ -2691,6 +2689,15 @@ function parsePremiseBlock(prBody) {
|
|
|
2691
2689
|
}
|
|
2692
2690
|
return assertions;
|
|
2693
2691
|
}
|
|
2692
|
+
function declaresNewFilesOnly(prBody) {
|
|
2693
|
+
const searchIn = anchoredRegion(prBody, "PREMISE", REGION_PREFIXES) ?? prBody;
|
|
2694
|
+
const lines = searchIn.split(/\r?\n/).map((l) => l.trim());
|
|
2695
|
+
const header = lines.findIndex(isPremiseHeader);
|
|
2696
|
+
if (header === -1)
|
|
2697
|
+
return false;
|
|
2698
|
+
const first = lines.slice(header + 1).find((l) => l !== "");
|
|
2699
|
+
return first === NEW_FILES_ONLY_PREMISE && parsePremiseBlock(prBody).length === 0;
|
|
2700
|
+
}
|
|
2694
2701
|
function premiseBlockText(prBody) {
|
|
2695
2702
|
const searchIn = anchoredRegion(prBody, "PREMISE", REGION_PREFIXES) ?? prBody;
|
|
2696
2703
|
const lines = searchIn.split(/\r?\n/);
|
|
@@ -2738,7 +2745,7 @@ function checkPremises(assertions, fileReader) {
|
|
|
2738
2745
|
}
|
|
2739
2746
|
return { pass: failures.length === 0, failures };
|
|
2740
2747
|
}
|
|
2741
|
-
var ASSERTION_KINDS, PREMISE_LINE;
|
|
2748
|
+
var ASSERTION_KINDS, NEW_FILES_ONLY_PREMISE = "- (no pin — every file this task names is new, so no existing content can be pinned)", PREMISE_LINE;
|
|
2742
2749
|
var init_premise_check = __esm(() => {
|
|
2743
2750
|
init_anchored_region();
|
|
2744
2751
|
init_legacy_markers();
|
|
@@ -2880,13 +2887,16 @@ function checkSurfaceMap(prBody) {
|
|
|
2880
2887
|
function checkDocUpdateList(prBody) {
|
|
2881
2888
|
return headingCheck(prBody, "(?:documentation|doc)[- ]update(?:\\s+list)?", "Documentation-update list");
|
|
2882
2889
|
}
|
|
2883
|
-
function checkWorktreeStep0(
|
|
2884
|
-
|
|
2890
|
+
function checkWorktreeStep0(body) {
|
|
2891
|
+
const prBody = body.replaceAll(`\r
|
|
2892
|
+
`, `
|
|
2893
|
+
`);
|
|
2894
|
+
if (/git worktree add/.test(prBody) || /cd \.worktrees\//.test(prBody) || /bun install --frozen-lockfile/.test(prBody) || /\*\*Step 0 \(mandatory, verbatim\):\*\*\n\n```\n(?:npm ci|pnpm install --frozen-lockfile|yarn install --frozen-lockfile)\n```/.test(prBody))
|
|
2885
2895
|
return { status: "pass", errors: [] };
|
|
2886
2896
|
return {
|
|
2887
2897
|
status: "fail",
|
|
2888
2898
|
errors: [
|
|
2889
|
-
"brief-validation worktree Step 0: no `git worktree add`, `cd .worktrees/`, or `bun install --frozen-lockfile`
|
|
2899
|
+
"brief-validation worktree Step 0: no `git worktree add`, `cd .worktrees/`, or frozen-lockfile install (`bun install --frozen-lockfile`, `npm ci`, `pnpm install --frozen-lockfile`, `yarn install --frozen-lockfile`) found in the PR body."
|
|
2890
2900
|
]
|
|
2891
2901
|
};
|
|
2892
2902
|
}
|
|
@@ -3494,7 +3504,13 @@ function isMechanicallyNeutralDiff(diffText, path) {
|
|
|
3494
3504
|
}
|
|
3495
3505
|
return sawChange;
|
|
3496
3506
|
}
|
|
3497
|
-
function
|
|
3507
|
+
function prBodyGiven(env = process.env) {
|
|
3508
|
+
return env.PR_BODY !== undefined || env.PR_BODY_FILE !== undefined;
|
|
3509
|
+
}
|
|
3510
|
+
function owedNeutralNotes(result) {
|
|
3511
|
+
return result.notes.filter((n) => n.startsWith(DOC_NEUTRAL_OWED_PREFIX));
|
|
3512
|
+
}
|
|
3513
|
+
function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive, getDiff, bodyGiven = true) {
|
|
3498
3514
|
const out = { errors: [], notes: [] };
|
|
3499
3515
|
if (docOwnersContent === null)
|
|
3500
3516
|
return out;
|
|
@@ -3534,24 +3550,28 @@ function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive,
|
|
|
3534
3550
|
}
|
|
3535
3551
|
if (changed.includes(pointerPath))
|
|
3536
3552
|
continue;
|
|
3553
|
+
const evidenced = () => getDiff !== undefined && matchedFiles.every((f) => {
|
|
3554
|
+
const diff = getDiff(f);
|
|
3555
|
+
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
3556
|
+
});
|
|
3537
3557
|
const declared = neutrals.find((n) => n.surface === b.pointer);
|
|
3538
3558
|
if (declared) {
|
|
3539
|
-
|
|
3540
|
-
const diff = getDiff(f);
|
|
3541
|
-
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
3542
|
-
});
|
|
3543
|
-
if (evidenced) {
|
|
3559
|
+
if (evidenced()) {
|
|
3544
3560
|
out.notes.push(`C5 doc-neutral: ${b.pointer} not required for ${DOC_OWNERS_PATH}:${b.lineNum} (glob \`${b.glob}\`) — declared neutral ("${declared.note}"), diff of ${matchedFiles.join(", ")} confirmed comment/whitespace-only.`);
|
|
3545
3561
|
continue;
|
|
3546
3562
|
}
|
|
3547
3563
|
out.errors.push(`C5 doc-neutral-unverified: ${DOC_OWNERS_PATH}:${b.lineNum} (glob \`${b.glob}\` → ${b.pointer}) declared \`Doc-neutral: ${b.pointer} — ${declared.note}\`, but the diff of ${matchedFiles.join(", ")} contains changes beyond comments/whitespace. Update ${pointerPath}, or have a principal apply the \`${WAIVER_LABEL}\` label.`);
|
|
3548
3564
|
continue;
|
|
3549
3565
|
}
|
|
3566
|
+
if (!bodyGiven && evidenced()) {
|
|
3567
|
+
out.notes.push(`${DOC_NEUTRAL_OWED_PREFIX} ${b.pointer} not required in this run for ${DOC_OWNERS_PATH}:${b.lineNum} (glob \`${b.glob}\`) — no pull request body was given, and the diff of ${matchedFiles.join(", ")} is comment/whitespace-only. The pull request body owes \`Doc-neutral: ${b.pointer} — <why>\`.`);
|
|
3568
|
+
continue;
|
|
3569
|
+
}
|
|
3550
3570
|
out.errors.push(`C5 doc-coverage: code change matched ${DOC_OWNERS_PATH}:${b.lineNum} (glob \`${b.glob}\` → ${b.pointer}), but ${pointerPath} is not in the PR diff. Update it, declare \`Doc-neutral: ${b.pointer} — <why>\` if the change is genuinely mechanically-neutral, or have a principal apply the \`${WAIVER_LABEL}\` label.`);
|
|
3551
3571
|
}
|
|
3552
3572
|
return out;
|
|
3553
3573
|
}
|
|
3554
|
-
var DOC_OWNERS_PATH = ".vinaya/doc-owners", SEPARATOR, LANGUAGE_COMMENT_PREFIXES;
|
|
3574
|
+
var DOC_OWNERS_PATH = ".vinaya/doc-owners", SEPARATOR, LANGUAGE_COMMENT_PREFIXES, DOC_NEUTRAL_OWED_PREFIX = "C5 doc-neutral-owed:";
|
|
3555
3575
|
var init_doc_owners = __esm(() => {
|
|
3556
3576
|
init_file_classify();
|
|
3557
3577
|
init_waiver_label();
|
|
@@ -3606,6 +3626,20 @@ var init_protected_paths = __esm(() => {
|
|
|
3606
3626
|
];
|
|
3607
3627
|
});
|
|
3608
3628
|
|
|
3629
|
+
// ../../harness/processes/vinaya-strict/tools/task-contract/test-plan-proof.ts
|
|
3630
|
+
function stripObjectiveIdSpans(text) {
|
|
3631
|
+
return text.replace(ITEM_IDS_SPAN_RE, "").trim();
|
|
3632
|
+
}
|
|
3633
|
+
var ID_LIST, LINE_IDS_RE, ITEM_IDS_SPAN_RE;
|
|
3634
|
+
var init_test_plan_proof = __esm(() => {
|
|
3635
|
+
init_brief_validation();
|
|
3636
|
+
init_objectives();
|
|
3637
|
+
init_test_plan_section();
|
|
3638
|
+
ID_LIST = String.raw`O\d+(?:\s*,\s*O\d+)*`;
|
|
3639
|
+
LINE_IDS_RE = new RegExp(String.raw`\(\s*(${ID_LIST})\s*\)\s*$`);
|
|
3640
|
+
ITEM_IDS_SPAN_RE = new RegExp(String.raw`(?<!\`)(\`+)\s*\(?\s*(${ID_LIST})\s*\)?\s*\1(?!\`)`, "g");
|
|
3641
|
+
});
|
|
3642
|
+
|
|
3609
3643
|
// ../../harness/processes/vinaya-strict/tools/task-contract/issue-validation.ts
|
|
3610
3644
|
function hasRationaleField(body, labelPattern) {
|
|
3611
3645
|
const re = new RegExp(`(?:\\*\\*|^#{1,4}\\s+)\\s*(?:${labelPattern})`, "im");
|
|
@@ -3804,7 +3838,7 @@ function checkPartsCiteDefinedObjectives(body) {
|
|
|
3804
3838
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3805
3839
|
}
|
|
3806
3840
|
function liveCommand(text) {
|
|
3807
|
-
const trimmed = text
|
|
3841
|
+
const trimmed = stripObjectiveIdSpans(text);
|
|
3808
3842
|
const span = /^(`+)(.+)\1$/.exec(trimmed);
|
|
3809
3843
|
return span ? span[2].trim() : trimmed;
|
|
3810
3844
|
}
|
|
@@ -3913,9 +3947,19 @@ function namedPathsIn(text) {
|
|
|
3913
3947
|
function boundaryPinnedFiles(body) {
|
|
3914
3948
|
const boundary = rationaleFieldText(PATH_TEXT(body), "Boundary");
|
|
3915
3949
|
const excluded = new Set(namedPathsIn(boundaryOutText(body)));
|
|
3916
|
-
|
|
3950
|
+
const named = [...namedPathsIn(boundary), ...rootFilesPinnedIn(boundary)];
|
|
3951
|
+
return [...new Set(named)].filter((p) => looksLikeFilePath(p) && !excluded.has(p));
|
|
3917
3952
|
}
|
|
3918
|
-
|
|
3953
|
+
function rootFilesPinnedIn(boundary) {
|
|
3954
|
+
const start = boundary.search(/\bPinned files\s*:/i);
|
|
3955
|
+
if (start === -1)
|
|
3956
|
+
return [];
|
|
3957
|
+
const clause = boundary.slice(start);
|
|
3958
|
+
const out = BOUNDARY_OUT_RE.exec(clause);
|
|
3959
|
+
const pinned = out ? clause.slice(0, out.index) : clause;
|
|
3960
|
+
return [...pinned.matchAll(ROOT_FILE_RE_GLOBAL)].map((m) => m[1]);
|
|
3961
|
+
}
|
|
3962
|
+
var RATIONALE_FIELDS, DEPENDENCY_RATIONALE_FIELD_NAME = "Dependency rationale", SINGLE_FIX_OPTIONAL_FIELDS, OBJECTIVES_SINCE_ISSUE = 404, PART_MIN_WORDS_OUTSIDE_BACKTICKS = 3, ISSUE_PART_LINE_RE, ISSUE_LIVE_LINE_RE, TYPE_LABEL_IDS, PATH_TEXT = (body) => stripCode(body, { inlineSpans: "keep" }), MESSAGE_VALUE_COUNT_MAX = 5, MESSAGE_VALUE_MAX = 64, DOC_PATH_RE, DOC_PATH_RE_GLOBAL, RATIONALE_PATH_RE_GLOBAL, DEFAULT_COLLISION_THRESHOLD = 3, BOUNDARY_OUT_RE, FILE_EXTENSIONS, ROOT_FILE_RE_GLOBAL, CI_SHARD_DIR = "apps/cli/tests/ci-shards", CI_SHARD_PROBE;
|
|
3919
3963
|
var init_issue_validation = __esm(() => {
|
|
3920
3964
|
init_parse_rationale_deps();
|
|
3921
3965
|
init_labels();
|
|
@@ -3929,11 +3973,13 @@ var init_issue_validation = __esm(() => {
|
|
|
3929
3973
|
init_derive_section7();
|
|
3930
3974
|
init_doctrine_map();
|
|
3931
3975
|
init_objectives();
|
|
3976
|
+
init_waiver_label();
|
|
3932
3977
|
init_issue_documentation();
|
|
3933
3978
|
init_touched_path();
|
|
3934
3979
|
init_protected_paths();
|
|
3935
3980
|
init_quoted_command();
|
|
3936
3981
|
init_test_plan_section();
|
|
3982
|
+
init_test_plan_proof();
|
|
3937
3983
|
RATIONALE_FIELDS = [
|
|
3938
3984
|
{ name: "Boundary", pattern: "Boundary" },
|
|
3939
3985
|
{ name: "Sizing", pattern: "Sizing" },
|
|
@@ -3977,6 +4023,7 @@ var init_issue_validation = __esm(() => {
|
|
|
3977
4023
|
"html",
|
|
3978
4024
|
"css"
|
|
3979
4025
|
]);
|
|
4026
|
+
ROOT_FILE_RE_GLOBAL = /`([\w.@-]+\.(?:md|mdx|txt|json|jsonc|ts|tsx|js|jsx|mjs|cjs|mts|cts|yml|yaml|toml|lock|html|css|scss|sh|py|rb|go|rs|xml|ini|cfg|conf))`/g;
|
|
3980
4027
|
CI_SHARD_PROBE = `${CI_SHARD_DIR}/shard-1.txt`;
|
|
3981
4028
|
});
|
|
3982
4029
|
|
|
@@ -4429,7 +4476,7 @@ var init_review_gate = __esm(() => {
|
|
|
4429
4476
|
|
|
4430
4477
|
// ../../harness/processes/vinaya-strict/tools/prose-rules-config.ts
|
|
4431
4478
|
import safeRegex from "safe-regex2";
|
|
4432
|
-
import { z as
|
|
4479
|
+
import { z as z2 } from "zod";
|
|
4433
4480
|
function isPlainObject(value) {
|
|
4434
4481
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4435
4482
|
}
|
|
@@ -4699,18 +4746,18 @@ var init_prose_rules_config = __esm(() => {
|
|
|
4699
4746
|
FIXED_DEFAULT_KEYS = ["pattern", "patterns", "flags", "means", "message", "id"];
|
|
4700
4747
|
CUSTOM_KEYS = ["id", "pattern", "patterns", "flags", "means", "scopes", "severity", "exempt"];
|
|
4701
4748
|
DEFAULT_IDS = new Set([...DEFAULT_PROSE_RULES.map((rule) => rule.id), DECISION_RECORD_CITATION_ID]);
|
|
4702
|
-
RepoRelativePathSchema =
|
|
4749
|
+
RepoRelativePathSchema = z2.string().min(1).superRefine((entry, ctx) => {
|
|
4703
4750
|
const reason = outsideRepositoryReason(entry);
|
|
4704
4751
|
if (reason)
|
|
4705
|
-
ctx.addIssue({ code:
|
|
4752
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, message: reason });
|
|
4706
4753
|
});
|
|
4707
|
-
ProseRulesSchema =
|
|
4754
|
+
ProseRulesSchema = z2.unknown().superRefine((value, ctx) => {
|
|
4708
4755
|
for (const issue of proseRulesIssues(value)) {
|
|
4709
|
-
ctx.addIssue({ code:
|
|
4756
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, path: issue.path, message: issue.message });
|
|
4710
4757
|
}
|
|
4711
4758
|
}).transform((value) => value);
|
|
4712
|
-
PublishedProseSchema =
|
|
4713
|
-
allow:
|
|
4759
|
+
PublishedProseSchema = z2.object({
|
|
4760
|
+
allow: z2.array(z2.string().min(1)).optional()
|
|
4714
4761
|
}).strict();
|
|
4715
4762
|
});
|
|
4716
4763
|
|
|
@@ -4725,10 +4772,13 @@ var exports_vinaya_config_section = {};
|
|
|
4725
4772
|
__export(exports_vinaya_config_section, {
|
|
4726
4773
|
BRIEF_BUILTINS: () => BRIEF_BUILTINS,
|
|
4727
4774
|
CANONICAL_HOOK_BLOCK_PREFIXES: () => CANONICAL_HOOK_BLOCK_PREFIXES,
|
|
4775
|
+
DEFAULT_REVIEW_AGENT: () => DEFAULT_REVIEW_AGENT,
|
|
4776
|
+
DEFAULT_REVIEW_ROUND_LIMIT: () => DEFAULT_REVIEW_ROUND_LIMIT,
|
|
4728
4777
|
LOCAL_OVERRIDABLE_KEYS: () => LOCAL_OVERRIDABLE_KEYS,
|
|
4729
4778
|
LOCAL_OVERRIDE_FILENAME: () => LOCAL_OVERRIDE_FILENAME,
|
|
4730
4779
|
PRINCIPALS_FIX: () => PRINCIPALS_FIX,
|
|
4731
4780
|
PrincipalsUnresolvedError: () => PrincipalsUnresolvedError,
|
|
4781
|
+
REVIEW_AGENT_SETTINGS: () => REVIEW_AGENT_SETTINGS,
|
|
4732
4782
|
VINAYA_CHECK_ENTRY_FIELDS: () => VINAYA_CHECK_ENTRY_FIELDS,
|
|
4733
4783
|
VINAYA_CONFIG_FILENAME: () => VINAYA_CONFIG_FILENAME,
|
|
4734
4784
|
VINAYA_CONFIG_FRAGMENT: () => VINAYA_CONFIG_FRAGMENT,
|
|
@@ -4750,7 +4800,9 @@ __export(exports_vinaya_config_section, {
|
|
|
4750
4800
|
resolveGateCutovers: () => resolveGateCutovers,
|
|
4751
4801
|
resolveLocalPacingOverride: () => resolveLocalPacingOverride,
|
|
4752
4802
|
resolveReleaseActor: () => resolveReleaseActor,
|
|
4803
|
+
resolveReviewAgent: () => resolveReviewAgent,
|
|
4753
4804
|
resolveReviewPolicy: () => resolveReviewPolicy,
|
|
4805
|
+
resolveReviewRoundLimit: () => resolveReviewRoundLimit,
|
|
4754
4806
|
resolveSecurityScanCommand: () => resolveSecurityScanCommand,
|
|
4755
4807
|
tokensCollectTrustKey: () => tokensCollectTrustKey,
|
|
4756
4808
|
trustAnchorFallbackWarning: () => trustAnchorFallbackWarning,
|
|
@@ -4761,7 +4813,7 @@ import { execFileSync as execFileSync4 } from "node:child_process";
|
|
|
4761
4813
|
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
4762
4814
|
import { homedir } from "node:os";
|
|
4763
4815
|
import { dirname as dirname4, join as join4 } from "node:path";
|
|
4764
|
-
import { z as
|
|
4816
|
+
import { z as z3 } from "zod";
|
|
4765
4817
|
function isDefaultedAgentVendorPath(path, manifest) {
|
|
4766
4818
|
if (manifest.agents !== undefined)
|
|
4767
4819
|
return false;
|
|
@@ -4795,7 +4847,7 @@ function decisionRecordsOutsideDoctrine(config, ctx) {
|
|
|
4795
4847
|
return;
|
|
4796
4848
|
const issue = decisionRecordsPathIssue(path, config.proseGates?.doctrineRoot);
|
|
4797
4849
|
if (issue)
|
|
4798
|
-
ctx.addIssue({ code:
|
|
4850
|
+
ctx.addIssue({ code: z3.ZodIssueCode.custom, path: ["decisionRecords", "path"], message: issue });
|
|
4799
4851
|
}
|
|
4800
4852
|
function globalPrincipalsIgnoredWarning(path) {
|
|
4801
4853
|
return `${path}: "principals" in the global config is ignored — principals may only be declared from a repo-local vinaya.config.json.`;
|
|
@@ -4899,6 +4951,12 @@ function resolveGateCutovers(config) {
|
|
|
4899
4951
|
function resolveCollisionThreshold(config) {
|
|
4900
4952
|
return config?.planning?.collisionThreshold ?? DEFAULT_COLLISION_THRESHOLD;
|
|
4901
4953
|
}
|
|
4954
|
+
function resolveReviewRoundLimit(config) {
|
|
4955
|
+
return config?.planning?.reviewRoundLimit ?? DEFAULT_REVIEW_ROUND_LIMIT;
|
|
4956
|
+
}
|
|
4957
|
+
function resolveReviewAgent(config) {
|
|
4958
|
+
return config?.planning?.reviewAgent ?? DEFAULT_REVIEW_AGENT;
|
|
4959
|
+
}
|
|
4902
4960
|
function principalsNotConfigured(why) {
|
|
4903
4961
|
return new PrincipalsUnresolvedError("not-configured", `no Principal is configured (${why}) — ${PRINCIPALS_FIX}.`);
|
|
4904
4962
|
}
|
|
@@ -4913,7 +4971,7 @@ function createTrustedPrincipalsResolver(reads) {
|
|
|
4913
4971
|
}
|
|
4914
4972
|
if (isMissingFileError(err))
|
|
4915
4973
|
throw principalsNotConfigured("the default branch has no vinaya.config.json");
|
|
4916
|
-
throw new PrincipalsUnresolvedError("read-failed", `could not read "principals" from vinaya.config.json on the default branch: ${fetchFailureReason(err)}
|
|
4974
|
+
throw new PrincipalsUnresolvedError("read-failed", `could not read "principals" from vinaya.config.json on the default branch: ${fetchFailureReason(err)}`, { cause: err });
|
|
4917
4975
|
}
|
|
4918
4976
|
const unusable = { why: "" };
|
|
4919
4977
|
const config = reads.parse(content, (why) => {
|
|
@@ -4973,7 +5031,7 @@ function trustTokensCollectCommand(repoGitCommonDir, interpreter, script, script
|
|
|
4973
5031
|
store[key] = { interpreter, script, scriptBlobHash, trustedAt: new Date().toISOString() };
|
|
4974
5032
|
writeTokensCollectTrustStore(storePath, store);
|
|
4975
5033
|
}
|
|
4976
|
-
var VINAYA_HOME, VINAYA_GLOBAL_CONFIG_FILENAME = "config.json", VINAYA_CONFIG_FILENAME = "vinaya.config.json", CANONICAL_HOOK_BLOCK_PREFIXES, VINAYA_CHECK_ENTRY_FIELDS, AGENTS_SKILLS_PREFIX = ".agents/skills/", CLAUDE_SKILLS_PREFIX = ".claude/skills/vinaya-", RoleEntrySchema, MAX_REPORT_COMMAND_TIMEOUT_MS = 3600000, BRIEF_BUILTINS, BriefSectionSchema, BriefSchemaSchema, ProjectEntrySchema, VINAYA_CONFIG_FRAGMENT, LOCAL_OVERRIDE_FILENAME = "vinaya.config.local.json", LOCAL_OVERRIDABLE_KEYS, PrincipalsUnresolvedError, PRINCIPALS_FIX = 'add "principals": [...] to vinaya.config.json on the default branch', TOKENS_COLLECT_TRUST_PATH, VINAYA_GLOBAL_ONLY_KEYS, VINAYA_CONFIG_SECTION;
|
|
5034
|
+
var VINAYA_HOME, VINAYA_GLOBAL_CONFIG_FILENAME = "config.json", VINAYA_CONFIG_FILENAME = "vinaya.config.json", CANONICAL_HOOK_BLOCK_PREFIXES, VINAYA_CHECK_ENTRY_FIELDS, AGENTS_SKILLS_PREFIX = ".agents/skills/", CLAUDE_SKILLS_PREFIX = ".claude/skills/vinaya-", RoleEntrySchema, MAX_REPORT_COMMAND_TIMEOUT_MS = 3600000, BRIEF_BUILTINS, BriefSectionSchema, BriefSchemaSchema, ProjectEntrySchema, VINAYA_CONFIG_FRAGMENT, LOCAL_OVERRIDE_FILENAME = "vinaya.config.local.json", LOCAL_OVERRIDABLE_KEYS, DEFAULT_REVIEW_ROUND_LIMIT = 2, REVIEW_AGENT_SETTINGS, DEFAULT_REVIEW_AGENT = "same", PrincipalsUnresolvedError, PRINCIPALS_FIX = 'add "principals": [...] to vinaya.config.json on the default branch', TOKENS_COLLECT_TRUST_PATH, VINAYA_GLOBAL_ONLY_KEYS, VINAYA_CONFIG_SECTION;
|
|
4977
5035
|
var init_vinaya_config_section = __esm(() => {
|
|
4978
5036
|
init_review_policy();
|
|
4979
5037
|
init_issue_validation();
|
|
@@ -4987,10 +5045,10 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
4987
5045
|
VINAYA_HOME = join4(homedir(), ".vinaya");
|
|
4988
5046
|
CANONICAL_HOOK_BLOCK_PREFIXES = [".git/", ".husky/", ".vinaya/hooks/", ".claude/hooks/"];
|
|
4989
5047
|
VINAYA_CHECK_ENTRY_FIELDS = {
|
|
4990
|
-
principalOwed:
|
|
5048
|
+
principalOwed: z3.literal(true).optional()
|
|
4991
5049
|
};
|
|
4992
|
-
RoleEntrySchema =
|
|
4993
|
-
contract:
|
|
5050
|
+
RoleEntrySchema = z3.object({
|
|
5051
|
+
contract: z3.string().refine((p) => p.includes("/"), {
|
|
4994
5052
|
message: 'must be a path (contain at least one "/"), not a bare filename'
|
|
4995
5053
|
})
|
|
4996
5054
|
});
|
|
@@ -5013,102 +5071,104 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
5013
5071
|
"briefSections",
|
|
5014
5072
|
"milestoneShape"
|
|
5015
5073
|
];
|
|
5016
|
-
BriefSectionSchema =
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5074
|
+
BriefSectionSchema = z3.union([
|
|
5075
|
+
z3.object({ builtin: z3.enum(BRIEF_BUILTINS) }),
|
|
5076
|
+
z3.object({ heading: z3.string().min(1), name: z3.string().optional() }),
|
|
5077
|
+
z3.object({ field: z3.string().min(1), name: z3.string().optional() }),
|
|
5078
|
+
z3.object({ phrase: z3.string().min(1), name: z3.string().optional() })
|
|
5021
5079
|
]);
|
|
5022
|
-
BriefSchemaSchema =
|
|
5023
|
-
pr:
|
|
5024
|
-
issue:
|
|
5025
|
-
milestone:
|
|
5026
|
-
ack:
|
|
5080
|
+
BriefSchemaSchema = z3.object({
|
|
5081
|
+
pr: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5082
|
+
issue: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5083
|
+
milestone: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5084
|
+
ack: z3.array(z3.enum(BRIEF_BUILTINS)).optional()
|
|
5027
5085
|
});
|
|
5028
|
-
ProjectEntrySchema =
|
|
5029
|
-
name:
|
|
5030
|
-
description:
|
|
5031
|
-
path:
|
|
5086
|
+
ProjectEntrySchema = z3.object({
|
|
5087
|
+
name: z3.string().min(1),
|
|
5088
|
+
description: z3.string().min(1).optional(),
|
|
5089
|
+
path: z3.string().min(1).optional()
|
|
5032
5090
|
});
|
|
5033
5091
|
VINAYA_CONFIG_FRAGMENT = {
|
|
5034
|
-
roles:
|
|
5092
|
+
roles: z3.record(z3.string(), RoleEntrySchema).optional(),
|
|
5035
5093
|
briefSchema: BriefSchemaSchema.optional(),
|
|
5036
|
-
principals:
|
|
5037
|
-
releaseActor:
|
|
5038
|
-
tokens:
|
|
5039
|
-
collect:
|
|
5094
|
+
principals: z3.array(z3.string()).min(1).optional(),
|
|
5095
|
+
releaseActor: z3.string().min(1).optional(),
|
|
5096
|
+
tokens: z3.object({
|
|
5097
|
+
collect: z3.string().min(1).refine((v) => parseTokensCollectDeclaration(v) !== null, {
|
|
5040
5098
|
message: 'tokens.collect must be exactly "<interpreter> <repo-relative-script-path>" — two whitespace-separated tokens, no flags, no shell syntax, no quoting'
|
|
5041
5099
|
})
|
|
5042
5100
|
}).optional(),
|
|
5043
|
-
blastRadius:
|
|
5044
|
-
proseGates:
|
|
5045
|
-
doctrineRoot:
|
|
5046
|
-
readerFacingPrefix:
|
|
5047
|
-
readerFacingSuffix:
|
|
5048
|
-
legacySlugDir:
|
|
5049
|
-
sourceComments:
|
|
5050
|
-
globs:
|
|
5051
|
-
allowlist:
|
|
5052
|
-
severity:
|
|
5101
|
+
blastRadius: z3.object({ extraDomains: z3.array(z3.string()).optional() }).optional(),
|
|
5102
|
+
proseGates: z3.object({
|
|
5103
|
+
doctrineRoot: z3.string().min(1).optional(),
|
|
5104
|
+
readerFacingPrefix: z3.string().min(1).optional(),
|
|
5105
|
+
readerFacingSuffix: z3.string().min(1).optional(),
|
|
5106
|
+
legacySlugDir: z3.string().min(1).optional(),
|
|
5107
|
+
sourceComments: z3.object({
|
|
5108
|
+
globs: z3.array(z3.string().min(1)).optional(),
|
|
5109
|
+
allowlist: z3.array(z3.string().min(1)).optional(),
|
|
5110
|
+
severity: z3.enum(["warning", "error"]).optional()
|
|
5053
5111
|
}).optional(),
|
|
5054
|
-
specGrandfather:
|
|
5055
|
-
specPaths:
|
|
5056
|
-
productPaths:
|
|
5112
|
+
specGrandfather: z3.union([z3.array(z3.string().min(1)), z3.record(z3.string().min(1), z3.number().int().min(0))]).optional(),
|
|
5113
|
+
specPaths: z3.array(RepoRelativePathSchema).optional(),
|
|
5114
|
+
productPaths: z3.array(RepoRelativePathSchema).optional(),
|
|
5057
5115
|
published: PublishedProseSchema.optional(),
|
|
5058
5116
|
rules: ProseRulesSchema.optional()
|
|
5059
5117
|
}).optional(),
|
|
5060
|
-
projects:
|
|
5061
|
-
dispatch:
|
|
5062
|
-
timeoutMs:
|
|
5063
|
-
reviewerTimeoutMs:
|
|
5064
|
-
killGraceMs:
|
|
5065
|
-
agent:
|
|
5118
|
+
projects: z3.array(ProjectEntrySchema).optional(),
|
|
5119
|
+
dispatch: z3.object({
|
|
5120
|
+
timeoutMs: z3.number().int().positive().optional(),
|
|
5121
|
+
reviewerTimeoutMs: z3.number().int().positive().optional(),
|
|
5122
|
+
killGraceMs: z3.number().int().positive().optional(),
|
|
5123
|
+
agent: z3.enum(["claude", "codex"]).optional()
|
|
5066
5124
|
}).optional(),
|
|
5067
|
-
reviewPolicy:
|
|
5068
|
-
codeReviewThreshold:
|
|
5069
|
-
securityThreshold:
|
|
5070
|
-
maxRounds:
|
|
5071
|
-
maxTaskMinutes:
|
|
5072
|
-
readyPushTimeoutMinutes:
|
|
5125
|
+
reviewPolicy: z3.object({
|
|
5126
|
+
codeReviewThreshold: z3.string().min(1).optional(),
|
|
5127
|
+
securityThreshold: z3.string().min(1).optional(),
|
|
5128
|
+
maxRounds: z3.number().optional(),
|
|
5129
|
+
maxTaskMinutes: z3.number().optional(),
|
|
5130
|
+
readyPushTimeoutMinutes: z3.number().optional()
|
|
5073
5131
|
}).optional(),
|
|
5074
|
-
securityScan:
|
|
5075
|
-
command:
|
|
5132
|
+
securityScan: z3.object({
|
|
5133
|
+
command: z3.array(z3.string().min(1)).min(1)
|
|
5076
5134
|
}).optional(),
|
|
5077
|
-
gateCutovers:
|
|
5078
|
-
objectivesSinceIssue:
|
|
5079
|
-
briefSectionsSinceIssue:
|
|
5080
|
-
documentationSinceIssue:
|
|
5081
|
-
briefRulesSincePr:
|
|
5082
|
-
agentBoxesRefusedSincePr:
|
|
5135
|
+
gateCutovers: z3.object({
|
|
5136
|
+
objectivesSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5137
|
+
briefSectionsSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5138
|
+
documentationSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5139
|
+
briefRulesSincePr: z3.number().int().nonnegative().optional(),
|
|
5140
|
+
agentBoxesRefusedSincePr: z3.number().int().nonnegative().optional()
|
|
5083
5141
|
}).optional(),
|
|
5084
|
-
planning:
|
|
5085
|
-
collisionThreshold:
|
|
5142
|
+
planning: z3.object({
|
|
5143
|
+
collisionThreshold: z3.number().int().nonnegative().optional(),
|
|
5144
|
+
reviewRoundLimit: z3.number().int().positive().optional(),
|
|
5145
|
+
reviewAgent: z3.enum(["same", "different"]).optional()
|
|
5086
5146
|
}).optional(),
|
|
5087
|
-
prePush:
|
|
5088
|
-
alwaysRun:
|
|
5089
|
-
readyTests:
|
|
5090
|
-
mode:
|
|
5091
|
-
workflow:
|
|
5092
|
-
check:
|
|
5147
|
+
prePush: z3.object({
|
|
5148
|
+
alwaysRun: z3.array(z3.string()).optional(),
|
|
5149
|
+
readyTests: z3.object({
|
|
5150
|
+
mode: z3.literal("ci"),
|
|
5151
|
+
workflow: z3.literal(".github/workflows/ci.yml"),
|
|
5152
|
+
check: z3.literal("Vinaya CI")
|
|
5093
5153
|
}).strict().optional(),
|
|
5094
|
-
requiredCi:
|
|
5095
|
-
workflow:
|
|
5096
|
-
check:
|
|
5154
|
+
requiredCi: z3.object({
|
|
5155
|
+
workflow: z3.literal(".github/workflows/ci.yml"),
|
|
5156
|
+
check: z3.literal("Vinaya CI")
|
|
5097
5157
|
}).strict().optional()
|
|
5098
5158
|
}).optional(),
|
|
5099
|
-
report:
|
|
5100
|
-
commandTimeoutMs:
|
|
5159
|
+
report: z3.object({
|
|
5160
|
+
commandTimeoutMs: z3.number().int().positive().optional()
|
|
5101
5161
|
}).superRefine((report, ctx) => {
|
|
5102
5162
|
const commandTimeoutMs = report.commandTimeoutMs;
|
|
5103
5163
|
if (commandTimeoutMs !== undefined && commandTimeoutMs > MAX_REPORT_COMMAND_TIMEOUT_MS) {
|
|
5104
5164
|
ctx.addIssue({
|
|
5105
|
-
code:
|
|
5165
|
+
code: z3.ZodIssueCode.custom,
|
|
5106
5166
|
path: ["commandTimeoutMs"],
|
|
5107
5167
|
message: "must be at most 3600000 (1 hour)"
|
|
5108
5168
|
});
|
|
5109
5169
|
}
|
|
5110
5170
|
}).optional(),
|
|
5111
|
-
decisionRecords:
|
|
5171
|
+
decisionRecords: z3.object({
|
|
5112
5172
|
path: RepoRelativePathSchema
|
|
5113
5173
|
}).strict().optional()
|
|
5114
5174
|
};
|
|
@@ -5117,10 +5177,11 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
5117
5177
|
"reviewPolicy.maxTaskMinutes",
|
|
5118
5178
|
"reviewPolicy.readyPushTimeoutMinutes"
|
|
5119
5179
|
];
|
|
5180
|
+
REVIEW_AGENT_SETTINGS = ["same", "different"];
|
|
5120
5181
|
PrincipalsUnresolvedError = class PrincipalsUnresolvedError extends Error {
|
|
5121
5182
|
kind;
|
|
5122
|
-
constructor(kind, message) {
|
|
5123
|
-
super(message);
|
|
5183
|
+
constructor(kind, message, options) {
|
|
5184
|
+
super(message, options);
|
|
5124
5185
|
this.name = "PrincipalsUnresolvedError";
|
|
5125
5186
|
this.kind = kind;
|
|
5126
5187
|
}
|
|
@@ -5164,7 +5225,7 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
5164
5225
|
});
|
|
5165
5226
|
|
|
5166
5227
|
// ../../harness/processes/vinaya-strict/integration/config/compose.ts
|
|
5167
|
-
import { z as
|
|
5228
|
+
import { z as z4 } from "zod";
|
|
5168
5229
|
function globalChecksIgnoredWarning(path) {
|
|
5169
5230
|
return `${path}: "checks" registration in the global config is ignored — checks may only be registered from a repo-local vinaya.config.json.`;
|
|
5170
5231
|
}
|
|
@@ -5236,7 +5297,7 @@ var init_compose = __esm(() => {
|
|
|
5236
5297
|
"logs",
|
|
5237
5298
|
"decisionRecords"
|
|
5238
5299
|
];
|
|
5239
|
-
VinayaConfigObjectSchema =
|
|
5300
|
+
VinayaConfigObjectSchema = z4.object(orderedShape(CONFIG_KEY_ORDER, KERNEL_FRAGMENT, VINAYA_CONFIG_SECTION.fragment));
|
|
5240
5301
|
VinayaConfigSchema = VinayaConfigObjectSchema.superRefine((config, ctx) => {
|
|
5241
5302
|
for (const refine of KERNEL_CONFIG_REFINEMENTS)
|
|
5242
5303
|
refine(config, ctx);
|
|
@@ -5287,7 +5348,7 @@ var init_compose = __esm(() => {
|
|
|
5287
5348
|
vinayaConfigProvider = {
|
|
5288
5349
|
homeDir: VINAYA_HOME,
|
|
5289
5350
|
loadConfig: () => loadConfig(),
|
|
5290
|
-
loadTrustAnchorConfig: () => loadTrustAnchorConfig(),
|
|
5351
|
+
loadTrustAnchorConfig: (options) => loadTrustAnchorConfig(undefined, options),
|
|
5291
5352
|
loadTrustAnchorConfigAsync: (fetcher, options) => loadTrustAnchorConfigAsync(fetcher, options)
|
|
5292
5353
|
};
|
|
5293
5354
|
installVinayaConfigProvider();
|