@attalabs/vinaya 0.44.1 → 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 +233 -195
- package/dist/checks/bin/check-branch-topology.js +70 -23
- package/dist/checks/bin/check-brief-shape.js +233 -195
- 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 +128 -34
- package/dist/checks/bin/check-coherence.js +336 -245
- package/dist/checks/bin/check-dispatch-readiness.js +3623 -463
- package/dist/checks/bin/check-doc-claims.js +233 -195
- package/dist/checks/bin/check-doc-coverage-push.js +243 -196
- package/dist/checks/bin/check-doc-coverage.js +243 -196
- package/dist/checks/bin/check-doctrine-no-procedures.js +233 -195
- package/dist/checks/bin/check-doctrine-portability.js +233 -195
- package/dist/checks/bin/check-evidence-fresh.js +9983 -1995
- package/dist/checks/bin/check-exec-bits.js +3 -0
- package/dist/checks/bin/check-first-push-dispatch.js +301 -224
- package/dist/checks/bin/check-issue-milestone-attach.js +65 -10
- package/dist/checks/bin/check-issue-objectives-numbering.js +233 -195
- package/dist/checks/bin/check-issue-parts-coverage.js +65 -10
- package/dist/checks/bin/check-issue-surface-globs.js +1032 -236
- package/dist/checks/bin/check-issue-title-grammar.js +5 -1
- package/dist/checks/bin/check-no-disk-state.js +5 -1
- package/dist/checks/bin/check-pr-premise-reassert.js +10 -1
- package/dist/checks/bin/check-pr-report-density.js +5 -1
- package/dist/checks/bin/check-principal-test-plan-wait.js +253 -201
- package/dist/checks/bin/check-quoted-command.js +233 -195
- package/dist/checks/bin/check-reader-resolvable-prose.js +233 -195
- package/dist/checks/bin/check-registry-gates.js +131 -34
- package/dist/checks/bin/check-retired-vocabulary.js +233 -195
- package/dist/checks/bin/check-review-gate.js +233 -195
- package/dist/checks/bin/check-single-plan-pr.js +5 -1
- package/dist/checks/bin/check-surface-scope.js +107 -32
- package/dist/checks/bin/check-test-plan.js +253 -201
- 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 +16617 -7187
- package/dist/lib/pre-push-cache-test-run.js +4487 -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 +15612 -7634
- 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 +9476 -1820
- package/dist/programs/pr-snapshot.js +8916 -1515
- package/dist/programs/pr-verify-evidence.js +9481 -1825
- package/dist/programs/pr.js +11709 -4033
- package/dist/programs/review-post.js +11140 -3496
- package/dist/programs/review-status.js +8996 -1533
- package/dist/programs/run-engine.js +22031 -18759
- package/dist/programs/sync.js +9030 -1629
- package/dist/programs/task-brief.js +10185 -1821
- package/dist/programs/task-sweep.js +9266 -1621
- package/dist/programs/task-tools-serve.js +77118 -16678
- 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 +3 -3
- package/dist/types/harness/processes/vinaya-strict/tools/task-contract/objectives.d.ts +5 -6
- 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 +4 -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 +2 -1
- 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 +29 -8
- 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/{3URbt6IPajL5OOhijN1-x → bJrgAp9Kl4JsCUYkeAYez}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/.next/static/{3URbt6IPajL5OOhijN1-x → bJrgAp9Kl4JsCUYkeAYez}/_ssgManifest.js +0 -0
|
@@ -93,6 +93,7 @@ var DOCTRINE_MAP = [
|
|
|
93
93
|
{ key: "roles/developer.md", source: "executing/developer/doctrine.md", role: "developer", ships: true },
|
|
94
94
|
{ key: "roles/developer/reference.md", source: "executing/developer/reference.md", ships: true },
|
|
95
95
|
{ key: "roles/operator.md", source: "executing/operator/doctrine.md", role: "operator", ships: true },
|
|
96
|
+
{ key: "roles/plan-reviewer.md", source: "thinking/plan-reviewer/doctrine.md", role: "plan-reviewer", ships: true },
|
|
96
97
|
{ key: "roles/planner.md", source: "thinking/planner/doctrine.md", role: "planner", ships: true },
|
|
97
98
|
{ key: "roles/planner/reference.md", source: "thinking/planner/reference.md", ships: true },
|
|
98
99
|
{ key: "roles/principal.md", source: "doctrine/roles/principal.md", role: "principal", ships: true },
|
|
@@ -1246,6 +1247,7 @@ var LOOP_PAUSED_MARKER = commentMarkerFamily("loop:paused");
|
|
|
1246
1247
|
var LOOP_UNPUSHED_WORK_RESUME_MARKER = commentMarkerFamily("loop:unpushed-work-resume");
|
|
1247
1248
|
var PRINCIPAL_RULING_MARKER = commentMarkerFamily("principal:ruling");
|
|
1248
1249
|
var OBJECTIVES_VERSION_MARKER = commentMarkerFamily("objectives");
|
|
1250
|
+
var DOCUMENTATION_EDIT_MARKER = commentMarkerFamily("documentation");
|
|
1249
1251
|
var DEFERRED_FINDINGS_MARKER = commentMarkerFamily("deferred-findings");
|
|
1250
1252
|
var COMMENT_MARKER_PREFIX_CURRENT = COMMENT_MARKER_PREFIX.current;
|
|
1251
1253
|
var COMMENT_MARKER_PREFIXES = [COMMENT_MARKER_PREFIX.current, COMMENT_MARKER_PREFIX.old];
|
|
@@ -1940,7 +1942,8 @@ function isMechanicallyNeutralDiff(diffText, path) {
|
|
|
1940
1942
|
}
|
|
1941
1943
|
return sawChange;
|
|
1942
1944
|
}
|
|
1943
|
-
|
|
1945
|
+
var DOC_NEUTRAL_OWED_PREFIX = "C5 doc-neutral-owed:";
|
|
1946
|
+
function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive, getDiff, bodyGiven = true) {
|
|
1944
1947
|
const out = { errors: [], notes: [] };
|
|
1945
1948
|
if (docOwnersContent === null)
|
|
1946
1949
|
return out;
|
|
@@ -1980,19 +1983,23 @@ function evaluateC5(changed, docOwnersContent, prBody, fileExists, waiverActive,
|
|
|
1980
1983
|
}
|
|
1981
1984
|
if (changed.includes(pointerPath))
|
|
1982
1985
|
continue;
|
|
1986
|
+
const evidenced = () => getDiff !== undefined && matchedFiles.every((f) => {
|
|
1987
|
+
const diff = getDiff(f);
|
|
1988
|
+
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
1989
|
+
});
|
|
1983
1990
|
const declared = neutrals.find((n) => n.surface === b.pointer);
|
|
1984
1991
|
if (declared) {
|
|
1985
|
-
|
|
1986
|
-
const diff = getDiff(f);
|
|
1987
|
-
return diff !== null && isMechanicallyNeutralDiff(diff, f);
|
|
1988
|
-
});
|
|
1989
|
-
if (evidenced) {
|
|
1992
|
+
if (evidenced()) {
|
|
1990
1993
|
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.`);
|
|
1991
1994
|
continue;
|
|
1992
1995
|
}
|
|
1993
1996
|
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.`);
|
|
1994
1997
|
continue;
|
|
1995
1998
|
}
|
|
1999
|
+
if (!bodyGiven && evidenced()) {
|
|
2000
|
+
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>\`.`);
|
|
2001
|
+
continue;
|
|
2002
|
+
}
|
|
1996
2003
|
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.`);
|
|
1997
2004
|
}
|
|
1998
2005
|
return out;
|
package/dist/harness.js
CHANGED
|
@@ -6999,8 +6999,8 @@ function parseOwnerRepo(value) {
|
|
|
6999
6999
|
}
|
|
7000
7000
|
// ../../harness/kernel/dev-process-socket/loader/load-process.ts
|
|
7001
7001
|
import { createHash } from "node:crypto";
|
|
7002
|
-
import { existsSync, readdirSync, readFileSync
|
|
7003
|
-
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
7002
|
+
import { closeSync, constants, existsSync, lstatSync, openSync, readdirSync, readFileSync } from "node:fs";
|
|
7003
|
+
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
7004
7004
|
|
|
7005
7005
|
// ../../node_modules/yaml/dist/index.js
|
|
7006
7006
|
var composer = require_composer();
|
|
@@ -7148,21 +7148,63 @@ function resolveInside(folder, declared, field) {
|
|
|
7148
7148
|
if (isAbsolute(declared) || rel === ".." || rel.startsWith("../") || isAbsolute(rel)) {
|
|
7149
7149
|
throw new ProcessLoadError("declared-path-escapes", `${field} "${declared}" escapes the process folder`, field);
|
|
7150
7150
|
}
|
|
7151
|
+
const subject = `${field} "${declared}"`;
|
|
7152
|
+
let at = folder;
|
|
7153
|
+
for (const segment of rel.split(sep).filter((part) => part !== "")) {
|
|
7154
|
+
at = join(at, segment);
|
|
7155
|
+
const stats = lstatOrUndefined(at);
|
|
7156
|
+
if (stats === undefined)
|
|
7157
|
+
break;
|
|
7158
|
+
if (stats.isSymbolicLink())
|
|
7159
|
+
throw symlinkRefusal(folder, at, subject, field);
|
|
7160
|
+
}
|
|
7151
7161
|
if (!existsSync(resolved)) {
|
|
7152
|
-
throw new ProcessLoadError("declared-path-missing", `${
|
|
7162
|
+
throw new ProcessLoadError("declared-path-missing", `${subject} does not exist`, field);
|
|
7153
7163
|
}
|
|
7164
|
+
filesUnder(folder, resolved, subject, field);
|
|
7154
7165
|
return resolved;
|
|
7155
7166
|
}
|
|
7156
|
-
function
|
|
7157
|
-
|
|
7167
|
+
function lstatOrUndefined(path) {
|
|
7168
|
+
try {
|
|
7169
|
+
return lstatSync(path);
|
|
7170
|
+
} catch (error) {
|
|
7171
|
+
const code = error.code;
|
|
7172
|
+
if (code === "ENOENT" || code === "ENOTDIR")
|
|
7173
|
+
return;
|
|
7174
|
+
throw error;
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
7177
|
+
function symlinkRefusal(folder, link, subject, field) {
|
|
7178
|
+
return new ProcessLoadError("declared-path-symlink", `${subject}: "${relative(folder, link)}" is a symbolic link; a process folder's declared inputs are real files and folders inside it`, field);
|
|
7179
|
+
}
|
|
7180
|
+
function filesUnder(folder, path, subject = "a declared folder", field) {
|
|
7181
|
+
const stats = lstatSync(path);
|
|
7182
|
+
if (stats.isSymbolicLink())
|
|
7183
|
+
throw symlinkRefusal(folder, path, subject, field);
|
|
7184
|
+
if (!stats.isDirectory())
|
|
7158
7185
|
return [path];
|
|
7159
|
-
return readdirSync(path).sort().flatMap((entry) => filesUnder(join(path, entry)));
|
|
7186
|
+
return readdirSync(path).sort().flatMap((entry) => filesUnder(folder, join(path, entry), subject, field));
|
|
7187
|
+
}
|
|
7188
|
+
function readWithoutFollowing(folder, file, subject) {
|
|
7189
|
+
let descriptor;
|
|
7190
|
+
try {
|
|
7191
|
+
descriptor = openSync(file, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
7192
|
+
} catch (error) {
|
|
7193
|
+
if (error.code === "ELOOP")
|
|
7194
|
+
throw symlinkRefusal(folder, file, subject);
|
|
7195
|
+
throw error;
|
|
7196
|
+
}
|
|
7197
|
+
try {
|
|
7198
|
+
return readFileSync(descriptor);
|
|
7199
|
+
} finally {
|
|
7200
|
+
closeSync(descriptor);
|
|
7201
|
+
}
|
|
7160
7202
|
}
|
|
7161
7203
|
function pin(folder, processFile, declared) {
|
|
7162
|
-
const files = [processFile, ...declared.flatMap(filesUnder)];
|
|
7204
|
+
const files = [processFile, ...declared.flatMap((path) => filesUnder(folder, path))];
|
|
7163
7205
|
const hash = createHash("sha256");
|
|
7164
7206
|
for (const file of [...new Set(files)].sort()) {
|
|
7165
|
-
const content =
|
|
7207
|
+
const content = readWithoutFollowing(folder, file, "a declared file");
|
|
7166
7208
|
hash.update(`${relative(folder, file)}\x00${content.length}\x00`);
|
|
7167
7209
|
hash.update(content);
|
|
7168
7210
|
}
|
|
@@ -7180,13 +7222,18 @@ function defaultFlowKey(identity) {
|
|
|
7180
7222
|
function loadProcess(folderPath, options = {}) {
|
|
7181
7223
|
const folder = resolve(folderPath);
|
|
7182
7224
|
const processFile = join(folder, PROCESS_FILE);
|
|
7183
|
-
|
|
7225
|
+
const processFileStats = lstatOrUndefined(processFile);
|
|
7226
|
+
if (processFileStats === undefined) {
|
|
7184
7227
|
throw new ProcessLoadError("missing-process-file", `${PROCESS_FILE} not found in ${folder}`);
|
|
7185
7228
|
}
|
|
7229
|
+
if (processFileStats.isSymbolicLink())
|
|
7230
|
+
throw symlinkRefusal(folder, processFile, PROCESS_FILE);
|
|
7186
7231
|
let raw;
|
|
7187
7232
|
try {
|
|
7188
|
-
raw = $parse(
|
|
7233
|
+
raw = $parse(readWithoutFollowing(folder, processFile, PROCESS_FILE).toString("utf8"));
|
|
7189
7234
|
} catch (error) {
|
|
7235
|
+
if (error instanceof ProcessLoadError)
|
|
7236
|
+
throw error;
|
|
7190
7237
|
throw new ProcessLoadError("unparseable-yaml", `${PROCESS_FILE} is not valid YAML: ${error.message}`);
|
|
7191
7238
|
}
|
|
7192
7239
|
const result = processSchema.safeParse(raw);
|