@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) {
|
|
@@ -254,7 +257,7 @@ function commentMarkerFamily(name) {
|
|
|
254
257
|
function anchorAlternation(spellings) {
|
|
255
258
|
return `(?:${spellings.map((spelling) => spelling.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`;
|
|
256
259
|
}
|
|
257
|
-
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;
|
|
260
|
+
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;
|
|
258
261
|
var init_legacy_markers = __esm(() => {
|
|
259
262
|
REGION_PREFIX = { old: "AEG", current: "VINAYA" };
|
|
260
263
|
PROVENANCE_HEADING = {
|
|
@@ -276,6 +279,7 @@ var init_legacy_markers = __esm(() => {
|
|
|
276
279
|
LOOP_UNPUSHED_WORK_RESUME_MARKER = commentMarkerFamily("loop:unpushed-work-resume");
|
|
277
280
|
PRINCIPAL_RULING_MARKER = commentMarkerFamily("principal:ruling");
|
|
278
281
|
OBJECTIVES_VERSION_MARKER = commentMarkerFamily("objectives");
|
|
282
|
+
DOCUMENTATION_EDIT_MARKER = commentMarkerFamily("documentation");
|
|
279
283
|
DEFERRED_FINDINGS_MARKER = commentMarkerFamily("deferred-findings");
|
|
280
284
|
COMMENT_MARKER_PREFIX_CURRENT = COMMENT_MARKER_PREFIX.current;
|
|
281
285
|
COMMENT_MARKER_PREFIXES = [COMMENT_MARKER_PREFIX.current, COMMENT_MARKER_PREFIX.old];
|
|
@@ -437,6 +441,15 @@ function parsePremiseBlock(prBody) {
|
|
|
437
441
|
}
|
|
438
442
|
return assertions;
|
|
439
443
|
}
|
|
444
|
+
function declaresNewFilesOnly(prBody) {
|
|
445
|
+
const searchIn = anchoredRegion(prBody, "PREMISE", REGION_PREFIXES) ?? prBody;
|
|
446
|
+
const lines = searchIn.split(/\r?\n/).map((l) => l.trim());
|
|
447
|
+
const header = lines.findIndex(isPremiseHeader);
|
|
448
|
+
if (header === -1)
|
|
449
|
+
return false;
|
|
450
|
+
const first = lines.slice(header + 1).find((l) => l !== "");
|
|
451
|
+
return first === NEW_FILES_ONLY_PREMISE && parsePremiseBlock(prBody).length === 0;
|
|
452
|
+
}
|
|
440
453
|
function premiseBlockText(prBody) {
|
|
441
454
|
const searchIn = anchoredRegion(prBody, "PREMISE", REGION_PREFIXES) ?? prBody;
|
|
442
455
|
const lines = searchIn.split(/\r?\n/);
|
|
@@ -484,7 +497,7 @@ function checkPremises(assertions, fileReader) {
|
|
|
484
497
|
}
|
|
485
498
|
return { pass: failures.length === 0, failures };
|
|
486
499
|
}
|
|
487
|
-
var ASSERTION_KINDS, PREMISE_LINE;
|
|
500
|
+
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;
|
|
488
501
|
var init_premise_check = __esm(() => {
|
|
489
502
|
init_anchored_region();
|
|
490
503
|
init_legacy_markers();
|
|
@@ -856,13 +869,16 @@ function checkSurfaceMap(prBody) {
|
|
|
856
869
|
function checkDocUpdateList(prBody) {
|
|
857
870
|
return headingCheck(prBody, "(?:documentation|doc)[- ]update(?:\\s+list)?", "Documentation-update list");
|
|
858
871
|
}
|
|
859
|
-
function checkWorktreeStep0(
|
|
860
|
-
|
|
872
|
+
function checkWorktreeStep0(body) {
|
|
873
|
+
const prBody = body.replaceAll(`\r
|
|
874
|
+
`, `
|
|
875
|
+
`);
|
|
876
|
+
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))
|
|
861
877
|
return { status: "pass", errors: [] };
|
|
862
878
|
return {
|
|
863
879
|
status: "fail",
|
|
864
880
|
errors: [
|
|
865
|
-
"brief-validation worktree Step 0: no `git worktree add`, `cd .worktrees/`, or `bun install --frozen-lockfile`
|
|
881
|
+
"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."
|
|
866
882
|
]
|
|
867
883
|
};
|
|
868
884
|
}
|
|
@@ -1304,6 +1320,7 @@ var init_doctrine_map = __esm(() => {
|
|
|
1304
1320
|
{ key: "roles/developer.md", source: "executing/developer/doctrine.md", role: "developer", ships: true },
|
|
1305
1321
|
{ key: "roles/developer/reference.md", source: "executing/developer/reference.md", ships: true },
|
|
1306
1322
|
{ key: "roles/operator.md", source: "executing/operator/doctrine.md", role: "operator", ships: true },
|
|
1323
|
+
{ key: "roles/plan-reviewer.md", source: "thinking/plan-reviewer/doctrine.md", role: "plan-reviewer", ships: true },
|
|
1307
1324
|
{ key: "roles/planner.md", source: "thinking/planner/doctrine.md", role: "planner", ships: true },
|
|
1308
1325
|
{ key: "roles/planner/reference.md", source: "thinking/planner/reference.md", ships: true },
|
|
1309
1326
|
{ key: "roles/principal.md", source: "doctrine/roles/principal.md", role: "principal", ships: true },
|
|
@@ -1366,59 +1383,22 @@ var init_doctrine_map = __esm(() => {
|
|
|
1366
1383
|
});
|
|
1367
1384
|
|
|
1368
1385
|
// ../../harness/kernel/log/custom.ts
|
|
1369
|
-
import {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
CUSTOM_EVENT_NAME_PATTERN
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
});
|
|
1386
|
-
};
|
|
1387
|
-
if (name.length > CUSTOM_EVENT_NAME_MAX_LENGTH) {
|
|
1388
|
-
refuse(`the name must be at most ${CUSTOM_EVENT_NAME_MAX_LENGTH} characters`);
|
|
1389
|
-
}
|
|
1390
|
-
if (!CUSTOM_EVENT_NAME_PATTERN.test(name)) {
|
|
1391
|
-
refuse("the name must be `<namespace>.<event>` — lowercase letters, digits and `_`, a dot between them");
|
|
1392
|
-
} else if (name.split(".")[0] === CUSTOM_EVENT_RESERVED_NAMESPACE) {
|
|
1393
|
-
refuse(`the \`${CUSTOM_EVENT_RESERVED_NAMESPACE}.\` namespace is reserved for Vinaya's own events`);
|
|
1394
|
-
}
|
|
1395
|
-
const fieldEntries = Object.entries(declaration.fields);
|
|
1396
|
-
if (fieldEntries.length > CUSTOM_EVENT_MAX_FIELDS) {
|
|
1397
|
-
refuse(`at most ${CUSTOM_EVENT_MAX_FIELDS} fields may be declared (found ${fieldEntries.length})`, ["fields"]);
|
|
1398
|
-
}
|
|
1399
|
-
for (const [field, type] of fieldEntries) {
|
|
1400
|
-
if (field.length > CUSTOM_FIELD_NAME_MAX_LENGTH || !CUSTOM_FIELD_NAME_PATTERN.test(field)) {
|
|
1401
|
-
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]);
|
|
1402
|
-
}
|
|
1403
|
-
if (typeof type === "string")
|
|
1404
|
-
continue;
|
|
1405
|
-
if (type.length === 0) {
|
|
1406
|
-
refuse(`field "${field}": a list of words must name at least one word`, ["fields", field]);
|
|
1407
|
-
}
|
|
1408
|
-
if (type.length > CUSTOM_FIELD_MAX_WORDS) {
|
|
1409
|
-
refuse(`field "${field}": a list of words may name at most ${CUSTOM_FIELD_MAX_WORDS}`, ["fields", field]);
|
|
1410
|
-
}
|
|
1411
|
-
const bad = type.filter((w) => w.length > CUSTOM_WORD_MAX_LENGTH || !CUSTOM_WORD_PATTERN.test(w));
|
|
1412
|
-
if (bad.length > 0) {
|
|
1413
|
-
refuse(`field "${field}": a listed word is lowercase letters, digits, \`_\` and \`-\`, at most ${CUSTOM_WORD_MAX_LENGTH} characters`, ["fields", field]);
|
|
1414
|
-
}
|
|
1415
|
-
if (new Set(type).size !== type.length) {
|
|
1416
|
-
refuse(`field "${field}": a list of words names a word twice`, ["fields", field]);
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
});
|
|
1421
|
-
});
|
|
1386
|
+
import {
|
|
1387
|
+
CUSTOM_EVENT_MAX_FIELDS,
|
|
1388
|
+
CUSTOM_EVENT_NAME_MAX_LENGTH,
|
|
1389
|
+
CUSTOM_EVENT_NAME_PATTERN,
|
|
1390
|
+
CUSTOM_EVENT_RESERVED_NAMESPACE,
|
|
1391
|
+
CUSTOM_FIELD_MAX_WORDS,
|
|
1392
|
+
CUSTOM_FIELD_NAME_MAX_LENGTH,
|
|
1393
|
+
CUSTOM_FIELD_NAME_PATTERN,
|
|
1394
|
+
CUSTOM_TEXT_MAX_LENGTH,
|
|
1395
|
+
CUSTOM_WORD_MAX_LENGTH,
|
|
1396
|
+
CUSTOM_WORD_PATTERN,
|
|
1397
|
+
CustomEventDeclarationsSchema,
|
|
1398
|
+
checkCustomEvent,
|
|
1399
|
+
UNRECORDABLE_FIELD_NAME
|
|
1400
|
+
} from "@attalabs/vinaya-log-sdk";
|
|
1401
|
+
var init_custom = () => {};
|
|
1422
1402
|
|
|
1423
1403
|
// ../../harness/kernel/gates/checks/contract.ts
|
|
1424
1404
|
function emitCheckError(error) {
|
|
@@ -1765,14 +1745,15 @@ ${detail}`;
|
|
|
1765
1745
|
return null;
|
|
1766
1746
|
}
|
|
1767
1747
|
}
|
|
1768
|
-
function loadTrustAnchorConfig(fetcher = fetchTrustAnchorConfig) {
|
|
1748
|
+
function loadTrustAnchorConfig(fetcher = fetchTrustAnchorConfig, loadOptions = {}) {
|
|
1749
|
+
const warn = loadOptions.quiet ? () => {} : warnTrustAnchorFallback;
|
|
1769
1750
|
let base64;
|
|
1770
1751
|
try {
|
|
1771
1752
|
base64 = fetcher();
|
|
1772
1753
|
} catch (err) {
|
|
1773
|
-
return trustAnchorFetchFailed(err);
|
|
1754
|
+
return trustAnchorFetchFailed(err, warn);
|
|
1774
1755
|
}
|
|
1775
|
-
return parseTrustAnchorContent(base64);
|
|
1756
|
+
return parseTrustAnchorContent(base64, warn);
|
|
1776
1757
|
}
|
|
1777
1758
|
function loadTrustAnchorConfigOrThrow(fetcher = fetchTrustAnchorConfig) {
|
|
1778
1759
|
let base64;
|
|
@@ -1831,9 +1812,9 @@ var installed = null, NO_CONFIG_PROVIDER_MESSAGE = "no configuration provider is
|
|
|
1831
1812
|
|
|
1832
1813
|
// ../../harness/kernel/config/schema/config-schema.ts
|
|
1833
1814
|
import { isAbsolute } from "node:path";
|
|
1834
|
-
import { z
|
|
1815
|
+
import { z } from "zod";
|
|
1835
1816
|
function checkEntrySchema(fields) {
|
|
1836
|
-
return
|
|
1817
|
+
return z.object(fields).superRefine((entry, ctx) => {
|
|
1837
1818
|
const env = entry.env;
|
|
1838
1819
|
if (!env)
|
|
1839
1820
|
return;
|
|
@@ -1843,14 +1824,14 @@ function checkEntrySchema(fields) {
|
|
|
1843
1824
|
const members = value.anyOf;
|
|
1844
1825
|
if (new Set(members).size !== members.length) {
|
|
1845
1826
|
ctx.addIssue({
|
|
1846
|
-
code:
|
|
1827
|
+
code: z.ZodIssueCode.custom,
|
|
1847
1828
|
message: `env.${key}.anyOf has duplicate members`,
|
|
1848
1829
|
path: ["env", key, "anyOf"]
|
|
1849
1830
|
});
|
|
1850
1831
|
}
|
|
1851
1832
|
if (!members.includes(key)) {
|
|
1852
1833
|
ctx.addIssue({
|
|
1853
|
-
code:
|
|
1834
|
+
code: z.ZodIssueCode.custom,
|
|
1854
1835
|
message: `env.${key}.anyOf must include "${key}" itself as a member`,
|
|
1855
1836
|
path: ["env", key, "anyOf"]
|
|
1856
1837
|
});
|
|
@@ -1873,26 +1854,31 @@ function hookBlockPathRule(prefixes) {
|
|
|
1873
1854
|
return { isCanonical, schema };
|
|
1874
1855
|
}
|
|
1875
1856
|
function managedManifestSchemas(agentVendors, hookBlockPrefixes) {
|
|
1876
|
-
const block =
|
|
1857
|
+
const block = z.object({
|
|
1877
1858
|
path: hookBlockPathRule(hookBlockPrefixes).schema,
|
|
1878
|
-
marker:
|
|
1879
|
-
comment:
|
|
1859
|
+
marker: z.string(),
|
|
1860
|
+
comment: z.enum(["hash", "html"])
|
|
1880
1861
|
});
|
|
1881
|
-
const manifest =
|
|
1882
|
-
version:
|
|
1883
|
-
files:
|
|
1884
|
-
blocks:
|
|
1885
|
-
labels:
|
|
1886
|
-
agents:
|
|
1862
|
+
const manifest = z.object({
|
|
1863
|
+
version: z.number().int().positive(),
|
|
1864
|
+
files: z.array(SafeRepoRelPath),
|
|
1865
|
+
blocks: z.array(block),
|
|
1866
|
+
labels: z.array(z.string()),
|
|
1867
|
+
agents: z.array(z.enum(agentVendors)).optional()
|
|
1887
1868
|
});
|
|
1888
1869
|
return { block, manifest };
|
|
1889
1870
|
}
|
|
1890
1871
|
function logsSchema(events) {
|
|
1891
|
-
return
|
|
1892
|
-
folder:
|
|
1893
|
-
url:
|
|
1894
|
-
|
|
1895
|
-
|
|
1872
|
+
return z.object({
|
|
1873
|
+
folder: z.string().min(1).refine((v) => isAbsolute(v), { message: "logs.folder: must be an absolute path" }).optional(),
|
|
1874
|
+
url: z.string().url().optional(),
|
|
1875
|
+
otlp: z.object({
|
|
1876
|
+
url: z.string().url().regex(/^https?:\/\//i),
|
|
1877
|
+
headers: z.record(z.string()).optional()
|
|
1878
|
+
}).strict().optional(),
|
|
1879
|
+
headers: z.record(z.string()).optional(),
|
|
1880
|
+
readHeaders: z.record(z.string()).optional(),
|
|
1881
|
+
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(),
|
|
1896
1882
|
events: events.optional()
|
|
1897
1883
|
}).refine((v) => [v.folder, v.url].filter((x) => x !== undefined).length <= 1, {
|
|
1898
1884
|
message: "logs: set at most one of folder/url"
|
|
@@ -1900,22 +1886,22 @@ function logsSchema(events) {
|
|
|
1900
1886
|
message: "logs: headers requires url"
|
|
1901
1887
|
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
1902
1888
|
message: "logs: readHeaders requires url"
|
|
1903
|
-
}).or(
|
|
1889
|
+
}).or(z.literal(false)).optional();
|
|
1904
1890
|
}
|
|
1905
1891
|
function kernelConfigFragment(leaves) {
|
|
1906
1892
|
return {
|
|
1907
|
-
rings:
|
|
1908
|
-
ring1_forgeWriteInterception:
|
|
1909
|
-
ring2_asyncAudits:
|
|
1893
|
+
rings: z.object({
|
|
1894
|
+
ring1_forgeWriteInterception: z.boolean(),
|
|
1895
|
+
ring2_asyncAudits: z.boolean()
|
|
1910
1896
|
}).optional(),
|
|
1911
|
-
checks:
|
|
1897
|
+
checks: z.record(z.string(), checkEntrySchema(leaves.checkEntryFields)).optional(),
|
|
1912
1898
|
managed: managedManifestSchemas(leaves.agentVendors, leaves.hookBlockPrefixes).manifest.optional(),
|
|
1913
|
-
ci:
|
|
1914
|
-
logPublish:
|
|
1899
|
+
ci: z.object({ setup: z.string().min(1) }).optional(),
|
|
1900
|
+
logPublish: z.unknown().refine((v) => v === undefined, {
|
|
1915
1901
|
message: "logPublish is removed — telemetry is never posted to a tracker or a code host; configure `logs` instead (a folder or a server destination)"
|
|
1916
1902
|
}),
|
|
1917
|
-
runtimeDir:
|
|
1918
|
-
runner:
|
|
1903
|
+
runtimeDir: z.string().min(1).refine((v) => isAbsolute(v), { message: "runtimeDir: must be an absolute path" }).optional(),
|
|
1904
|
+
runner: z.enum(["standalone", "atta-engine"]).optional(),
|
|
1919
1905
|
logs: logsSchema(leaves.logEvents)
|
|
1920
1906
|
};
|
|
1921
1907
|
}
|
|
@@ -1955,25 +1941,25 @@ function resolveLogsHeaderValues(headers, env) {
|
|
|
1955
1941
|
}
|
|
1956
1942
|
var EnvEntrySchema, KERNEL_CHECK_ENTRY_FIELDS, SafeRepoRelPath, KERNEL_CONFIG_REFINEMENTS;
|
|
1957
1943
|
var init_config_schema = __esm(() => {
|
|
1958
|
-
EnvEntrySchema =
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1944
|
+
EnvEntrySchema = z.union([
|
|
1945
|
+
z.literal(true),
|
|
1946
|
+
z.object({ optional: z.literal(true) }),
|
|
1947
|
+
z.object({ anyOf: z.array(z.string()).min(2) }),
|
|
1948
|
+
z.string()
|
|
1963
1949
|
]);
|
|
1964
1950
|
KERNEL_CHECK_ENTRY_FIELDS = {
|
|
1965
|
-
run:
|
|
1966
|
-
scope:
|
|
1967
|
-
include:
|
|
1968
|
-
args:
|
|
1969
|
-
timeoutMs:
|
|
1970
|
-
env:
|
|
1971
|
-
requiresOpenPr:
|
|
1972
|
-
ownWorkflow:
|
|
1973
|
-
validates:
|
|
1974
|
-
advisory:
|
|
1951
|
+
run: z.string(),
|
|
1952
|
+
scope: z.enum(["diff", "full"]),
|
|
1953
|
+
include: z.array(z.string()).optional(),
|
|
1954
|
+
args: z.array(z.string()).optional(),
|
|
1955
|
+
timeoutMs: z.number().optional(),
|
|
1956
|
+
env: z.record(z.string(), EnvEntrySchema).optional(),
|
|
1957
|
+
requiresOpenPr: z.boolean().optional(),
|
|
1958
|
+
ownWorkflow: z.boolean().optional(),
|
|
1959
|
+
validates: z.enum(["body", "issue"]).optional(),
|
|
1960
|
+
advisory: z.literal(true).optional()
|
|
1975
1961
|
};
|
|
1976
|
-
SafeRepoRelPath =
|
|
1962
|
+
SafeRepoRelPath = z.string().refine(isSafeRepoRelPath, {
|
|
1977
1963
|
message: "must be a repo-root-relative path with no `..` segment or absolute root"
|
|
1978
1964
|
});
|
|
1979
1965
|
KERNEL_CONFIG_REFINEMENTS = [];
|
|
@@ -2206,6 +2192,23 @@ async function ghApiGetAllPagesAsync(pathWithoutPage, opts) {
|
|
|
2206
2192
|
}
|
|
2207
2193
|
throw new Error(`ghApiGetAllPagesAsync: "${pathWithoutPage}" did not terminate within ${MAX_PAGES} pages (${MAX_PAGES * MAX_PER_PAGE} items) — refusing to keep walking.`);
|
|
2208
2194
|
}
|
|
2195
|
+
async function ghLabelIssueCountsAsync(owner, repo, labelQuery) {
|
|
2196
|
+
const stdout = await runAsync([
|
|
2197
|
+
"api",
|
|
2198
|
+
"graphql",
|
|
2199
|
+
"--paginate",
|
|
2200
|
+
"-f",
|
|
2201
|
+
`query=${LABEL_ISSUE_COUNTS_QUERY.replace("$labelQuery", JSON.stringify(labelQuery))}`,
|
|
2202
|
+
"-f",
|
|
2203
|
+
`owner=${owner}`,
|
|
2204
|
+
"-f",
|
|
2205
|
+
`name=${repo}`,
|
|
2206
|
+
"--jq",
|
|
2207
|
+
".data.repository.labels.nodes[] | {name, open: .open.totalCount, total: .all.totalCount}"
|
|
2208
|
+
]);
|
|
2209
|
+
return stdout.split(`
|
|
2210
|
+
`).filter((line) => line.trim() !== "").map((line) => JSON.parse(line));
|
|
2211
|
+
}
|
|
2209
2212
|
function issueListByLabelArgs(owner, repo, label) {
|
|
2210
2213
|
return [
|
|
2211
2214
|
"issue",
|
|
@@ -2239,7 +2242,14 @@ async function ghIssueListByAnyLabelAsync(owner, repo, labels) {
|
|
|
2239
2242
|
const perLabel = await Promise.all(labels.map((l) => ghIssueListByLabelAsync(owner, repo, l)));
|
|
2240
2243
|
return dedupeByNumber(perLabel.flat());
|
|
2241
2244
|
}
|
|
2242
|
-
var execFileAsync2, systemEnv, MAX_PER_PAGE = 100, MAX_PAGES = 100
|
|
2245
|
+
var execFileAsync2, systemEnv, MAX_PER_PAGE = 100, MAX_PAGES = 100, LABEL_ISSUE_COUNTS_QUERY = `query($owner: String!, $name: String!, $endCursor: String) {
|
|
2246
|
+
repository(owner: $owner, name: $name) {
|
|
2247
|
+
labels(first: 100, after: $endCursor, query: $labelQuery) {
|
|
2248
|
+
pageInfo { hasNextPage endCursor }
|
|
2249
|
+
nodes { name open: issues(states: OPEN) { totalCount } all: issues { totalCount } }
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
}`;
|
|
2243
2253
|
var init_gh = __esm(() => {
|
|
2244
2254
|
execFileAsync2 = promisify2(execFile2);
|
|
2245
2255
|
systemEnv = {
|
|
@@ -3435,7 +3445,13 @@ function isMechanicallyNeutralDiff(diffText, path) {
|
|
|
3435
3445
|
}
|
|
3436
3446
|
return sawChange;
|
|
3437
3447
|
}
|
|
3438
|
-
function
|
|
3448
|
+
function prBodyGiven(env = process.env) {
|
|
3449
|
+
return env.PR_BODY !== undefined || env.PR_BODY_FILE !== undefined;
|
|
3450
|
+
}
|
|
3451
|
+
function owedNeutralNotes(result) {
|
|
3452
|
+
return result.notes.filter((n) => n.startsWith(DOC_NEUTRAL_OWED_PREFIX));
|
|
3453
|
+
}
|
|
3454
|
+
function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive, getDiff, bodyGiven = true) {
|
|
3439
3455
|
const out = { errors: [], notes: [] };
|
|
3440
3456
|
if (docOwnersContent === null)
|
|
3441
3457
|
return out;
|
|
@@ -3475,24 +3491,28 @@ function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive,
|
|
|
3475
3491
|
}
|
|
3476
3492
|
if (changed.includes(pointerPath))
|
|
3477
3493
|
continue;
|
|
3494
|
+
const evidenced = () => getDiff !== undefined && matchedFiles.every((f) => {
|
|
3495
|
+
const diff = getDiff(f);
|
|
3496
|
+
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
3497
|
+
});
|
|
3478
3498
|
const declared = neutrals.find((n) => n.surface === b.pointer);
|
|
3479
3499
|
if (declared) {
|
|
3480
|
-
|
|
3481
|
-
const diff = getDiff(f);
|
|
3482
|
-
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
3483
|
-
});
|
|
3484
|
-
if (evidenced) {
|
|
3500
|
+
if (evidenced()) {
|
|
3485
3501
|
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.`);
|
|
3486
3502
|
continue;
|
|
3487
3503
|
}
|
|
3488
3504
|
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.`);
|
|
3489
3505
|
continue;
|
|
3490
3506
|
}
|
|
3507
|
+
if (!bodyGiven && evidenced()) {
|
|
3508
|
+
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>\`.`);
|
|
3509
|
+
continue;
|
|
3510
|
+
}
|
|
3491
3511
|
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.`);
|
|
3492
3512
|
}
|
|
3493
3513
|
return out;
|
|
3494
3514
|
}
|
|
3495
|
-
var DOC_OWNERS_PATH = ".vinaya/doc-owners", SEPARATOR, LANGUAGE_COMMENT_PREFIXES;
|
|
3515
|
+
var DOC_OWNERS_PATH = ".vinaya/doc-owners", SEPARATOR, LANGUAGE_COMMENT_PREFIXES, DOC_NEUTRAL_OWED_PREFIX = "C5 doc-neutral-owed:";
|
|
3496
3516
|
var init_doc_owners = __esm(() => {
|
|
3497
3517
|
init_file_classify();
|
|
3498
3518
|
init_waiver_label();
|
|
@@ -3547,6 +3567,20 @@ var init_protected_paths = __esm(() => {
|
|
|
3547
3567
|
];
|
|
3548
3568
|
});
|
|
3549
3569
|
|
|
3570
|
+
// ../../harness/processes/vinaya-strict/tools/task-contract/test-plan-proof.ts
|
|
3571
|
+
function stripObjectiveIdSpans(text) {
|
|
3572
|
+
return text.replace(ITEM_IDS_SPAN_RE, "").trim();
|
|
3573
|
+
}
|
|
3574
|
+
var ID_LIST, LINE_IDS_RE, ITEM_IDS_SPAN_RE;
|
|
3575
|
+
var init_test_plan_proof = __esm(() => {
|
|
3576
|
+
init_brief_validation();
|
|
3577
|
+
init_objectives();
|
|
3578
|
+
init_test_plan_section();
|
|
3579
|
+
ID_LIST = String.raw`O\d+(?:\s*,\s*O\d+)*`;
|
|
3580
|
+
LINE_IDS_RE = new RegExp(String.raw`\(\s*(${ID_LIST})\s*\)\s*$`);
|
|
3581
|
+
ITEM_IDS_SPAN_RE = new RegExp(String.raw`(?<!\`)(\`+)\s*\(?\s*(${ID_LIST})\s*\)?\s*\1(?!\`)`, "g");
|
|
3582
|
+
});
|
|
3583
|
+
|
|
3550
3584
|
// ../../harness/processes/vinaya-strict/tools/task-contract/issue-validation.ts
|
|
3551
3585
|
function hasRationaleField(body, labelPattern) {
|
|
3552
3586
|
const re = new RegExp(`(?:\\*\\*|^#{1,4}\\s+)\\s*(?:${labelPattern})`, "im");
|
|
@@ -3745,7 +3779,7 @@ function checkPartsCiteDefinedObjectives(body) {
|
|
|
3745
3779
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3746
3780
|
}
|
|
3747
3781
|
function liveCommand(text) {
|
|
3748
|
-
const trimmed = text
|
|
3782
|
+
const trimmed = stripObjectiveIdSpans(text);
|
|
3749
3783
|
const span = /^(`+)(.+)\1$/.exec(trimmed);
|
|
3750
3784
|
return span ? span[2].trim() : trimmed;
|
|
3751
3785
|
}
|
|
@@ -3854,9 +3888,19 @@ function namedPathsIn(text) {
|
|
|
3854
3888
|
function boundaryPinnedFiles(body) {
|
|
3855
3889
|
const boundary = rationaleFieldText(PATH_TEXT(body), "Boundary");
|
|
3856
3890
|
const excluded = new Set(namedPathsIn(boundaryOutText(body)));
|
|
3857
|
-
|
|
3891
|
+
const named = [...namedPathsIn(boundary), ...rootFilesPinnedIn(boundary)];
|
|
3892
|
+
return [...new Set(named)].filter((p) => looksLikeFilePath(p) && !excluded.has(p));
|
|
3858
3893
|
}
|
|
3859
|
-
|
|
3894
|
+
function rootFilesPinnedIn(boundary) {
|
|
3895
|
+
const start = boundary.search(/\bPinned files\s*:/i);
|
|
3896
|
+
if (start === -1)
|
|
3897
|
+
return [];
|
|
3898
|
+
const clause = boundary.slice(start);
|
|
3899
|
+
const out = BOUNDARY_OUT_RE.exec(clause);
|
|
3900
|
+
const pinned = out ? clause.slice(0, out.index) : clause;
|
|
3901
|
+
return [...pinned.matchAll(ROOT_FILE_RE_GLOBAL)].map((m) => m[1]);
|
|
3902
|
+
}
|
|
3903
|
+
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;
|
|
3860
3904
|
var init_issue_validation = __esm(() => {
|
|
3861
3905
|
init_parse_rationale_deps();
|
|
3862
3906
|
init_labels();
|
|
@@ -3870,11 +3914,13 @@ var init_issue_validation = __esm(() => {
|
|
|
3870
3914
|
init_derive_section7();
|
|
3871
3915
|
init_doctrine_map();
|
|
3872
3916
|
init_objectives();
|
|
3917
|
+
init_waiver_label();
|
|
3873
3918
|
init_issue_documentation();
|
|
3874
3919
|
init_touched_path();
|
|
3875
3920
|
init_protected_paths();
|
|
3876
3921
|
init_quoted_command();
|
|
3877
3922
|
init_test_plan_section();
|
|
3923
|
+
init_test_plan_proof();
|
|
3878
3924
|
RATIONALE_FIELDS = [
|
|
3879
3925
|
{ name: "Boundary", pattern: "Boundary" },
|
|
3880
3926
|
{ name: "Sizing", pattern: "Sizing" },
|
|
@@ -3918,6 +3964,7 @@ var init_issue_validation = __esm(() => {
|
|
|
3918
3964
|
"html",
|
|
3919
3965
|
"css"
|
|
3920
3966
|
]);
|
|
3967
|
+
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;
|
|
3921
3968
|
CI_SHARD_PROBE = `${CI_SHARD_DIR}/shard-1.txt`;
|
|
3922
3969
|
});
|
|
3923
3970
|
|
|
@@ -4370,7 +4417,7 @@ var init_review_gate = __esm(() => {
|
|
|
4370
4417
|
|
|
4371
4418
|
// ../../harness/processes/vinaya-strict/tools/prose-rules-config.ts
|
|
4372
4419
|
import safeRegex from "safe-regex2";
|
|
4373
|
-
import { z as
|
|
4420
|
+
import { z as z2 } from "zod";
|
|
4374
4421
|
function isPlainObject(value) {
|
|
4375
4422
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4376
4423
|
}
|
|
@@ -4640,18 +4687,18 @@ var init_prose_rules_config = __esm(() => {
|
|
|
4640
4687
|
FIXED_DEFAULT_KEYS = ["pattern", "patterns", "flags", "means", "message", "id"];
|
|
4641
4688
|
CUSTOM_KEYS = ["id", "pattern", "patterns", "flags", "means", "scopes", "severity", "exempt"];
|
|
4642
4689
|
DEFAULT_IDS = new Set([...DEFAULT_PROSE_RULES.map((rule) => rule.id), DECISION_RECORD_CITATION_ID]);
|
|
4643
|
-
RepoRelativePathSchema =
|
|
4690
|
+
RepoRelativePathSchema = z2.string().min(1).superRefine((entry, ctx) => {
|
|
4644
4691
|
const reason = outsideRepositoryReason(entry);
|
|
4645
4692
|
if (reason)
|
|
4646
|
-
ctx.addIssue({ code:
|
|
4693
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, message: reason });
|
|
4647
4694
|
});
|
|
4648
|
-
ProseRulesSchema =
|
|
4695
|
+
ProseRulesSchema = z2.unknown().superRefine((value, ctx) => {
|
|
4649
4696
|
for (const issue of proseRulesIssues(value)) {
|
|
4650
|
-
ctx.addIssue({ code:
|
|
4697
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, path: issue.path, message: issue.message });
|
|
4651
4698
|
}
|
|
4652
4699
|
}).transform((value) => value);
|
|
4653
|
-
PublishedProseSchema =
|
|
4654
|
-
allow:
|
|
4700
|
+
PublishedProseSchema = z2.object({
|
|
4701
|
+
allow: z2.array(z2.string().min(1)).optional()
|
|
4655
4702
|
}).strict();
|
|
4656
4703
|
});
|
|
4657
4704
|
|
|
@@ -4666,10 +4713,13 @@ var exports_vinaya_config_section = {};
|
|
|
4666
4713
|
__export(exports_vinaya_config_section, {
|
|
4667
4714
|
BRIEF_BUILTINS: () => BRIEF_BUILTINS,
|
|
4668
4715
|
CANONICAL_HOOK_BLOCK_PREFIXES: () => CANONICAL_HOOK_BLOCK_PREFIXES,
|
|
4716
|
+
DEFAULT_REVIEW_AGENT: () => DEFAULT_REVIEW_AGENT,
|
|
4717
|
+
DEFAULT_REVIEW_ROUND_LIMIT: () => DEFAULT_REVIEW_ROUND_LIMIT,
|
|
4669
4718
|
LOCAL_OVERRIDABLE_KEYS: () => LOCAL_OVERRIDABLE_KEYS,
|
|
4670
4719
|
LOCAL_OVERRIDE_FILENAME: () => LOCAL_OVERRIDE_FILENAME,
|
|
4671
4720
|
PRINCIPALS_FIX: () => PRINCIPALS_FIX,
|
|
4672
4721
|
PrincipalsUnresolvedError: () => PrincipalsUnresolvedError,
|
|
4722
|
+
REVIEW_AGENT_SETTINGS: () => REVIEW_AGENT_SETTINGS,
|
|
4673
4723
|
VINAYA_CHECK_ENTRY_FIELDS: () => VINAYA_CHECK_ENTRY_FIELDS,
|
|
4674
4724
|
VINAYA_CONFIG_FILENAME: () => VINAYA_CONFIG_FILENAME,
|
|
4675
4725
|
VINAYA_CONFIG_FRAGMENT: () => VINAYA_CONFIG_FRAGMENT,
|
|
@@ -4691,7 +4741,9 @@ __export(exports_vinaya_config_section, {
|
|
|
4691
4741
|
resolveGateCutovers: () => resolveGateCutovers,
|
|
4692
4742
|
resolveLocalPacingOverride: () => resolveLocalPacingOverride,
|
|
4693
4743
|
resolveReleaseActor: () => resolveReleaseActor,
|
|
4744
|
+
resolveReviewAgent: () => resolveReviewAgent,
|
|
4694
4745
|
resolveReviewPolicy: () => resolveReviewPolicy,
|
|
4746
|
+
resolveReviewRoundLimit: () => resolveReviewRoundLimit,
|
|
4695
4747
|
resolveSecurityScanCommand: () => resolveSecurityScanCommand,
|
|
4696
4748
|
tokensCollectTrustKey: () => tokensCollectTrustKey,
|
|
4697
4749
|
trustAnchorFallbackWarning: () => trustAnchorFallbackWarning,
|
|
@@ -4702,7 +4754,7 @@ import { execFileSync as execFileSync3 } from "node:child_process";
|
|
|
4702
4754
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
4703
4755
|
import { homedir } from "node:os";
|
|
4704
4756
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
4705
|
-
import { z as
|
|
4757
|
+
import { z as z3 } from "zod";
|
|
4706
4758
|
function isDefaultedAgentVendorPath(path, manifest) {
|
|
4707
4759
|
if (manifest.agents !== undefined)
|
|
4708
4760
|
return false;
|
|
@@ -4736,7 +4788,7 @@ function decisionRecordsOutsideDoctrine(config, ctx) {
|
|
|
4736
4788
|
return;
|
|
4737
4789
|
const issue = decisionRecordsPathIssue(path, config.proseGates?.doctrineRoot);
|
|
4738
4790
|
if (issue)
|
|
4739
|
-
ctx.addIssue({ code:
|
|
4791
|
+
ctx.addIssue({ code: z3.ZodIssueCode.custom, path: ["decisionRecords", "path"], message: issue });
|
|
4740
4792
|
}
|
|
4741
4793
|
function globalPrincipalsIgnoredWarning(path) {
|
|
4742
4794
|
return `${path}: "principals" in the global config is ignored — principals may only be declared from a repo-local vinaya.config.json.`;
|
|
@@ -4840,6 +4892,12 @@ function resolveGateCutovers(config) {
|
|
|
4840
4892
|
function resolveCollisionThreshold(config) {
|
|
4841
4893
|
return config?.planning?.collisionThreshold ?? DEFAULT_COLLISION_THRESHOLD;
|
|
4842
4894
|
}
|
|
4895
|
+
function resolveReviewRoundLimit(config) {
|
|
4896
|
+
return config?.planning?.reviewRoundLimit ?? DEFAULT_REVIEW_ROUND_LIMIT;
|
|
4897
|
+
}
|
|
4898
|
+
function resolveReviewAgent(config) {
|
|
4899
|
+
return config?.planning?.reviewAgent ?? DEFAULT_REVIEW_AGENT;
|
|
4900
|
+
}
|
|
4843
4901
|
function principalsNotConfigured(why) {
|
|
4844
4902
|
return new PrincipalsUnresolvedError("not-configured", `no Principal is configured (${why}) — ${PRINCIPALS_FIX}.`);
|
|
4845
4903
|
}
|
|
@@ -4854,7 +4912,7 @@ function createTrustedPrincipalsResolver(reads) {
|
|
|
4854
4912
|
}
|
|
4855
4913
|
if (isMissingFileError(err))
|
|
4856
4914
|
throw principalsNotConfigured("the default branch has no vinaya.config.json");
|
|
4857
|
-
throw new PrincipalsUnresolvedError("read-failed", `could not read "principals" from vinaya.config.json on the default branch: ${fetchFailureReason(err)}
|
|
4915
|
+
throw new PrincipalsUnresolvedError("read-failed", `could not read "principals" from vinaya.config.json on the default branch: ${fetchFailureReason(err)}`, { cause: err });
|
|
4858
4916
|
}
|
|
4859
4917
|
const unusable = { why: "" };
|
|
4860
4918
|
const config = reads.parse(content, (why) => {
|
|
@@ -4914,7 +4972,7 @@ function trustTokensCollectCommand(repoGitCommonDir, interpreter, script, script
|
|
|
4914
4972
|
store[key] = { interpreter, script, scriptBlobHash, trustedAt: new Date().toISOString() };
|
|
4915
4973
|
writeTokensCollectTrustStore(storePath, store);
|
|
4916
4974
|
}
|
|
4917
|
-
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;
|
|
4975
|
+
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;
|
|
4918
4976
|
var init_vinaya_config_section = __esm(() => {
|
|
4919
4977
|
init_review_policy();
|
|
4920
4978
|
init_issue_validation();
|
|
@@ -4928,10 +4986,10 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
4928
4986
|
VINAYA_HOME = join2(homedir(), ".vinaya");
|
|
4929
4987
|
CANONICAL_HOOK_BLOCK_PREFIXES = [".git/", ".husky/", ".vinaya/hooks/", ".claude/hooks/"];
|
|
4930
4988
|
VINAYA_CHECK_ENTRY_FIELDS = {
|
|
4931
|
-
principalOwed:
|
|
4989
|
+
principalOwed: z3.literal(true).optional()
|
|
4932
4990
|
};
|
|
4933
|
-
RoleEntrySchema =
|
|
4934
|
-
contract:
|
|
4991
|
+
RoleEntrySchema = z3.object({
|
|
4992
|
+
contract: z3.string().refine((p) => p.includes("/"), {
|
|
4935
4993
|
message: 'must be a path (contain at least one "/"), not a bare filename'
|
|
4936
4994
|
})
|
|
4937
4995
|
});
|
|
@@ -4954,102 +5012,104 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
4954
5012
|
"briefSections",
|
|
4955
5013
|
"milestoneShape"
|
|
4956
5014
|
];
|
|
4957
|
-
BriefSectionSchema =
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
5015
|
+
BriefSectionSchema = z3.union([
|
|
5016
|
+
z3.object({ builtin: z3.enum(BRIEF_BUILTINS) }),
|
|
5017
|
+
z3.object({ heading: z3.string().min(1), name: z3.string().optional() }),
|
|
5018
|
+
z3.object({ field: z3.string().min(1), name: z3.string().optional() }),
|
|
5019
|
+
z3.object({ phrase: z3.string().min(1), name: z3.string().optional() })
|
|
4962
5020
|
]);
|
|
4963
|
-
BriefSchemaSchema =
|
|
4964
|
-
pr:
|
|
4965
|
-
issue:
|
|
4966
|
-
milestone:
|
|
4967
|
-
ack:
|
|
5021
|
+
BriefSchemaSchema = z3.object({
|
|
5022
|
+
pr: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5023
|
+
issue: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5024
|
+
milestone: z3.object({ sections: z3.array(BriefSectionSchema) }).optional(),
|
|
5025
|
+
ack: z3.array(z3.enum(BRIEF_BUILTINS)).optional()
|
|
4968
5026
|
});
|
|
4969
|
-
ProjectEntrySchema =
|
|
4970
|
-
name:
|
|
4971
|
-
description:
|
|
4972
|
-
path:
|
|
5027
|
+
ProjectEntrySchema = z3.object({
|
|
5028
|
+
name: z3.string().min(1),
|
|
5029
|
+
description: z3.string().min(1).optional(),
|
|
5030
|
+
path: z3.string().min(1).optional()
|
|
4973
5031
|
});
|
|
4974
5032
|
VINAYA_CONFIG_FRAGMENT = {
|
|
4975
|
-
roles:
|
|
5033
|
+
roles: z3.record(z3.string(), RoleEntrySchema).optional(),
|
|
4976
5034
|
briefSchema: BriefSchemaSchema.optional(),
|
|
4977
|
-
principals:
|
|
4978
|
-
releaseActor:
|
|
4979
|
-
tokens:
|
|
4980
|
-
collect:
|
|
5035
|
+
principals: z3.array(z3.string()).min(1).optional(),
|
|
5036
|
+
releaseActor: z3.string().min(1).optional(),
|
|
5037
|
+
tokens: z3.object({
|
|
5038
|
+
collect: z3.string().min(1).refine((v) => parseTokensCollectDeclaration(v) !== null, {
|
|
4981
5039
|
message: 'tokens.collect must be exactly "<interpreter> <repo-relative-script-path>" — two whitespace-separated tokens, no flags, no shell syntax, no quoting'
|
|
4982
5040
|
})
|
|
4983
5041
|
}).optional(),
|
|
4984
|
-
blastRadius:
|
|
4985
|
-
proseGates:
|
|
4986
|
-
doctrineRoot:
|
|
4987
|
-
readerFacingPrefix:
|
|
4988
|
-
readerFacingSuffix:
|
|
4989
|
-
legacySlugDir:
|
|
4990
|
-
sourceComments:
|
|
4991
|
-
globs:
|
|
4992
|
-
allowlist:
|
|
4993
|
-
severity:
|
|
5042
|
+
blastRadius: z3.object({ extraDomains: z3.array(z3.string()).optional() }).optional(),
|
|
5043
|
+
proseGates: z3.object({
|
|
5044
|
+
doctrineRoot: z3.string().min(1).optional(),
|
|
5045
|
+
readerFacingPrefix: z3.string().min(1).optional(),
|
|
5046
|
+
readerFacingSuffix: z3.string().min(1).optional(),
|
|
5047
|
+
legacySlugDir: z3.string().min(1).optional(),
|
|
5048
|
+
sourceComments: z3.object({
|
|
5049
|
+
globs: z3.array(z3.string().min(1)).optional(),
|
|
5050
|
+
allowlist: z3.array(z3.string().min(1)).optional(),
|
|
5051
|
+
severity: z3.enum(["warning", "error"]).optional()
|
|
4994
5052
|
}).optional(),
|
|
4995
|
-
specGrandfather:
|
|
4996
|
-
specPaths:
|
|
4997
|
-
productPaths:
|
|
5053
|
+
specGrandfather: z3.union([z3.array(z3.string().min(1)), z3.record(z3.string().min(1), z3.number().int().min(0))]).optional(),
|
|
5054
|
+
specPaths: z3.array(RepoRelativePathSchema).optional(),
|
|
5055
|
+
productPaths: z3.array(RepoRelativePathSchema).optional(),
|
|
4998
5056
|
published: PublishedProseSchema.optional(),
|
|
4999
5057
|
rules: ProseRulesSchema.optional()
|
|
5000
5058
|
}).optional(),
|
|
5001
|
-
projects:
|
|
5002
|
-
dispatch:
|
|
5003
|
-
timeoutMs:
|
|
5004
|
-
reviewerTimeoutMs:
|
|
5005
|
-
killGraceMs:
|
|
5006
|
-
agent:
|
|
5059
|
+
projects: z3.array(ProjectEntrySchema).optional(),
|
|
5060
|
+
dispatch: z3.object({
|
|
5061
|
+
timeoutMs: z3.number().int().positive().optional(),
|
|
5062
|
+
reviewerTimeoutMs: z3.number().int().positive().optional(),
|
|
5063
|
+
killGraceMs: z3.number().int().positive().optional(),
|
|
5064
|
+
agent: z3.enum(["claude", "codex"]).optional()
|
|
5007
5065
|
}).optional(),
|
|
5008
|
-
reviewPolicy:
|
|
5009
|
-
codeReviewThreshold:
|
|
5010
|
-
securityThreshold:
|
|
5011
|
-
maxRounds:
|
|
5012
|
-
maxTaskMinutes:
|
|
5013
|
-
readyPushTimeoutMinutes:
|
|
5066
|
+
reviewPolicy: z3.object({
|
|
5067
|
+
codeReviewThreshold: z3.string().min(1).optional(),
|
|
5068
|
+
securityThreshold: z3.string().min(1).optional(),
|
|
5069
|
+
maxRounds: z3.number().optional(),
|
|
5070
|
+
maxTaskMinutes: z3.number().optional(),
|
|
5071
|
+
readyPushTimeoutMinutes: z3.number().optional()
|
|
5014
5072
|
}).optional(),
|
|
5015
|
-
securityScan:
|
|
5016
|
-
command:
|
|
5073
|
+
securityScan: z3.object({
|
|
5074
|
+
command: z3.array(z3.string().min(1)).min(1)
|
|
5017
5075
|
}).optional(),
|
|
5018
|
-
gateCutovers:
|
|
5019
|
-
objectivesSinceIssue:
|
|
5020
|
-
briefSectionsSinceIssue:
|
|
5021
|
-
documentationSinceIssue:
|
|
5022
|
-
briefRulesSincePr:
|
|
5023
|
-
agentBoxesRefusedSincePr:
|
|
5076
|
+
gateCutovers: z3.object({
|
|
5077
|
+
objectivesSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5078
|
+
briefSectionsSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5079
|
+
documentationSinceIssue: z3.number().int().nonnegative().optional(),
|
|
5080
|
+
briefRulesSincePr: z3.number().int().nonnegative().optional(),
|
|
5081
|
+
agentBoxesRefusedSincePr: z3.number().int().nonnegative().optional()
|
|
5024
5082
|
}).optional(),
|
|
5025
|
-
planning:
|
|
5026
|
-
collisionThreshold:
|
|
5083
|
+
planning: z3.object({
|
|
5084
|
+
collisionThreshold: z3.number().int().nonnegative().optional(),
|
|
5085
|
+
reviewRoundLimit: z3.number().int().positive().optional(),
|
|
5086
|
+
reviewAgent: z3.enum(["same", "different"]).optional()
|
|
5027
5087
|
}).optional(),
|
|
5028
|
-
prePush:
|
|
5029
|
-
alwaysRun:
|
|
5030
|
-
readyTests:
|
|
5031
|
-
mode:
|
|
5032
|
-
workflow:
|
|
5033
|
-
check:
|
|
5088
|
+
prePush: z3.object({
|
|
5089
|
+
alwaysRun: z3.array(z3.string()).optional(),
|
|
5090
|
+
readyTests: z3.object({
|
|
5091
|
+
mode: z3.literal("ci"),
|
|
5092
|
+
workflow: z3.literal(".github/workflows/ci.yml"),
|
|
5093
|
+
check: z3.literal("Vinaya CI")
|
|
5034
5094
|
}).strict().optional(),
|
|
5035
|
-
requiredCi:
|
|
5036
|
-
workflow:
|
|
5037
|
-
check:
|
|
5095
|
+
requiredCi: z3.object({
|
|
5096
|
+
workflow: z3.literal(".github/workflows/ci.yml"),
|
|
5097
|
+
check: z3.literal("Vinaya CI")
|
|
5038
5098
|
}).strict().optional()
|
|
5039
5099
|
}).optional(),
|
|
5040
|
-
report:
|
|
5041
|
-
commandTimeoutMs:
|
|
5100
|
+
report: z3.object({
|
|
5101
|
+
commandTimeoutMs: z3.number().int().positive().optional()
|
|
5042
5102
|
}).superRefine((report, ctx) => {
|
|
5043
5103
|
const commandTimeoutMs = report.commandTimeoutMs;
|
|
5044
5104
|
if (commandTimeoutMs !== undefined && commandTimeoutMs > MAX_REPORT_COMMAND_TIMEOUT_MS) {
|
|
5045
5105
|
ctx.addIssue({
|
|
5046
|
-
code:
|
|
5106
|
+
code: z3.ZodIssueCode.custom,
|
|
5047
5107
|
path: ["commandTimeoutMs"],
|
|
5048
5108
|
message: "must be at most 3600000 (1 hour)"
|
|
5049
5109
|
});
|
|
5050
5110
|
}
|
|
5051
5111
|
}).optional(),
|
|
5052
|
-
decisionRecords:
|
|
5112
|
+
decisionRecords: z3.object({
|
|
5053
5113
|
path: RepoRelativePathSchema
|
|
5054
5114
|
}).strict().optional()
|
|
5055
5115
|
};
|
|
@@ -5058,10 +5118,11 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
5058
5118
|
"reviewPolicy.maxTaskMinutes",
|
|
5059
5119
|
"reviewPolicy.readyPushTimeoutMinutes"
|
|
5060
5120
|
];
|
|
5121
|
+
REVIEW_AGENT_SETTINGS = ["same", "different"];
|
|
5061
5122
|
PrincipalsUnresolvedError = class PrincipalsUnresolvedError extends Error {
|
|
5062
5123
|
kind;
|
|
5063
|
-
constructor(kind, message) {
|
|
5064
|
-
super(message);
|
|
5124
|
+
constructor(kind, message, options) {
|
|
5125
|
+
super(message, options);
|
|
5065
5126
|
this.name = "PrincipalsUnresolvedError";
|
|
5066
5127
|
this.kind = kind;
|
|
5067
5128
|
}
|
|
@@ -5105,7 +5166,7 @@ var init_vinaya_config_section = __esm(() => {
|
|
|
5105
5166
|
});
|
|
5106
5167
|
|
|
5107
5168
|
// ../../harness/processes/vinaya-strict/integration/config/compose.ts
|
|
5108
|
-
import { z as
|
|
5169
|
+
import { z as z4 } from "zod";
|
|
5109
5170
|
function globalChecksIgnoredWarning(path) {
|
|
5110
5171
|
return `${path}: "checks" registration in the global config is ignored — checks may only be registered from a repo-local vinaya.config.json.`;
|
|
5111
5172
|
}
|
|
@@ -5177,7 +5238,7 @@ var init_compose = __esm(() => {
|
|
|
5177
5238
|
"logs",
|
|
5178
5239
|
"decisionRecords"
|
|
5179
5240
|
];
|
|
5180
|
-
VinayaConfigObjectSchema =
|
|
5241
|
+
VinayaConfigObjectSchema = z4.object(orderedShape(CONFIG_KEY_ORDER, KERNEL_FRAGMENT, VINAYA_CONFIG_SECTION.fragment));
|
|
5181
5242
|
VinayaConfigSchema = VinayaConfigObjectSchema.superRefine((config, ctx) => {
|
|
5182
5243
|
for (const refine of KERNEL_CONFIG_REFINEMENTS)
|
|
5183
5244
|
refine(config, ctx);
|
|
@@ -5228,7 +5289,7 @@ var init_compose = __esm(() => {
|
|
|
5228
5289
|
vinayaConfigProvider = {
|
|
5229
5290
|
homeDir: VINAYA_HOME,
|
|
5230
5291
|
loadConfig: () => loadConfig(),
|
|
5231
|
-
loadTrustAnchorConfig: () => loadTrustAnchorConfig(),
|
|
5292
|
+
loadTrustAnchorConfig: (options) => loadTrustAnchorConfig(undefined, options),
|
|
5232
5293
|
loadTrustAnchorConfigAsync: (fetcher, options) => loadTrustAnchorConfigAsync(fetcher, options)
|
|
5233
5294
|
};
|
|
5234
5295
|
installVinayaConfigProvider();
|