@attalabs/vinaya 0.35.0 → 0.36.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/aeg-root/roles/planner/reference.md +20 -5
- package/aeg-root/roles/planner.md +2 -0
- package/aeg-root/roles/reviewer.md +3 -1
- package/aeg-root/templates/brief-template.md +4 -0
- package/dist/checks/bin/check-body-bare-digits.js +1447 -1350
- package/dist/checks/bin/check-branch-topology.js +1418 -1341
- package/dist/checks/bin/check-brief-shape.js +1448 -1351
- package/dist/checks/bin/check-changeset-coverage.js +1470 -1361
- package/dist/checks/bin/check-closes-n.js +1418 -1341
- package/dist/checks/bin/check-coherence.js +1459 -1352
- package/dist/checks/bin/check-dead-branch-push.js +1407 -1340
- package/dist/checks/bin/check-dispatch-readiness.js +1462 -1355
- package/dist/checks/bin/check-doc-coverage-push.js +1470 -1361
- package/dist/checks/bin/check-doc-coverage.js +1472 -1363
- package/dist/checks/bin/check-doctrine-no-procedures.js +1445 -1348
- package/dist/checks/bin/check-doctrine-portability.js +1470 -1361
- package/dist/checks/bin/check-evidence-fresh.js +1477 -1368
- package/dist/checks/bin/check-exec-bits.js +1471 -1362
- package/dist/checks/bin/check-first-push-dispatch.js +1461 -1354
- package/dist/checks/bin/check-issue-assignment.js +1418 -1341
- package/dist/checks/bin/check-issue-milestone-attach.js +1407 -1340
- package/dist/checks/bin/check-issue-objectives-numbering.js +1445 -1348
- package/dist/checks/bin/check-issue-parts-coverage.js +1407 -1340
- package/dist/checks/bin/check-issue-surface-globs.js +1461 -1354
- package/dist/checks/bin/check-issue-title-grammar.js +1407 -1340
- package/dist/checks/bin/check-issue-tranche-label.js +1407 -1340
- package/dist/checks/bin/check-main-branch-refusal.js +1409 -1342
- package/dist/checks/bin/check-no-disk-state.js +1409 -1342
- package/dist/checks/bin/check-pr-premise-reassert.js +1445 -1348
- package/dist/checks/bin/check-pr-report-density.js +1409 -1342
- package/dist/checks/bin/check-principal-test-plan-wait.js +1409 -1342
- package/dist/checks/bin/check-quoted-command.js +1468 -1359
- package/dist/checks/bin/check-reader-resolvable-prose.js +1468 -1359
- package/dist/checks/bin/check-registry-gates.js +1409 -1342
- package/dist/checks/bin/check-retired-vocabulary.js +1468 -1359
- package/dist/checks/bin/check-review-gate.js +1459 -1362
- package/dist/checks/bin/check-single-plan-pr.js +1407 -1340
- package/dist/checks/bin/check-surface-scope.js +1418 -1341
- package/dist/checks/bin/check-test-plan.js +1407 -1340
- package/dist/checks/bin/check-token-collection-wired.js +1409 -1342
- package/dist/checks/bin/check-token-report.js +1409 -1342
- package/dist/checks/bin/check-workspace-escape.js +1471 -1362
- package/dist/index.js +4029 -1880
- package/dist/lib/pre-push-cache-test-run.js +94 -14
- package/dist/lib/pre-push-select-tests.js +83 -15
- package/package.json +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +24 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +33 -10
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +28 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +10 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/1q96_modules_@clerk_nextjs_dist_esm_app-router_client_keyless-creator-reader_0lom2js.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__0zc_0gx._.js → [root-of-the-server]__1wy7w66._.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/00z3-ljjd1gj9.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3goaig_rysc6p.js → 2o9l0b7eqbr57.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3ip5z3cf43bgo.js → 3lqjwjrcvq481.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3u9emqjwpd0t9.js +0 -1
- /package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/{aeg-core → vinaya/studio-standalone/_node_modules/@attalabs/aeg-core}/bin/verify-coherence.ts +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{ca66rAHI_w9D7S7ceXDvR → z1fTSBP6ZlUjObzFIp-qq}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{ca66rAHI_w9D7S7ceXDvR → z1fTSBP6ZlUjObzFIp-qq}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{ca66rAHI_w9D7S7ceXDvR → z1fTSBP6ZlUjObzFIp-qq}/_ssgManifest.js +0 -0
|
@@ -427,6 +427,16 @@ function globToRegex(pat) {
|
|
|
427
427
|
return new RegExp(re);
|
|
428
428
|
}
|
|
429
429
|
var SEPARATOR = /(?:[ \t]*[—–][ \t]*|[ \t]+-[ \t]+)/.source;
|
|
430
|
+
// ../../packages/aeg-core/src/review-policy.ts
|
|
431
|
+
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
432
|
+
function blockingSeverities(scale, threshold) {
|
|
433
|
+
const idx = scale.indexOf(threshold);
|
|
434
|
+
if (idx === -1) {
|
|
435
|
+
throw new Error(`blockingSeverities: threshold "${threshold}" is not one of ${scale.join(" > ")}`);
|
|
436
|
+
}
|
|
437
|
+
return scale.slice(0, idx + 1);
|
|
438
|
+
}
|
|
439
|
+
var SECURITY_HIGH_AND_ABOVE = blockingSeverities(SECURITY_SEVERITY_ORDER, "HIGH");
|
|
430
440
|
// ../../packages/aeg-core/src/pr-tier.ts
|
|
431
441
|
var OVERRIDE_BODY_TOKEN = `[${label("override-docs")}]`;
|
|
432
442
|
// ../../packages/aeg-core/src/premise-check.ts
|
|
@@ -457,20 +467,42 @@ var NON_PATH_TOP_SEGMENTS = new Set(["origin", "refs", "HEAD", "vinaya", "fix"])
|
|
|
457
467
|
|
|
458
468
|
// ../../packages/aeg-core/src/doctrine-no-procedures.ts
|
|
459
469
|
var SHELL_LANGS = new Set(["", "sh", "bash", "shell", "console"]);
|
|
470
|
+
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
471
|
+
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
472
|
+
|
|
473
|
+
// ../../packages/aeg-core/src/quoted-command.ts
|
|
474
|
+
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
475
|
+
|
|
460
476
|
// ../../packages/aeg-core/src/issue-validation.ts
|
|
461
477
|
var TYPE_LABEL_IDS = LABELS.filter((l) => l.category === "type").map((l) => l.id);
|
|
462
478
|
var DOC_PATH_RE = /(?:(?:aeg-root|apps|packages|specs|docs|tools|\.claude|\.github)\/[\w./@-]*\.(?:md|mdx)|\.claude\/(?:skills|rules)\/[\w./-]+|\b(?:docs-index|decisions|projects|state-machine|enforcement|process|README|CLAUDE)\.md\b|\b[\w-]+-(?:spec|decisions|backlog)\.md\b)/i;
|
|
463
479
|
var DOC_PATH_RE_GLOBAL = new RegExp(DOC_PATH_RE.source, "gi");
|
|
480
|
+
var FILE_EXTENSIONS = new Set([
|
|
481
|
+
"ts",
|
|
482
|
+
"tsx",
|
|
483
|
+
"js",
|
|
484
|
+
"jsx",
|
|
485
|
+
"mjs",
|
|
486
|
+
"cjs",
|
|
487
|
+
"json",
|
|
488
|
+
"jsonc",
|
|
489
|
+
"md",
|
|
490
|
+
"mdx",
|
|
491
|
+
"yml",
|
|
492
|
+
"yaml",
|
|
493
|
+
"txt",
|
|
494
|
+
"sh",
|
|
495
|
+
"lock",
|
|
496
|
+
"toml",
|
|
497
|
+
"ndjson",
|
|
498
|
+
"html",
|
|
499
|
+
"css"
|
|
500
|
+
]);
|
|
464
501
|
|
|
465
502
|
// ../../packages/aeg-core/src/coherence-checks.ts
|
|
466
503
|
var R1_GRANDFATHERED_ISSUES = new Set([279, 280, 281, 282]);
|
|
467
504
|
// ../../packages/aeg-core/src/diagram-model.ts
|
|
468
505
|
import matter from "gray-matter";
|
|
469
|
-
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
470
|
-
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
471
|
-
|
|
472
|
-
// ../../packages/aeg-core/src/quoted-command.ts
|
|
473
|
-
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
474
506
|
// ../../packages/aeg-core/src/retired-vocabulary.ts
|
|
475
507
|
var RETIRED_PATTERNS = [
|
|
476
508
|
String.raw`\bD-[0-9]{3}\b`,
|
|
@@ -899,7 +931,9 @@ var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
|
|
|
899
931
|
"escalated",
|
|
900
932
|
"principal_stop",
|
|
901
933
|
"confidence",
|
|
902
|
-
"reappearance"
|
|
934
|
+
"reappearance",
|
|
935
|
+
"repeat_finding",
|
|
936
|
+
"repeat_failure"
|
|
903
937
|
])
|
|
904
938
|
}).strict(),
|
|
905
939
|
z2.object({
|
|
@@ -1403,6 +1437,10 @@ var LoopStateRecordSchema = z3.object({
|
|
|
1403
1437
|
budgets: LoopBudgetsSchema,
|
|
1404
1438
|
heldResult: roundHeadIdentity.nullable(),
|
|
1405
1439
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
1440
|
+
repeatMemory: z3.object({
|
|
1441
|
+
blockingFindings: z3.array(z3.string()),
|
|
1442
|
+
lastFailure: z3.object({ signature: z3.string(), message: z3.string() }).nullable()
|
|
1443
|
+
}).strict().optional(),
|
|
1406
1444
|
recordedAt: isoTimestamp
|
|
1407
1445
|
}).strict();
|
|
1408
1446
|
var EffectRecordSchema = z3.object({
|
|
@@ -2133,7 +2171,7 @@ import { dirname as dirname6, join as join7 } from "node:path";
|
|
|
2133
2171
|
import { promisify as promisify5 } from "node:util";
|
|
2134
2172
|
|
|
2135
2173
|
// src/lib/config.ts
|
|
2136
|
-
import { execFile as execFile4, execFileSync as
|
|
2174
|
+
import { execFile as execFile4, execFileSync as execFileSync3 } from "node:child_process";
|
|
2137
2175
|
import { promisify as promisify4 } from "node:util";
|
|
2138
2176
|
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, realpathSync, writeFileSync } from "node:fs";
|
|
2139
2177
|
import { homedir } from "node:os";
|
|
@@ -2143,6 +2181,28 @@ import { z as z4 } from "zod";
|
|
|
2143
2181
|
// src/lib/agent-vendors.ts
|
|
2144
2182
|
var AGENT_VENDORS = ["skills", "claude", "gemini"];
|
|
2145
2183
|
|
|
2184
|
+
// src/lib/worker-boundary.ts
|
|
2185
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
2186
|
+
var LOG_HEADER_KEYCHAIN_SERVICE = "Vinaya Log";
|
|
2187
|
+
var logHeaderKeychainCache = new Map;
|
|
2188
|
+
function readRealLogHeaderKeychainCredential(variable) {
|
|
2189
|
+
if (process.platform !== "darwin")
|
|
2190
|
+
return null;
|
|
2191
|
+
try {
|
|
2192
|
+
return execFileSync2("/usr/bin/security", ["find-generic-password", "-s", LOG_HEADER_KEYCHAIN_SERVICE, "-a", variable, "-w"], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 5000, maxBuffer: 1024 * 1024 }).replace(/\n$/, "");
|
|
2193
|
+
} catch {
|
|
2194
|
+
return null;
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
function readLogHeaderKeychainCredential(variable) {
|
|
2198
|
+
const cached = logHeaderKeychainCache.get(variable);
|
|
2199
|
+
if (cached !== undefined)
|
|
2200
|
+
return cached;
|
|
2201
|
+
const value = readRealLogHeaderKeychainCredential(variable);
|
|
2202
|
+
logHeaderKeychainCache.set(variable, value);
|
|
2203
|
+
return value;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2146
2206
|
// src/lib/config.ts
|
|
2147
2207
|
var EnvEntrySchema = z4.union([
|
|
2148
2208
|
z4.literal(true),
|
|
@@ -2318,6 +2378,9 @@ var VinayaConfigSchema = z4.object({
|
|
|
2318
2378
|
briefRulesSincePr: z4.number().int().nonnegative().optional(),
|
|
2319
2379
|
agentBoxesRefusedSincePr: z4.number().int().nonnegative().optional()
|
|
2320
2380
|
}).optional(),
|
|
2381
|
+
planning: z4.object({
|
|
2382
|
+
collisionThreshold: z4.number().int().nonnegative().optional()
|
|
2383
|
+
}).optional(),
|
|
2321
2384
|
prePush: z4.object({
|
|
2322
2385
|
alwaysRun: z4.array(z4.string()).optional()
|
|
2323
2386
|
}).optional(),
|
|
@@ -2452,12 +2515,17 @@ function resolveTrustAnchorLogsDestination(local, trustAnchorConfig) {
|
|
|
2452
2515
|
return "url" in anchored && anchored.url === local.url ? anchored : null;
|
|
2453
2516
|
return "folder" in anchored && anchored.folder === local.folder ? anchored : null;
|
|
2454
2517
|
}
|
|
2455
|
-
function resolveLogsHeaderValues(headers, env) {
|
|
2518
|
+
function resolveLogsHeaderValues(headers, env, readKeychain = readLogHeaderKeychainCredential) {
|
|
2456
2519
|
if (!headers)
|
|
2457
2520
|
return;
|
|
2458
2521
|
const resolved = {};
|
|
2459
2522
|
for (const [key, value] of Object.entries(headers)) {
|
|
2460
|
-
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) =>
|
|
2523
|
+
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) => {
|
|
2524
|
+
const fromEnv = env[name];
|
|
2525
|
+
if (fromEnv !== undefined)
|
|
2526
|
+
return fromEnv;
|
|
2527
|
+
return readKeychain(name) ?? "";
|
|
2528
|
+
});
|
|
2461
2529
|
}
|
|
2462
2530
|
return resolved;
|
|
2463
2531
|
}
|
|
@@ -2466,7 +2534,7 @@ function trustAnchorRepo() {
|
|
|
2466
2534
|
if (fromRunner)
|
|
2467
2535
|
return fromRunner;
|
|
2468
2536
|
try {
|
|
2469
|
-
const url =
|
|
2537
|
+
const url = execFileSync3("git", ["remote", "get-url", "origin"], {
|
|
2470
2538
|
encoding: "utf-8",
|
|
2471
2539
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2472
2540
|
});
|
|
@@ -2513,7 +2581,7 @@ function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
|
2513
2581
|
return ref;
|
|
2514
2582
|
}
|
|
2515
2583
|
function readTrustAnchorConfigAtRef(ref) {
|
|
2516
|
-
const raw =
|
|
2584
|
+
const raw = execFileSync3("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
2517
2585
|
encoding: "utf-8",
|
|
2518
2586
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2519
2587
|
timeout: 1e4
|
|
@@ -2527,7 +2595,7 @@ function ghFetchTrustAnchorConfig() {
|
|
|
2527
2595
|
const repo = trustAnchorRepo();
|
|
2528
2596
|
if (!repo)
|
|
2529
2597
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
2530
|
-
return
|
|
2598
|
+
return execFileSync3("gh", ["api", `repos/${repo}/contents/${LOCAL_CONFIG_FILENAME}`, "--jq", ".content"], {
|
|
2531
2599
|
encoding: "utf-8",
|
|
2532
2600
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2533
2601
|
});
|
|
@@ -2618,7 +2686,7 @@ function loadConfig() {
|
|
|
2618
2686
|
var TOKENS_COLLECT_TRUST_PATH = join4(GLOBAL_VINAYA_HOME, "tokens-collect-trust.json");
|
|
2619
2687
|
|
|
2620
2688
|
// src/lib/run-paths.ts
|
|
2621
|
-
import { execFileSync as
|
|
2689
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
2622
2690
|
import { chmodSync, existsSync as existsSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
2623
2691
|
import { dirname as dirname4, join as join5, resolve as resolvePath } from "node:path";
|
|
2624
2692
|
var TASKS_EXECUTION_DIRNAME = "tasks-execution";
|
|
@@ -2766,7 +2834,7 @@ function resolveRepoSync() {
|
|
|
2766
2834
|
}
|
|
2767
2835
|
let url;
|
|
2768
2836
|
try {
|
|
2769
|
-
url =
|
|
2837
|
+
url = execFileSync4("git", ["remote", "get-url", "origin"], {
|
|
2770
2838
|
encoding: "utf-8",
|
|
2771
2839
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2772
2840
|
}).trim();
|
|
@@ -4371,6 +4439,16 @@ var COMMANDS = [
|
|
|
4371
4439
|
"Safe to run more than once: the server stores events by `event_id` and ignores one it already holds, so a re-sent chunk creates no duplicate, and a second run finds the folder emptied and the queue drained."
|
|
4372
4440
|
],
|
|
4373
4441
|
status: "shipped"
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
name: "log set-credential",
|
|
4445
|
+
description: "Store a `logs.headers` delivery credential in the macOS login Keychain, read from standard input",
|
|
4446
|
+
details: [
|
|
4447
|
+
'For a `logs.url` server whose `headers` reference a credential by variable name (`{ "authorization": "Bearer ${VINAYA_LOG_TOKEN}" }`) on a host where that variable is not in the process environment — the case an Operator the Claude desktop app starts on macOS hits, since the token lives in an interactive shell file the app never reads. It stores the value so header resolution finds it in the Keychain when the environment does not, with no token copied into any settings file.',
|
|
4448
|
+
'The value is read from STANDARD INPUT, never a command-line argument a `ps` listing could show — `printf %s "$TOKEN" | vinaya log set-credential VINAYA_LOG_TOKEN`. Only the variable NAME, which is not a secret, sits on the command line; the value is stored under the Keychain service `Vinaya Log` keyed by that name. The command prints a confirmation naming the variable and never echoes, returns, or logs the value.',
|
|
4449
|
+
"macOS only (Linux keyrings are out of scope); it refuses with a clear message elsewhere. The environment still wins over the Keychain wherever the variable is set, so this changes nothing for a host that already exports it."
|
|
4450
|
+
],
|
|
4451
|
+
status: "shipped"
|
|
4374
4452
|
}
|
|
4375
4453
|
];
|
|
4376
4454
|
// ../../packages/sources/src/select-source.ts
|
|
@@ -4393,6 +4471,8 @@ var TEMPLATE_PATH = existsSync7(PACKAGED_TEMPLATE_PATH) ? PACKAGED_TEMPLATE_PATH
|
|
|
4393
4471
|
var DRAFT_ISSUE_SENTINEL = Number.MAX_SAFE_INTEGER;
|
|
4394
4472
|
|
|
4395
4473
|
// src/lib/forge-write.ts
|
|
4474
|
+
var IMPORTABLE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"];
|
|
4475
|
+
var IMPORT_SEARCH_PATHSPEC = IMPORTABLE_EXTENSIONS.map((e) => `*${e}`);
|
|
4396
4476
|
var INFORMATIONAL_DISPATCH_BLOCKER_CLASSES = new Set([
|
|
4397
4477
|
"depends-on-not-merged",
|
|
4398
4478
|
"conflicts-with"
|
|
@@ -121,7 +121,7 @@ function parseHunkRanges(patch) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// src/lib/config.ts
|
|
124
|
-
import { execFile as execFile4, execFileSync as
|
|
124
|
+
import { execFile as execFile4, execFileSync as execFileSync3 } from "node:child_process";
|
|
125
125
|
import { promisify as promisify4 } from "node:util";
|
|
126
126
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync3, realpathSync, writeFileSync } from "node:fs";
|
|
127
127
|
import { homedir } from "node:os";
|
|
@@ -531,6 +531,16 @@ function globToRegex(pat) {
|
|
|
531
531
|
return new RegExp(re);
|
|
532
532
|
}
|
|
533
533
|
var SEPARATOR = /(?:[ \t]*[—–][ \t]*|[ \t]+-[ \t]+)/.source;
|
|
534
|
+
// ../../packages/aeg-core/src/review-policy.ts
|
|
535
|
+
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
536
|
+
function blockingSeverities(scale, threshold) {
|
|
537
|
+
const idx = scale.indexOf(threshold);
|
|
538
|
+
if (idx === -1) {
|
|
539
|
+
throw new Error(`blockingSeverities: threshold "${threshold}" is not one of ${scale.join(" > ")}`);
|
|
540
|
+
}
|
|
541
|
+
return scale.slice(0, idx + 1);
|
|
542
|
+
}
|
|
543
|
+
var SECURITY_HIGH_AND_ABOVE = blockingSeverities(SECURITY_SEVERITY_ORDER, "HIGH");
|
|
534
544
|
// ../../packages/aeg-core/src/pr-tier.ts
|
|
535
545
|
var OVERRIDE_BODY_TOKEN = `[${label("override-docs")}]`;
|
|
536
546
|
// ../../packages/aeg-core/src/premise-check.ts
|
|
@@ -561,20 +571,42 @@ var NON_PATH_TOP_SEGMENTS = new Set(["origin", "refs", "HEAD", "vinaya", "fix"])
|
|
|
561
571
|
|
|
562
572
|
// ../../packages/aeg-core/src/doctrine-no-procedures.ts
|
|
563
573
|
var SHELL_LANGS = new Set(["", "sh", "bash", "shell", "console"]);
|
|
574
|
+
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
575
|
+
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
576
|
+
|
|
577
|
+
// ../../packages/aeg-core/src/quoted-command.ts
|
|
578
|
+
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
579
|
+
|
|
564
580
|
// ../../packages/aeg-core/src/issue-validation.ts
|
|
565
581
|
var TYPE_LABEL_IDS = LABELS.filter((l) => l.category === "type").map((l) => l.id);
|
|
566
582
|
var DOC_PATH_RE = /(?:(?:aeg-root|apps|packages|specs|docs|tools|\.claude|\.github)\/[\w./@-]*\.(?:md|mdx)|\.claude\/(?:skills|rules)\/[\w./-]+|\b(?:docs-index|decisions|projects|state-machine|enforcement|process|README|CLAUDE)\.md\b|\b[\w-]+-(?:spec|decisions|backlog)\.md\b)/i;
|
|
567
583
|
var DOC_PATH_RE_GLOBAL = new RegExp(DOC_PATH_RE.source, "gi");
|
|
584
|
+
var FILE_EXTENSIONS = new Set([
|
|
585
|
+
"ts",
|
|
586
|
+
"tsx",
|
|
587
|
+
"js",
|
|
588
|
+
"jsx",
|
|
589
|
+
"mjs",
|
|
590
|
+
"cjs",
|
|
591
|
+
"json",
|
|
592
|
+
"jsonc",
|
|
593
|
+
"md",
|
|
594
|
+
"mdx",
|
|
595
|
+
"yml",
|
|
596
|
+
"yaml",
|
|
597
|
+
"txt",
|
|
598
|
+
"sh",
|
|
599
|
+
"lock",
|
|
600
|
+
"toml",
|
|
601
|
+
"ndjson",
|
|
602
|
+
"html",
|
|
603
|
+
"css"
|
|
604
|
+
]);
|
|
568
605
|
|
|
569
606
|
// ../../packages/aeg-core/src/coherence-checks.ts
|
|
570
607
|
var R1_GRANDFATHERED_ISSUES = new Set([279, 280, 281, 282]);
|
|
571
608
|
// ../../packages/aeg-core/src/diagram-model.ts
|
|
572
609
|
import matter from "gray-matter";
|
|
573
|
-
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
574
|
-
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
575
|
-
|
|
576
|
-
// ../../packages/aeg-core/src/quoted-command.ts
|
|
577
|
-
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
578
610
|
// ../../packages/aeg-core/src/retired-vocabulary.ts
|
|
579
611
|
var RETIRED_PATTERNS = [
|
|
580
612
|
String.raw`\bD-[0-9]{3}\b`,
|
|
@@ -1003,7 +1035,9 @@ var DevReviewLoopEventSchema = z2.discriminatedUnion("event", [
|
|
|
1003
1035
|
"escalated",
|
|
1004
1036
|
"principal_stop",
|
|
1005
1037
|
"confidence",
|
|
1006
|
-
"reappearance"
|
|
1038
|
+
"reappearance",
|
|
1039
|
+
"repeat_finding",
|
|
1040
|
+
"repeat_failure"
|
|
1007
1041
|
])
|
|
1008
1042
|
}).strict(),
|
|
1009
1043
|
z2.object({
|
|
@@ -1507,6 +1541,10 @@ var LoopStateRecordSchema = z3.object({
|
|
|
1507
1541
|
budgets: LoopBudgetsSchema,
|
|
1508
1542
|
heldResult: roundHeadIdentity.nullable(),
|
|
1509
1543
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
1544
|
+
repeatMemory: z3.object({
|
|
1545
|
+
blockingFindings: z3.array(z3.string()),
|
|
1546
|
+
lastFailure: z3.object({ signature: z3.string(), message: z3.string() }).nullable()
|
|
1547
|
+
}).strict().optional(),
|
|
1510
1548
|
recordedAt: isoTimestamp
|
|
1511
1549
|
}).strict();
|
|
1512
1550
|
var EffectRecordSchema = z3.object({
|
|
@@ -1636,6 +1674,28 @@ var CONTROL_AREA_DIRNAME = "control";
|
|
|
1636
1674
|
// src/lib/agent-vendors.ts
|
|
1637
1675
|
var AGENT_VENDORS = ["skills", "claude", "gemini"];
|
|
1638
1676
|
|
|
1677
|
+
// src/lib/worker-boundary.ts
|
|
1678
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
1679
|
+
var LOG_HEADER_KEYCHAIN_SERVICE = "Vinaya Log";
|
|
1680
|
+
var logHeaderKeychainCache = new Map;
|
|
1681
|
+
function readRealLogHeaderKeychainCredential(variable) {
|
|
1682
|
+
if (process.platform !== "darwin")
|
|
1683
|
+
return null;
|
|
1684
|
+
try {
|
|
1685
|
+
return execFileSync2("/usr/bin/security", ["find-generic-password", "-s", LOG_HEADER_KEYCHAIN_SERVICE, "-a", variable, "-w"], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 5000, maxBuffer: 1024 * 1024 }).replace(/\n$/, "");
|
|
1686
|
+
} catch {
|
|
1687
|
+
return null;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
function readLogHeaderKeychainCredential(variable) {
|
|
1691
|
+
const cached = logHeaderKeychainCache.get(variable);
|
|
1692
|
+
if (cached !== undefined)
|
|
1693
|
+
return cached;
|
|
1694
|
+
const value = readRealLogHeaderKeychainCredential(variable);
|
|
1695
|
+
logHeaderKeychainCache.set(variable, value);
|
|
1696
|
+
return value;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1639
1699
|
// src/lib/config.ts
|
|
1640
1700
|
var EnvEntrySchema = z4.union([
|
|
1641
1701
|
z4.literal(true),
|
|
@@ -1811,6 +1871,9 @@ var VinayaConfigSchema = z4.object({
|
|
|
1811
1871
|
briefRulesSincePr: z4.number().int().nonnegative().optional(),
|
|
1812
1872
|
agentBoxesRefusedSincePr: z4.number().int().nonnegative().optional()
|
|
1813
1873
|
}).optional(),
|
|
1874
|
+
planning: z4.object({
|
|
1875
|
+
collisionThreshold: z4.number().int().nonnegative().optional()
|
|
1876
|
+
}).optional(),
|
|
1814
1877
|
prePush: z4.object({
|
|
1815
1878
|
alwaysRun: z4.array(z4.string()).optional()
|
|
1816
1879
|
}).optional(),
|
|
@@ -1945,12 +2008,17 @@ function resolveTrustAnchorLogsDestination(local, trustAnchorConfig) {
|
|
|
1945
2008
|
return "url" in anchored && anchored.url === local.url ? anchored : null;
|
|
1946
2009
|
return "folder" in anchored && anchored.folder === local.folder ? anchored : null;
|
|
1947
2010
|
}
|
|
1948
|
-
function resolveLogsHeaderValues(headers, env) {
|
|
2011
|
+
function resolveLogsHeaderValues(headers, env, readKeychain = readLogHeaderKeychainCredential) {
|
|
1949
2012
|
if (!headers)
|
|
1950
2013
|
return;
|
|
1951
2014
|
const resolved = {};
|
|
1952
2015
|
for (const [key, value] of Object.entries(headers)) {
|
|
1953
|
-
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) =>
|
|
2016
|
+
resolved[key] = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) => {
|
|
2017
|
+
const fromEnv = env[name];
|
|
2018
|
+
if (fromEnv !== undefined)
|
|
2019
|
+
return fromEnv;
|
|
2020
|
+
return readKeychain(name) ?? "";
|
|
2021
|
+
});
|
|
1954
2022
|
}
|
|
1955
2023
|
return resolved;
|
|
1956
2024
|
}
|
|
@@ -1959,7 +2027,7 @@ function trustAnchorRepo() {
|
|
|
1959
2027
|
if (fromRunner)
|
|
1960
2028
|
return fromRunner;
|
|
1961
2029
|
try {
|
|
1962
|
-
const url =
|
|
2030
|
+
const url = execFileSync3("git", ["remote", "get-url", "origin"], {
|
|
1963
2031
|
encoding: "utf-8",
|
|
1964
2032
|
stdio: ["ignore", "pipe", "pipe"]
|
|
1965
2033
|
});
|
|
@@ -2006,7 +2074,7 @@ function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
|
2006
2074
|
return ref;
|
|
2007
2075
|
}
|
|
2008
2076
|
function readTrustAnchorConfigAtRef(ref) {
|
|
2009
|
-
const raw =
|
|
2077
|
+
const raw = execFileSync3("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
2010
2078
|
encoding: "utf-8",
|
|
2011
2079
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2012
2080
|
timeout: 1e4
|
|
@@ -2020,7 +2088,7 @@ function ghFetchTrustAnchorConfig() {
|
|
|
2020
2088
|
const repo = trustAnchorRepo();
|
|
2021
2089
|
if (!repo)
|
|
2022
2090
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
2023
|
-
return
|
|
2091
|
+
return execFileSync3("gh", ["api", `repos/${repo}/contents/${LOCAL_CONFIG_FILENAME}`, "--jq", ".content"], {
|
|
2024
2092
|
encoding: "utf-8",
|
|
2025
2093
|
stdio: ["ignore", "pipe", "pipe"]
|
|
2026
2094
|
});
|
|
@@ -2111,7 +2179,7 @@ function loadConfig() {
|
|
|
2111
2179
|
var TOKENS_COLLECT_TRUST_PATH = join2(GLOBAL_VINAYA_HOME, "tokens-collect-trust.json");
|
|
2112
2180
|
|
|
2113
2181
|
// src/lib/remote-base.ts
|
|
2114
|
-
import { execFileSync as
|
|
2182
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
2115
2183
|
import { join as join3 } from "node:path";
|
|
2116
2184
|
function cleanGitEnv() {
|
|
2117
2185
|
const env = { ...process.env };
|
|
@@ -2123,7 +2191,7 @@ function cleanGitEnv() {
|
|
|
2123
2191
|
}
|
|
2124
2192
|
function git(repoRoot, args) {
|
|
2125
2193
|
try {
|
|
2126
|
-
return
|
|
2194
|
+
return execFileSync4("git", args, {
|
|
2127
2195
|
cwd: repoRoot,
|
|
2128
2196
|
encoding: "utf8",
|
|
2129
2197
|
stdio: ["ignore", "pipe", "ignore"],
|
|
@@ -2179,7 +2247,7 @@ function changedFileDiffsSinceRemoteBase(repoRoot) {
|
|
|
2179
2247
|
}
|
|
2180
2248
|
function showBlob(repoRoot, ref, relative) {
|
|
2181
2249
|
try {
|
|
2182
|
-
return
|
|
2250
|
+
return execFileSync4("git", ["show", `${ref}:${relative}`], {
|
|
2183
2251
|
cwd: repoRoot,
|
|
2184
2252
|
encoding: "utf8",
|
|
2185
2253
|
maxBuffer: 64 * 1024 * 1024,
|
package/package.json
CHANGED
package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts
CHANGED
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
type Decision,
|
|
51
51
|
type DevReviewLoopEventInput,
|
|
52
52
|
type LoopState,
|
|
53
|
+
type NotReviewedReason,
|
|
53
54
|
type Observations,
|
|
54
55
|
type PendingRound,
|
|
55
56
|
type RoundOutcome,
|
|
@@ -251,6 +252,27 @@ function buildRoundRecord(
|
|
|
251
252
|
return { round, countsBySeverity, confidence, outcome }
|
|
252
253
|
}
|
|
253
254
|
|
|
255
|
+
/**
|
|
256
|
+
* A round that ended before any reviewer ran — its gate was not green, or a
|
|
257
|
+
* below-threshold confidence sent the developer back — has no findings from any
|
|
258
|
+
* source. Unlike `buildRoundRecord`, it records NO counts (an empty
|
|
259
|
+
* `countsBySeverity`, the shape a marker-reconstructed round also carries), so
|
|
260
|
+
* the published table reports `—` for every severity column through the
|
|
261
|
+
* renderer's existing "counts have no source" path, never a `0` a reader would
|
|
262
|
+
* take for a clean review (`countCells`, `render-summary.ts`). `outcome` is left
|
|
263
|
+
* exactly as this round would otherwise carry — the `round_ended` log event is
|
|
264
|
+
* unchanged — and `notReviewed` names why no reviewer saw it for the table's
|
|
265
|
+
* outcome cell.
|
|
266
|
+
*/
|
|
267
|
+
function buildUnreviewedRecord(
|
|
268
|
+
round: number,
|
|
269
|
+
confidence: Confidence | null,
|
|
270
|
+
outcome: RoundOutcome,
|
|
271
|
+
reason: NotReviewedReason
|
|
272
|
+
): RoundRecord {
|
|
273
|
+
return { round, countsBySeverity: {}, confidence, outcome, notReviewed: reason }
|
|
274
|
+
}
|
|
275
|
+
|
|
254
276
|
/** Folds one round's diff stats into the running totals `journal_finalized` reports — never recomputed from `rounds`. */
|
|
255
277
|
function withRoundStats(state: LoopState, stats: RoundStats): Pick<LoopState, 'totalWallMs' | 'totalFilesChanged'> {
|
|
256
278
|
return {
|
|
@@ -317,7 +339,7 @@ function assessGate(
|
|
|
317
339
|
|
|
318
340
|
if (!obs.green) {
|
|
319
341
|
events.push(roundEndedEvent(state, obs.round, obs.stats, 'changes_requested'))
|
|
320
|
-
const record =
|
|
342
|
+
const record = buildUnreviewedRecord(obs.round, null, 'changes_requested', 'checks_red')
|
|
321
343
|
const newState: LoopState = {
|
|
322
344
|
...state,
|
|
323
345
|
rounds: [...state.rounds, record],
|
|
@@ -383,7 +405,7 @@ function assessGate(
|
|
|
383
405
|
return { decision: { type: 'pause', reason: 'confidence' }, state: preFinalize, events }
|
|
384
406
|
}
|
|
385
407
|
events.push(roundEndedEvent(state, obs.round, obs.stats, 'changes_requested'))
|
|
386
|
-
const record =
|
|
408
|
+
const record = buildUnreviewedRecord(obs.round, confidence, 'changes_requested', 'low_confidence')
|
|
387
409
|
const newState: LoopState = {
|
|
388
410
|
...state,
|
|
389
411
|
rounds: [...state.rounds, record],
|
package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { SUMMARY_TABLE_HEADER } from './journal-reconstruction'
|
|
9
|
-
import { SEVERITY_COLUMNS, type Confidence, type Journal, type RoundRecord } from './types'
|
|
9
|
+
import { SEVERITY_COLUMNS, type Confidence, type Journal, type NotReviewedReason, type RoundRecord } from './types'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* The two non-numeric cells this table writes, named once so the parser below
|
|
@@ -38,14 +38,18 @@ function confidenceCell(confidence: Confidence | null): string {
|
|
|
38
38
|
*
|
|
39
39
|
* A round the loop ASSESSED records every severity column, zeros included
|
|
40
40
|
* (`buildRoundRecord`, `assess-round.ts`), so a record carrying none of them
|
|
41
|
-
* is one whose counts have no source: a round rebuilt
|
|
42
|
-
* own round markers after a restart, which name a
|
|
43
|
-
* carry no finding breakdown at all
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
41
|
+
* is one whose counts have no source. Two kinds carry none: a round rebuilt
|
|
42
|
+
* from the pull request's own round markers after a restart, which name a
|
|
43
|
+
* round's number and head and carry no finding breakdown at all
|
|
44
|
+
* (`journal-reconstruction.ts`); and a round no reviewer ever saw — its gate
|
|
45
|
+
* was red, or a low confidence sent the developer back — which records no
|
|
46
|
+
* counts on purpose (`buildUnreviewedRecord`, `assess-round.ts`) and names why
|
|
47
|
+
* in its outcome cell (`outcomeCell` below). Writing `0` for those cells told a
|
|
48
|
+
* reader the round was clean — four rounds of a real task's published table
|
|
49
|
+
* read as zero findings when the truth was that nobody knew, and an unreviewed
|
|
50
|
+
* round read as a clean review that never ran. The distinction is whether the
|
|
51
|
+
* counts were recorded, never whether they are zero: a round the loop assessed
|
|
52
|
+
* and found nothing in still reads `0`, because that zero is a measurement.
|
|
49
53
|
*/
|
|
50
54
|
function countCells(record: RoundRecord): string[] {
|
|
51
55
|
const recorded = SEVERITY_COLUMNS.some((key) => record.countsBySeverity[key] !== undefined)
|
|
@@ -53,8 +57,27 @@ function countCells(record: RoundRecord): string[] {
|
|
|
53
57
|
return SEVERITY_COLUMNS.map((key) => String(record.countsBySeverity[key] ?? 0))
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The outcome cell. A round the loop assessed (or one rebuilt from a marker)
|
|
62
|
+
* prints its own `outcome` verbatim — the vocabulary `render-summary.test.ts`
|
|
63
|
+
* pins (`green`, `changes_requested`, `escalated`, `stopped`). A round no
|
|
64
|
+
* reviewer saw (`notReviewed` set, `buildUnreviewedRecord` in
|
|
65
|
+
* `assess-round.ts`) instead states that no review ran and why, so a reader
|
|
66
|
+
* never takes its `—` counts for a clean round the way the old `0` /
|
|
67
|
+
* `changes_requested` row read.
|
|
68
|
+
*/
|
|
69
|
+
const NOT_REVIEWED_REASON_TEXT: Record<NotReviewedReason, string> = {
|
|
70
|
+
checks_red: 'checks red',
|
|
71
|
+
low_confidence: 'low confidence'
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function outcomeCell(record: RoundRecord): string {
|
|
75
|
+
if (record.notReviewed !== undefined) return `not reviewed — ${NOT_REVIEWED_REASON_TEXT[record.notReviewed]}`
|
|
76
|
+
return record.outcome
|
|
77
|
+
}
|
|
78
|
+
|
|
56
79
|
function row(record: RoundRecord): string {
|
|
57
|
-
return `| ${record.round} | ${countCells(record).join(' | ')} | ${confidenceCell(record.confidence)} | ${record
|
|
80
|
+
return `| ${record.round} | ${countCells(record).join(' | ')} | ${confidenceCell(record.confidence)} | ${outcomeCell(record)} |`
|
|
58
81
|
}
|
|
59
82
|
|
|
60
83
|
export function renderSummary(journal: Journal): string {
|
|
@@ -184,12 +184,40 @@ export type Decision =
|
|
|
184
184
|
*/
|
|
185
185
|
export type RoundOutcome = 'green' | 'changes_requested' | 'escalated' | 'stopped'
|
|
186
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Why a round ended before any reviewer ran, for the published table's outcome
|
|
189
|
+
* cell. A round no reviewer saw has no findings from any source, so it records
|
|
190
|
+
* no counts at all (an empty `countsBySeverity`, `render-summary.ts`' own `—`)
|
|
191
|
+
* rather than a zero that reads as a clean review — and this names the reason
|
|
192
|
+
* the outcome cell states instead of the log-parity `outcome` a reviewed round
|
|
193
|
+
* carries:
|
|
194
|
+
*
|
|
195
|
+
* - `'checks_red'` — the round's gate observation was not green, so reviewers
|
|
196
|
+
* were never dispatched;
|
|
197
|
+
* - `'low_confidence'` — a below-threshold confidence sent the developer back
|
|
198
|
+
* without dispatching reviewers.
|
|
199
|
+
*
|
|
200
|
+
* `outcome` stays whatever the round would otherwise carry (both reasons are
|
|
201
|
+
* `changes_requested` today), so the `round_ended` log event a reader parses is
|
|
202
|
+
* unaffected — only the summary table's rendering changes.
|
|
203
|
+
*/
|
|
204
|
+
export type NotReviewedReason = 'checks_red' | 'low_confidence'
|
|
205
|
+
|
|
187
206
|
/** One row of the published summary (`renderSummary`, O4) — counts only, no finding prose. */
|
|
188
207
|
export type RoundRecord = {
|
|
189
208
|
round: number
|
|
190
209
|
countsBySeverity: Record<string, number>
|
|
191
210
|
confidence: Confidence | null
|
|
192
211
|
outcome: RoundOutcome
|
|
212
|
+
/**
|
|
213
|
+
* Set only for a round no reviewer saw (`buildUnreviewedRecord`,
|
|
214
|
+
* `assess-round.ts`): its counts are absent (empty `countsBySeverity`) and the
|
|
215
|
+
* table's outcome cell names this reason. Absent for every round the loop
|
|
216
|
+
* assessed and for a round rebuilt from a marker — a marker-reconstructed
|
|
217
|
+
* round's counts are likewise unknown, but the round DID reach review, so it
|
|
218
|
+
* keeps its `outcome`, not a not-reviewed reason.
|
|
219
|
+
*/
|
|
220
|
+
notReviewed?: NotReviewedReason
|
|
193
221
|
}
|
|
194
222
|
|
|
195
223
|
export type Journal = { rounds: RoundRecord[] }
|
|
@@ -301,10 +301,20 @@ export function parseIssueSurface(body: string): ParsedIssueSection<IssueSurface
|
|
|
301
301
|
* — shared by O4 (does a `## Surface` `in:` glob touch a shared collision
|
|
302
302
|
* domain?) and O6 (does a `## Surface` glob contain a doc pointer?). Both
|
|
303
303
|
* sides are stripped of a trailing `/**`/`/*` and any trailing slash first.
|
|
304
|
+
*
|
|
305
|
+
* **The root glob `*` names the repository-root files.** A bare `*` covers
|
|
306
|
+
* every tracked path with no `/` (`README.md`, `LICENSE`) — and ONLY those.
|
|
307
|
+
* It never admits a nested path, so the common `in: *, out: apps` shape still
|
|
308
|
+
* excludes `apps/...`, and `*` in an `out:` list excludes only root-level
|
|
309
|
+
* files. Without this case a bare `*` covered nothing real — no legal glob
|
|
310
|
+
* admitted a repository-root file, so a Boundary pinning `README.md` could not
|
|
311
|
+
* validate and its brief rendered an empty file list. Only `*` is the
|
|
312
|
+
* root glob; `.` keeps its existing prefix behaviour unchanged.
|
|
304
313
|
*/
|
|
305
314
|
export function globCoversPath(glob: string, path: string): boolean {
|
|
306
315
|
const g = glob.replace(/\/\*\*?$/, '').replace(/\/+$/, '')
|
|
307
316
|
const p = path.replace(/\/+$/, '')
|
|
317
|
+
if (g === '*') return !p.includes('/')
|
|
308
318
|
return g === p || g.startsWith(`${p}/`) || p.startsWith(`${g}/`)
|
|
309
319
|
}
|
|
310
320
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
z1fTSBP6ZlUjObzFIp-qq
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/z1fTSBP6ZlUjObzFIp-qq/_buildManifest.js",
|
|
11
|
+
"static/z1fTSBP6ZlUjObzFIp-qq/_ssgManifest.js",
|
|
12
|
+
"static/z1fTSBP6ZlUjObzFIp-qq/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/1hklle-my0ly_.js",
|