@attalabs/vinaya 0.39.0 → 0.40.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 +9 -9
- package/aeg-root/contracts/planner-developer.md +1 -1
- package/aeg-root/enforcement.md +22 -22
- package/aeg-root/process.md +1 -1
- package/aeg-root/roles/archivist.md +1 -1
- package/aeg-root/roles/developer/reference.md +4 -1
- package/aeg-root/roles/developer.md +1 -1
- package/aeg-root/roles/planner/reference.md +18 -5
- package/aeg-root/roles/principal.md +1 -1
- package/aeg-root/roles/reviewer.md +3 -3
- package/aeg-root/roles/security.md +4 -4
- package/aeg-root/roles/tranche-archivist.md +2 -2
- package/aeg-root/skills/aeg/SKILL.md +1 -1
- package/aeg-root/state-machine.md +8 -13
- package/aeg-root/templates/brief-template.md +4 -1
- package/aeg-root/templates/decision-record-template.md +38 -0
- package/aeg-root/templates/issue-rationale-template.md +1 -1
- package/aeg-root/tranche-model.md +1 -1
- package/dist/checks/bin/check-body-bare-digits.js +1867 -347
- package/dist/checks/bin/check-branch-topology.js +1181 -237
- package/dist/checks/bin/check-brief-shape.js +1911 -433
- package/dist/checks/bin/check-changeset-coverage.js +2144 -517
- package/dist/checks/bin/check-ci-shard-coverage.js +12133 -11
- package/dist/checks/bin/check-closes-n.js +1181 -237
- package/dist/checks/bin/check-coherence.js +1785 -1126
- package/dist/checks/bin/check-dead-branch-push.js +1154 -225
- package/dist/checks/bin/check-dispatch-readiness.js +2068 -436
- package/dist/checks/bin/check-doc-claims.js +2104 -231
- package/dist/checks/bin/check-doc-coverage-push.js +2181 -515
- package/dist/checks/bin/check-doc-coverage.js +2181 -519
- package/dist/checks/bin/check-doctrine-no-procedures.js +1668 -345
- package/dist/checks/bin/check-doctrine-portability.js +2143 -516
- package/dist/checks/bin/check-evidence-fresh.js +2080 -465
- package/dist/checks/bin/check-exec-bits.js +2130 -503
- package/dist/checks/bin/check-first-push-dispatch.js +1845 -371
- package/dist/checks/bin/check-issue-assignment.js +712 -170
- package/dist/checks/bin/check-issue-milestone-attach.js +1145 -225
- package/dist/checks/bin/check-issue-objectives-numbering.js +1661 -338
- package/dist/checks/bin/check-issue-parts-coverage.js +1145 -225
- package/dist/checks/bin/check-issue-surface-globs.js +1787 -369
- package/dist/checks/bin/check-issue-title-grammar.js +1145 -225
- package/dist/checks/bin/check-issue-tranche-label.js +702 -170
- package/dist/checks/bin/check-main-branch-refusal.js +1157 -227
- package/dist/checks/bin/check-no-disk-state.js +1145 -225
- package/dist/checks/bin/check-pr-premise-reassert.js +1661 -338
- package/dist/checks/bin/check-pr-report-density.js +1145 -225
- package/dist/checks/bin/check-principal-test-plan-wait.js +2379 -249
- package/dist/checks/bin/check-quoted-command.js +2128 -501
- package/dist/checks/bin/check-reader-resolvable-prose.js +2170 -517
- package/dist/checks/bin/check-registry-gates.js +1228 -272
- package/dist/checks/bin/check-retired-vocabulary.js +2153 -507
- package/dist/checks/bin/check-review-gate.js +1932 -350
- package/dist/checks/bin/check-single-plan-pr.js +1208 -229
- package/dist/checks/bin/check-surface-scope.js +1414 -244
- package/dist/checks/bin/check-test-plan.js +2381 -252
- package/dist/checks/bin/check-token-collection-wired.js +1145 -225
- package/dist/checks/bin/check-workspace-escape.js +2141 -514
- package/dist/checks/bin/verify-coherence.js +493 -86
- package/dist/checks/bin/verify-dispatch.js +512 -132
- package/dist/checks/bin/verify-docs.js +549 -124
- package/dist/index.js +22702 -17900
- package/dist/lib/pre-push-cache-test-run.js +1026 -233
- package/dist/lib/pre-push-select-tests.js +922 -173
- package/package.json +12 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +13 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +55 -26
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +12 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +22 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +6 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/entry-point.ts +27 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +2 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +19 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +593 -55
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/narration.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +6 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/retired-vocabulary.ts +19 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +32 -13
- 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/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- 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 +1 -1
- 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]__08e39jo._.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]__0sxadt2._.js +13 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1a3j3n1._.js +57 -0
- 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]__1ug9syi._.js → [root-of-the-server]__1wzfiav._.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/{06_55xbp7rcbi.js → 1p3vr9qts86_b.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2brkwv169ygep.js → 21tunzmxjvm2a.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{33rszkngkuoko.js → 38kom-9c-oi65.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__04adkz-._.js +0 -57
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__19jyp3m._.js +0 -13
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → Y3oaZSTSP9PivUuJvxK1W}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → Y3oaZSTSP9PivUuJvxK1W}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → Y3oaZSTSP9PivUuJvxK1W}/_ssgManifest.js +0 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
// ../../packages/aeg-core/bin/verify-dispatch.ts
|
|
5
5
|
import { execFile as execFile4, execFileSync as execFileSync2, spawnSync } from "child_process";
|
|
6
|
-
import { existsSync, readFileSync as
|
|
7
|
-
import { join } from "path";
|
|
6
|
+
import { existsSync, readFileSync as readFileSync3 } from "fs";
|
|
7
|
+
import { join as join2 } from "path";
|
|
8
8
|
import { promisify as promisify4 } from "util";
|
|
9
9
|
|
|
10
10
|
// ../../packages/aeg-forge-state/src/parse-rationale-deps.ts
|
|
@@ -730,25 +730,6 @@ function trancheSlugsFromLabels(labels) {
|
|
|
730
730
|
}
|
|
731
731
|
return slugs;
|
|
732
732
|
}
|
|
733
|
-
function listActiveTrancheSlugs(owner, repo) {
|
|
734
|
-
const milestones = ghApiGet(`repos/${owner}/${repo}/milestones?state=all&per_page=100`);
|
|
735
|
-
const labels = ghApiGet(`repos/${owner}/${repo}/labels?per_page=100`);
|
|
736
|
-
const slugs = new Set([...slugShapedTitles(milestones), ...trancheSlugsFromLabels(labels)]);
|
|
737
|
-
const active = [];
|
|
738
|
-
for (const slug of slugs) {
|
|
739
|
-
const legacy = matchesLegacyMilestone(milestones, slug);
|
|
740
|
-
const issues = ghIssueListByLabel(owner, repo, trancheLabel(slug));
|
|
741
|
-
if (legacy) {
|
|
742
|
-
const facts = resolveLegacyFacts(legacy, issues);
|
|
743
|
-
if (facts.lifecycle === "active")
|
|
744
|
-
active.push({ slug, goal: facts.goal });
|
|
745
|
-
continue;
|
|
746
|
-
}
|
|
747
|
-
if (lifecycleFromIssues(issues) === "active")
|
|
748
|
-
active.push({ slug, goal: goalFromMilestones(milestones, slug) });
|
|
749
|
-
}
|
|
750
|
-
return active;
|
|
751
|
-
}
|
|
752
733
|
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
753
734
|
const [milestones, labels] = await Promise.all([
|
|
754
735
|
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
@@ -1812,6 +1793,84 @@ function describeError(err) {
|
|
|
1812
1793
|
return err;
|
|
1813
1794
|
return "unknown error";
|
|
1814
1795
|
}
|
|
1796
|
+
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
1797
|
+
function defaultPriorTrancheArchivalDeps() {
|
|
1798
|
+
let facts = new Map;
|
|
1799
|
+
return {
|
|
1800
|
+
activeTrancheSlugs: async (excludeSlug, repo) => {
|
|
1801
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
1802
|
+
facts = index.facts;
|
|
1803
|
+
return index.active.map((m) => m.slug).filter((slug) => slug !== excludeSlug);
|
|
1804
|
+
},
|
|
1805
|
+
deriveTranche: (slug, repo) => deriveTrancheFromForge(repo.owner, repo.repo, slug, facts.get(slug)),
|
|
1806
|
+
openIssues: async (slug, repo) => (await fetchTrancheIssuesAsync(repo.owner, repo.repo, slug)).filter((issue) => issue.state === "OPEN").map((issue) => ({ number: issue.number }))
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
function reason(err) {
|
|
1810
|
+
return err instanceof Error ? err.message.split(`
|
|
1811
|
+
`)[0] ?? "failed" : String(err);
|
|
1812
|
+
}
|
|
1813
|
+
async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = defaultPriorTrancheArchivalDeps()) {
|
|
1814
|
+
if (projects.length === 0)
|
|
1815
|
+
return { facts: [], infraFailure: null };
|
|
1816
|
+
let candidates;
|
|
1817
|
+
try {
|
|
1818
|
+
candidates = await deps.activeTrancheSlugs(excludeSlug, repo);
|
|
1819
|
+
} catch (err) {
|
|
1820
|
+
return {
|
|
1821
|
+
facts: [],
|
|
1822
|
+
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
const facts = [];
|
|
1826
|
+
const unreadable = [];
|
|
1827
|
+
const derived = new Map;
|
|
1828
|
+
const derive = (slug) => {
|
|
1829
|
+
let p = derived.get(slug);
|
|
1830
|
+
if (!p) {
|
|
1831
|
+
p = deps.deriveTranche(slug, repo);
|
|
1832
|
+
derived.set(slug, p);
|
|
1833
|
+
}
|
|
1834
|
+
return p;
|
|
1835
|
+
};
|
|
1836
|
+
for (const project of projects) {
|
|
1837
|
+
let found = null;
|
|
1838
|
+
let unknown = false;
|
|
1839
|
+
for (const slug of candidates) {
|
|
1840
|
+
let candidateTranche;
|
|
1841
|
+
try {
|
|
1842
|
+
candidateTranche = await derive(slug);
|
|
1843
|
+
} catch {
|
|
1844
|
+
unknown = true;
|
|
1845
|
+
unreadable.push(`the tasks of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1846
|
+
break;
|
|
1847
|
+
}
|
|
1848
|
+
if (!candidateTranche.tasks.some((t) => t.projects.includes(project)))
|
|
1849
|
+
continue;
|
|
1850
|
+
let openIssues;
|
|
1851
|
+
try {
|
|
1852
|
+
openIssues = await deps.openIssues(slug, repo);
|
|
1853
|
+
} catch {
|
|
1854
|
+
openIssues = null;
|
|
1855
|
+
}
|
|
1856
|
+
if (openIssues === null) {
|
|
1857
|
+
unknown = true;
|
|
1858
|
+
unreadable.push(`the open Issues of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
if (openIssues.length === 0) {
|
|
1862
|
+
found = { project, priorTrancheSlug: slug, archived: false };
|
|
1863
|
+
break;
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
if (!unknown)
|
|
1867
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1868
|
+
}
|
|
1869
|
+
return {
|
|
1870
|
+
facts,
|
|
1871
|
+
infraFailure: unreadable.length === 0 ? null : `severity:infra — could not read ${unreadable.join(", ")}; whether a prior tranche is archived is unknown.`
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1815
1874
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
1816
1875
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
1817
1876
|
const result = new Map;
|
|
@@ -2250,7 +2309,6 @@ var DERIVABLE_STATUSES = DERIVED_STATUSES.filter((s) => s !== "backlog");
|
|
|
2250
2309
|
// ../../packages/aeg-core/src/waiver-label.ts
|
|
2251
2310
|
var WAIVER_LABEL = label("waiver-docs");
|
|
2252
2311
|
var WAIVER_LABEL_REVIEW = label("waiver-review");
|
|
2253
|
-
var PRINCIPAL_ALLOWLIST = ["daniboomerang"];
|
|
2254
2312
|
function isPrincipal(login, principalAllowlist) {
|
|
2255
2313
|
if (login === null)
|
|
2256
2314
|
return false;
|
|
@@ -2787,8 +2845,362 @@ var NON_PATH_TOP_SEGMENTS = new Set(["origin", "refs", "HEAD", "vinaya", "fix"])
|
|
|
2787
2845
|
|
|
2788
2846
|
// ../../packages/aeg-core/src/doctrine-no-procedures.ts
|
|
2789
2847
|
var SHELL_LANGS = new Set(["", "sh", "bash", "shell", "console"]);
|
|
2848
|
+
// ../../packages/aeg-core/src/prose-rules.ts
|
|
2849
|
+
var RETIRED_GLOBAL_EXEMPTIONS = [
|
|
2850
|
+
"docs/decisions-legacy.md",
|
|
2851
|
+
"apps/herald-ai/docs/",
|
|
2852
|
+
"apps/vada-ai/docs/",
|
|
2853
|
+
"aeg-root/tranches/completed/",
|
|
2854
|
+
"packages/aeg-core/src/docs/published-prose",
|
|
2855
|
+
"packages/aeg-core/src/retired-vocabulary.test.ts",
|
|
2856
|
+
"packages/aeg-core/src/retired-vocabulary.ts",
|
|
2857
|
+
"/fixtures/",
|
|
2858
|
+
"/node_modules/",
|
|
2859
|
+
"/.next/",
|
|
2860
|
+
"/.turbo/"
|
|
2861
|
+
];
|
|
2862
|
+
var PLAN_ON_DISK_PATTERNS = ["[Tt]opology files?", "aeg-root/tranches/", "aeg-project/"];
|
|
2863
|
+
var TRANCHE_MODEL_FILE = "/tranche-model.md";
|
|
2864
|
+
var RETIRED_PATTERN_EXEMPTIONS = {
|
|
2865
|
+
[String.raw`\bD-[0-9]{3}\b`]: ["./CLAUDE.md"],
|
|
2866
|
+
[String.raw`(^|[^-_a-zA-Z0-9])decisions\.md`]: [
|
|
2867
|
+
"docs-index.md",
|
|
2868
|
+
"apps/vada-ai/specs/legacy/README.md",
|
|
2869
|
+
"apps/vada-ai/specs/vada-product-spec.md",
|
|
2870
|
+
"apps/vada-ai/web/CLAUDE.md",
|
|
2871
|
+
"apps/vada-ai/CLAUDE.md"
|
|
2872
|
+
],
|
|
2873
|
+
"decisions-legacy": [
|
|
2874
|
+
"packages/aeg-core/src/file-classify.ts",
|
|
2875
|
+
"packages/aeg-core/src/file-classify.test.ts",
|
|
2876
|
+
"packages/aeg-core/src/pr-tier.test.ts",
|
|
2877
|
+
"docs-index.md",
|
|
2878
|
+
".claude/skills/database/SKILL.md",
|
|
2879
|
+
".claude/skills/vada-architecture/SKILL.md",
|
|
2880
|
+
"apps/vada-ai/specs/vada-byok-principles.md",
|
|
2881
|
+
"apps/vada-ai/web/CLAUDE.md",
|
|
2882
|
+
"apps/vada-ai/CLAUDE.md"
|
|
2883
|
+
],
|
|
2884
|
+
CONTRADICTION: ["apps/vada-ai/specs/vada-reviewers-spec.md"],
|
|
2885
|
+
...Object.fromEntries(PLAN_ON_DISK_PATTERNS.map((pattern) => [pattern, [TRANCHE_MODEL_FILE]]))
|
|
2886
|
+
};
|
|
2887
|
+
var retiredPatterns = [
|
|
2888
|
+
String.raw`\bD-[0-9]{3}\b`,
|
|
2889
|
+
"D-(###|NNN|nnn|xxx)",
|
|
2890
|
+
"decision (entry|logged)",
|
|
2891
|
+
"decision-log entry",
|
|
2892
|
+
"decision log entry",
|
|
2893
|
+
"decision log(s|ged|ging)?([^a-z]|$)",
|
|
2894
|
+
"decision-log",
|
|
2895
|
+
"decision entr",
|
|
2896
|
+
"decisions? (are |is )?logged",
|
|
2897
|
+
"log entries",
|
|
2898
|
+
String.raw`(^|[^-_a-zA-Z0-9])decisions\.md`,
|
|
2899
|
+
"decisions-legacy",
|
|
2900
|
+
"CONTRADICTION",
|
|
2901
|
+
"assumes Tier 3",
|
|
2902
|
+
"Lock: ?YES",
|
|
2903
|
+
"Lock: ?NO",
|
|
2904
|
+
"lock approvals?",
|
|
2905
|
+
"approves locks",
|
|
2906
|
+
"Conforms to lock",
|
|
2907
|
+
"Challenges lock",
|
|
2908
|
+
"checkDecisionNumbersFresh",
|
|
2909
|
+
String.raw`roles/team-leader\.md`,
|
|
2910
|
+
String.raw`\(,`,
|
|
2911
|
+
String.raw`,\)`,
|
|
2912
|
+
String.raw`\(\.\)`,
|
|
2913
|
+
...PLAN_ON_DISK_PATTERNS
|
|
2914
|
+
];
|
|
2915
|
+
var published = [
|
|
2916
|
+
["decision-id", "a decision id", /\bD-\d{3,}\b/],
|
|
2917
|
+
["section-ref", "a section reference", /§/],
|
|
2918
|
+
["forge-number", "a forge number", /#\d+/],
|
|
2919
|
+
["retired-name", "the retired public name", /\bAEG\b/],
|
|
2920
|
+
["tranche-slug", "a tranche slug", /\b[a-z][a-z0-9]*(?:-[a-z0-9]+)+-v\d+\b/],
|
|
2921
|
+
[
|
|
2922
|
+
"label-vocabulary",
|
|
2923
|
+
"forge label vocabulary",
|
|
2924
|
+
/(?:vinaya\/)?\b(?:tranche|iteration|tier|needs|waiver|project|aeg):(?![/\s]|$)/
|
|
2925
|
+
],
|
|
2926
|
+
["internal-path", "a repo-internal path", /\b(?:packages|apps|aeg-root|tools|scripts)\//],
|
|
2927
|
+
["internal-path", "a repo-internal path", /\.(?:claude|husky|github)\//],
|
|
2928
|
+
[
|
|
2929
|
+
"internal-path",
|
|
2930
|
+
"a repo-internal file",
|
|
2931
|
+
/(?:^|[\s(`"'[])[\w.-]+(?:\/[\w.-]+)*\.(?:ts|tsx|js|jsx|mjs|cjs|sh|ya?ml|json|md)\b/
|
|
2932
|
+
]
|
|
2933
|
+
];
|
|
2934
|
+
var DEFAULT_PROSE_RULES = [
|
|
2935
|
+
{
|
|
2936
|
+
id: "forge-number",
|
|
2937
|
+
group: "reader-resolvable",
|
|
2938
|
+
scopes: ["ships", "reader-facing", "spec"],
|
|
2939
|
+
patterns: { prose: /#[0-9]{2,4}/g },
|
|
2940
|
+
flags: ["global"],
|
|
2941
|
+
message: "a forge number",
|
|
2942
|
+
severity: { ships: "warning", "reader-facing": "warning", spec: "error" },
|
|
2943
|
+
exemptions: []
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
id: "tranche-slug",
|
|
2947
|
+
group: "reader-resolvable",
|
|
2948
|
+
scopes: ["ships", "reader-facing", "product", "spec"],
|
|
2949
|
+
patterns: { prose: /[a-z][a-z-]+-v[0-9]/g },
|
|
2950
|
+
flags: ["global"],
|
|
2951
|
+
message: "an internal tranche slug",
|
|
2952
|
+
severity: { ships: "warning", "reader-facing": "warning", product: "error", spec: "error" },
|
|
2953
|
+
exemptions: []
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
id: "task-number",
|
|
2957
|
+
group: "reader-resolvable",
|
|
2958
|
+
scopes: ["spec"],
|
|
2959
|
+
patterns: { prose: /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi },
|
|
2960
|
+
flags: ["global", "ignore-case"],
|
|
2961
|
+
message: "a task number",
|
|
2962
|
+
severity: { spec: "error" },
|
|
2963
|
+
exemptions: []
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
id: "source-comment-tranche-slug",
|
|
2967
|
+
group: "reader-resolvable",
|
|
2968
|
+
scopes: ["source-comment"],
|
|
2969
|
+
patterns: { comment: /[a-z0-9]+(?:-[a-z0-9]+)*-v[0-9]+/g },
|
|
2970
|
+
flags: ["global"],
|
|
2971
|
+
message: "a tranche-slug citation",
|
|
2972
|
+
severity: { "source-comment": "warning" },
|
|
2973
|
+
exemptions: []
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
id: "source-comment-forge-number",
|
|
2977
|
+
group: "reader-resolvable",
|
|
2978
|
+
scopes: ["source-comment"],
|
|
2979
|
+
patterns: { comment: /#[0-9]{2,}/g },
|
|
2980
|
+
flags: ["global"],
|
|
2981
|
+
message: "a forge-number citation",
|
|
2982
|
+
severity: { "source-comment": "warning" },
|
|
2983
|
+
exemptions: []
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
id: "legacy-batch-name",
|
|
2987
|
+
group: "reader-resolvable",
|
|
2988
|
+
scopes: ["ships", "reader-facing", "spec"],
|
|
2989
|
+
patterns: {},
|
|
2990
|
+
flags: ["built-in"],
|
|
2991
|
+
message: "an internal tranche slug",
|
|
2992
|
+
severity: { ships: "warning", "reader-facing": "warning", spec: "error" },
|
|
2993
|
+
exemptions: [],
|
|
2994
|
+
builtIn: true
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
id: "coined-term",
|
|
2998
|
+
group: "reader-resolvable",
|
|
2999
|
+
scopes: ["ships", "reader-facing"],
|
|
3000
|
+
patterns: {},
|
|
3001
|
+
flags: ["built-in"],
|
|
3002
|
+
message: "uses coined term without defining it inline or linking the glossary",
|
|
3003
|
+
severity: { ships: "warning", "reader-facing": "warning" },
|
|
3004
|
+
exemptions: [],
|
|
3005
|
+
builtIn: true
|
|
3006
|
+
},
|
|
3007
|
+
...retiredPatterns.map((pattern, index) => ({
|
|
3008
|
+
id: `retired-vocabulary-${index + 1}`,
|
|
3009
|
+
group: "retired-vocabulary",
|
|
3010
|
+
scopes: ["repository"],
|
|
3011
|
+
patterns: { repository: pattern },
|
|
3012
|
+
flags: [],
|
|
3013
|
+
message: "retired vocabulary",
|
|
3014
|
+
severity: { repository: "error" },
|
|
3015
|
+
exemptions: RETIRED_GLOBAL_EXEMPTIONS,
|
|
3016
|
+
patternExemptions: RETIRED_PATTERN_EXEMPTIONS
|
|
3017
|
+
})),
|
|
3018
|
+
...published.map(([id, message, pattern]) => ({
|
|
3019
|
+
id,
|
|
3020
|
+
group: "published-prose",
|
|
3021
|
+
scopes: ["published"],
|
|
3022
|
+
patterns: { published: pattern },
|
|
3023
|
+
flags: [],
|
|
3024
|
+
message,
|
|
3025
|
+
severity: { published: "error" },
|
|
3026
|
+
exemptions: [".worktrees/task/<tranche>/<n>", "task/<tranche>/<n>", ".worktrees/"]
|
|
3027
|
+
}))
|
|
3028
|
+
];
|
|
3029
|
+
var rulesForGroup = (group) => DEFAULT_PROSE_RULES.filter((rule) => rule.group === group);
|
|
3030
|
+
var RESOLVABLE_SCOPES = ["ships", "reader-facing", "product", "spec", "source-comment"];
|
|
3031
|
+
var RETIRED_SCOPES = ["repository"];
|
|
3032
|
+
var CONFIGURABLE_PROSE_SCOPES = [...RESOLVABLE_SCOPES, ...RETIRED_SCOPES];
|
|
3033
|
+
function groupOfScope(scope) {
|
|
3034
|
+
if (RESOLVABLE_SCOPES.includes(scope))
|
|
3035
|
+
return "reader-resolvable";
|
|
3036
|
+
if (RETIRED_SCOPES.includes(scope))
|
|
3037
|
+
return "retired-vocabulary";
|
|
3038
|
+
return;
|
|
3039
|
+
}
|
|
3040
|
+
var CONFIGURABLE_DEFAULT_RULES = DEFAULT_PROSE_RULES.filter((rule) => rule.group !== "published-prose");
|
|
3041
|
+
function normalizeRepoPath(entry) {
|
|
3042
|
+
let out = entry.replace(/\\/g, "/");
|
|
3043
|
+
while (out.startsWith("./"))
|
|
3044
|
+
out = out.slice(2);
|
|
3045
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
3046
|
+
while (out.endsWith("/"))
|
|
3047
|
+
out = out.slice(0, -1);
|
|
3048
|
+
return out;
|
|
3049
|
+
}
|
|
3050
|
+
var RESOLVABLE_RUN_ORDER = [
|
|
3051
|
+
"forge-number",
|
|
3052
|
+
"tranche-slug",
|
|
3053
|
+
"legacy-batch-name",
|
|
3054
|
+
"task-number",
|
|
3055
|
+
"source-comment-tranche-slug",
|
|
3056
|
+
"source-comment-forge-number",
|
|
3057
|
+
"coined-term"
|
|
3058
|
+
];
|
|
3059
|
+
var REPORT_GROUPS = { "task-number": 2, "legacy-batch-name": 2 };
|
|
3060
|
+
function scopeDefaultSeverity(scope, sourceCommentSeverity) {
|
|
3061
|
+
if (scope === "source-comment")
|
|
3062
|
+
return sourceCommentSeverity ?? "warning";
|
|
3063
|
+
if (scope === "repository")
|
|
3064
|
+
return "error";
|
|
3065
|
+
return "warning";
|
|
3066
|
+
}
|
|
3067
|
+
function applySeverity(scopes, base, setting) {
|
|
3068
|
+
const out = {};
|
|
3069
|
+
for (const scope of scopes) {
|
|
3070
|
+
const configured = typeof setting === "string" ? setting : setting?.[scope];
|
|
3071
|
+
const value = configured ?? base[scope];
|
|
3072
|
+
if (value !== undefined)
|
|
3073
|
+
out[scope] = value;
|
|
3074
|
+
}
|
|
3075
|
+
return out;
|
|
3076
|
+
}
|
|
3077
|
+
function defaultPatternFor(rule) {
|
|
3078
|
+
const cache = new Map;
|
|
3079
|
+
return (scope) => {
|
|
3080
|
+
if (cache.has(scope))
|
|
3081
|
+
return cache.get(scope) ?? null;
|
|
3082
|
+
const own = rule.patterns[scope] ?? (scope === "source-comment" ? rule.patterns.comment : rule.patterns.prose) ?? Object.values(rule.patterns)[0];
|
|
3083
|
+
const compiled = own === undefined ? null : own instanceof RegExp ? own : new RegExp(own);
|
|
3084
|
+
cache.set(scope, compiled);
|
|
3085
|
+
return compiled;
|
|
3086
|
+
};
|
|
3087
|
+
}
|
|
3088
|
+
function customPatternFor(rule, global) {
|
|
3089
|
+
const cache = new Map;
|
|
3090
|
+
return (scope) => {
|
|
3091
|
+
if (cache.has(scope))
|
|
3092
|
+
return cache.get(scope) ?? null;
|
|
3093
|
+
const source = rule.patterns?.[scope] ?? rule.pattern;
|
|
3094
|
+
const compiled = source === undefined ? null : new RegExp(source, `${rule.flags ?? ""}${global ? "g" : ""}`);
|
|
3095
|
+
cache.set(scope, compiled);
|
|
3096
|
+
return compiled;
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
function resolveProseRules(config = undefined, options = {}) {
|
|
3100
|
+
const rules = [];
|
|
3101
|
+
const defaults = config?.defaults ?? {};
|
|
3102
|
+
for (const rule of CONFIGURABLE_DEFAULT_RULES) {
|
|
3103
|
+
const override = defaults[rule.id];
|
|
3104
|
+
if (override === "off")
|
|
3105
|
+
continue;
|
|
3106
|
+
const group = rule.group;
|
|
3107
|
+
const scopes = override?.scopes ?? rule.scopes;
|
|
3108
|
+
const base = {};
|
|
3109
|
+
for (const scope of scopes) {
|
|
3110
|
+
base[scope] = scope === "source-comment" ? options.sourceCommentSeverity ?? rule.severity[scope] ?? "warning" : rule.severity[scope] ?? scopeDefaultSeverity(scope, options.sourceCommentSeverity);
|
|
3111
|
+
}
|
|
3112
|
+
rules.push({
|
|
3113
|
+
id: rule.id,
|
|
3114
|
+
group,
|
|
3115
|
+
custom: false,
|
|
3116
|
+
builtIn: rule.builtIn === true,
|
|
3117
|
+
scopes,
|
|
3118
|
+
message: rule.message,
|
|
3119
|
+
severity: applySeverity(scopes, base, override?.severity),
|
|
3120
|
+
exempt: override?.exempt ?? [],
|
|
3121
|
+
substringExempt: rule.exemptions,
|
|
3122
|
+
reportGroup: REPORT_GROUPS[rule.id],
|
|
3123
|
+
patternFor: defaultPatternFor(rule)
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
for (const rule of config?.custom ?? []) {
|
|
3127
|
+
const group = groupOfScope(rule.scopes[0] ?? "") ?? "reader-resolvable";
|
|
3128
|
+
const base = {};
|
|
3129
|
+
for (const scope of rule.scopes)
|
|
3130
|
+
base[scope] = scopeDefaultSeverity(scope, options.sourceCommentSeverity);
|
|
3131
|
+
rules.push({
|
|
3132
|
+
id: rule.id,
|
|
3133
|
+
group,
|
|
3134
|
+
custom: true,
|
|
3135
|
+
builtIn: false,
|
|
3136
|
+
scopes: rule.scopes,
|
|
3137
|
+
message: rule.means,
|
|
3138
|
+
severity: applySeverity(rule.scopes, base, rule.severity),
|
|
3139
|
+
exempt: rule.exempt ?? [],
|
|
3140
|
+
substringExempt: [],
|
|
3141
|
+
patternFor: customPatternFor(rule, group === "reader-resolvable")
|
|
3142
|
+
});
|
|
3143
|
+
}
|
|
3144
|
+
if (options.decisionRecordsPath !== undefined)
|
|
3145
|
+
rules.push(decisionRecordCitationRule(options.decisionRecordsPath));
|
|
3146
|
+
const order = (rule) => {
|
|
3147
|
+
const at = RESOLVABLE_RUN_ORDER.indexOf(rule.id);
|
|
3148
|
+
return rule.custom || at === -1 ? RESOLVABLE_RUN_ORDER.length : at;
|
|
3149
|
+
};
|
|
3150
|
+
const resolvable = rules.filter((rule) => rule.group === "reader-resolvable");
|
|
3151
|
+
const sorted = resolvable.map((rule, index) => ({ rule, index })).sort((a, b) => order(a.rule) - order(b.rule) || a.index - b.index).map(({ rule }) => rule);
|
|
3152
|
+
return {
|
|
3153
|
+
rules: [...sorted, ...rules.filter((rule) => rule.group === "retired-vocabulary")],
|
|
3154
|
+
exempt: config?.exempt ?? [],
|
|
3155
|
+
repoRoot: options.repoRoot
|
|
3156
|
+
};
|
|
3157
|
+
}
|
|
3158
|
+
var DEFAULT_PROSE_RULE_SET = resolveProseRules();
|
|
3159
|
+
var DECISION_RECORD_CITATION_ID = "decision-record-citation";
|
|
3160
|
+
var DECISION_RECORD_CITATION_SCOPES = ["ships", "product", "spec", "source-comment"];
|
|
3161
|
+
var DECISION_RECORD_CITATION_MESSAGE = "a decision-record number";
|
|
3162
|
+
function escapeRegExp(text) {
|
|
3163
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3164
|
+
}
|
|
3165
|
+
function decisionRecordCitationPattern(decisionRecordsPath) {
|
|
3166
|
+
const folder = escapeRegExp(normalizeRepoPath(decisionRecordsPath));
|
|
3167
|
+
return new RegExp(String.raw`\bADR[- ]?[0-9]+\b|(?<![A-Za-z0-9_-])${folder}/[0-9]+[A-Za-z0-9._-]*`, "g");
|
|
3168
|
+
}
|
|
3169
|
+
function decisionRecordCitationRule(decisionRecordsPath) {
|
|
3170
|
+
const folder = normalizeRepoPath(decisionRecordsPath);
|
|
3171
|
+
const pattern = decisionRecordCitationPattern(folder);
|
|
3172
|
+
const severity = {};
|
|
3173
|
+
for (const scope of DECISION_RECORD_CITATION_SCOPES)
|
|
3174
|
+
severity[scope] = "error";
|
|
3175
|
+
return {
|
|
3176
|
+
id: DECISION_RECORD_CITATION_ID,
|
|
3177
|
+
group: "reader-resolvable",
|
|
3178
|
+
custom: false,
|
|
3179
|
+
builtIn: false,
|
|
3180
|
+
scopes: DECISION_RECORD_CITATION_SCOPES,
|
|
3181
|
+
message: DECISION_RECORD_CITATION_MESSAGE,
|
|
3182
|
+
severity,
|
|
3183
|
+
exempt: [folder],
|
|
3184
|
+
substringExempt: [],
|
|
3185
|
+
patternFor: () => pattern
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
|
|
2790
3189
|
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
2791
3190
|
var SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
3191
|
+
var readerRules = rulesForGroup("reader-resolvable");
|
|
3192
|
+
var readerPattern = (id, scope = "prose") => {
|
|
3193
|
+
const pattern = readerRules.find((rule) => rule.id === id)?.patterns[scope];
|
|
3194
|
+
if (!(pattern instanceof RegExp))
|
|
3195
|
+
throw new Error(`default prose rule ${id} has no ${scope} pattern`);
|
|
3196
|
+
return pattern;
|
|
3197
|
+
};
|
|
3198
|
+
var FORGE_NUMBER_PATTERN = readerPattern("forge-number");
|
|
3199
|
+
var TRANCHE_SLUG_VN_PATTERN = readerPattern("tranche-slug");
|
|
3200
|
+
var TASK_NUMBER_PATTERN = readerPattern("task-number");
|
|
3201
|
+
var REFERENCE_CLASSES = new Set(["ships", "reader-facing", "product", "spec"]);
|
|
3202
|
+
var SOURCE_COMMENT_TRANCHE_SLUG_PATTERN = readerPattern("source-comment-tranche-slug", "comment");
|
|
3203
|
+
var SOURCE_COMMENT_FORGE_NUMBER_PATTERN = readerPattern("source-comment-forge-number", "comment");
|
|
2792
3204
|
|
|
2793
3205
|
// ../../packages/aeg-core/src/quoted-command.ts
|
|
2794
3206
|
var QUOTED_COMMAND_SWEPT_CLASSES = new Set(["ships", "reader-facing"]);
|
|
@@ -3273,7 +3685,7 @@ function isGrandfathered(isoDate) {
|
|
|
3273
3685
|
return isoDate.slice(0, 10) < COHERENCE_ENFORCED_FROM;
|
|
3274
3686
|
}
|
|
3275
3687
|
var R1_GRANDFATHERED_ISSUES = new Set([279, 280, 281, 282]);
|
|
3276
|
-
function checkA1(entries, principalAllowlist
|
|
3688
|
+
function checkA1(entries, principalAllowlist) {
|
|
3277
3689
|
const failures = [];
|
|
3278
3690
|
for (const e of entries) {
|
|
3279
3691
|
if (!e.facts)
|
|
@@ -4201,59 +4613,9 @@ function compareToBaseline(current, baseline) {
|
|
|
4201
4613
|
};
|
|
4202
4614
|
}
|
|
4203
4615
|
// ../../packages/aeg-core/src/retired-vocabulary.ts
|
|
4204
|
-
var
|
|
4205
|
-
var RETIRED_PATTERNS =
|
|
4206
|
-
|
|
4207
|
-
"D-(###|NNN|nnn|xxx)",
|
|
4208
|
-
"decision (entry|logged)",
|
|
4209
|
-
"decision-log entry",
|
|
4210
|
-
"decision log entry",
|
|
4211
|
-
"decision log(s|ged|ging)?([^a-z]|$)",
|
|
4212
|
-
"decision-log",
|
|
4213
|
-
"decision entr",
|
|
4214
|
-
"decisions? (are |is )?logged",
|
|
4215
|
-
"log entries",
|
|
4216
|
-
String.raw`decisions\.md`,
|
|
4217
|
-
"decisions-legacy",
|
|
4218
|
-
"CONTRADICTION",
|
|
4219
|
-
"assumes Tier 3",
|
|
4220
|
-
"Lock: ?YES",
|
|
4221
|
-
"Lock: ?NO",
|
|
4222
|
-
"lock approvals?",
|
|
4223
|
-
"approves locks",
|
|
4224
|
-
"Conforms to lock",
|
|
4225
|
-
"Challenges lock",
|
|
4226
|
-
"checkDecisionNumbersFresh",
|
|
4227
|
-
String.raw`roles/team-leader\.md`,
|
|
4228
|
-
String.raw`\(,`,
|
|
4229
|
-
String.raw`,\)`,
|
|
4230
|
-
String.raw`\(\.\)`,
|
|
4231
|
-
...PLAN_ON_DISK_PATTERNS
|
|
4232
|
-
];
|
|
4233
|
-
var TRANCHE_MODEL_FILE = "/tranche-model.md";
|
|
4234
|
-
var PATTERN_EXEMPT = {
|
|
4235
|
-
[String.raw`\bD-[0-9]{3}\b`]: ["./CLAUDE.md"],
|
|
4236
|
-
[String.raw`decisions\.md`]: [
|
|
4237
|
-
"docs-index.md",
|
|
4238
|
-
"apps/vada-ai/specs/legacy/README.md",
|
|
4239
|
-
"apps/vada-ai/specs/vada-product-spec.md",
|
|
4240
|
-
"apps/vada-ai/web/CLAUDE.md",
|
|
4241
|
-
"apps/vada-ai/CLAUDE.md"
|
|
4242
|
-
],
|
|
4243
|
-
"decisions-legacy": [
|
|
4244
|
-
"packages/aeg-core/src/file-classify.ts",
|
|
4245
|
-
"packages/aeg-core/src/file-classify.test.ts",
|
|
4246
|
-
"packages/aeg-core/src/pr-tier.test.ts",
|
|
4247
|
-
"docs-index.md",
|
|
4248
|
-
".claude/skills/database/SKILL.md",
|
|
4249
|
-
".claude/skills/vada-architecture/SKILL.md",
|
|
4250
|
-
"apps/vada-ai/specs/vada-byok-principles.md",
|
|
4251
|
-
"apps/vada-ai/web/CLAUDE.md",
|
|
4252
|
-
"apps/vada-ai/CLAUDE.md"
|
|
4253
|
-
],
|
|
4254
|
-
CONTRADICTION: ["apps/vada-ai/specs/vada-reviewers-spec.md"],
|
|
4255
|
-
...Object.fromEntries(PLAN_ON_DISK_PATTERNS.map((pattern) => [pattern, [TRANCHE_MODEL_FILE]]))
|
|
4256
|
-
};
|
|
4616
|
+
var retiredRules = rulesForGroup("retired-vocabulary");
|
|
4617
|
+
var RETIRED_PATTERNS = retiredRules.map((rule) => rule.patterns.repository);
|
|
4618
|
+
var DEFAULT_PATTERN_OF = new Map(retiredRules.map((rule) => [rule.id, rule.patterns.repository]));
|
|
4257
4619
|
// ../../packages/aeg-core/src/dispatch-gate.ts
|
|
4258
4620
|
function isHandClosedByRecognizedPrincipal(dep, principalAllowlist) {
|
|
4259
4621
|
return dep.issueState === "closed" && dep.stateReason === "completed" && isPrincipal(dep.closedByActor ?? null, principalAllowlist);
|
|
@@ -4267,7 +4629,7 @@ function isSelfDependency(dep, task, issue) {
|
|
|
4267
4629
|
function checkDispatchReadiness(input) {
|
|
4268
4630
|
const { trancheSlug, task } = input;
|
|
4269
4631
|
const taskLabel = `task ${task.id} (tranche ${trancheSlug})`;
|
|
4270
|
-
const principalAllowlist = input
|
|
4632
|
+
const { principalAllowlist } = input;
|
|
4271
4633
|
const blockerDetails = [];
|
|
4272
4634
|
const push = (blockerClass, message) => {
|
|
4273
4635
|
blockerDetails.push({ class: blockerClass, message });
|
|
@@ -4594,9 +4956,11 @@ var LineageSchema = z3.object({
|
|
|
4594
4956
|
parent: z3.string().nullable()
|
|
4595
4957
|
}).strict();
|
|
4596
4958
|
var InputVersionsSchema = z3.object({
|
|
4959
|
+
manifest_version: z3.literal(2).nullable().optional(),
|
|
4597
4960
|
objectives_version: z3.string().nullable(),
|
|
4598
4961
|
brief_hash: z3.string().nullable(),
|
|
4599
4962
|
ruling_ordinal: z3.number().int().nullable(),
|
|
4963
|
+
pause_bound_ruling: z3.object({ rulingId: z3.string().min(1), pauseId: z3.string().min(1), contentDigest: z3.string().min(1) }).strict().nullable().optional(),
|
|
4600
4964
|
policy_digest: z3.string().nullable()
|
|
4601
4965
|
}).strict();
|
|
4602
4966
|
var ProvenanceSchema = z3.enum(["parent_attributed", "env_correlated", "self_reported", "unavailable"]);
|
|
@@ -5128,6 +5492,12 @@ var ManifestRecordSchema = z4.object({
|
|
|
5128
5492
|
briefHash: z4.string().min(1).nullable(),
|
|
5129
5493
|
objectivesVersion: z4.string().min(1).nullable(),
|
|
5130
5494
|
rulingOrdinal: epochNumber,
|
|
5495
|
+
manifestVersion: z4.literal(2).optional(),
|
|
5496
|
+
pauseBoundRuling: z4.object({
|
|
5497
|
+
rulingId: z4.string().min(1),
|
|
5498
|
+
pauseId: z4.string().min(1),
|
|
5499
|
+
contentDigest: z4.string().min(1)
|
|
5500
|
+
}).strict().nullable().optional(),
|
|
5131
5501
|
policyDigest: z4.string().min(1),
|
|
5132
5502
|
recordedAt: isoTimestamp
|
|
5133
5503
|
}).strict();
|
|
@@ -5149,7 +5519,11 @@ var LoopStateRecordSchema = z4.object({
|
|
|
5149
5519
|
deliveredFindings: roundHeadIdentity.nullable(),
|
|
5150
5520
|
repeatMemory: z4.object({
|
|
5151
5521
|
blockingFindings: z4.array(z4.string()),
|
|
5152
|
-
lastFailure: z4.object({ signature: z4.string(), message: z4.string() }).nullable()
|
|
5522
|
+
lastFailure: z4.object({ signature: z4.string(), message: z4.string(), developerAttemptedSince: z4.boolean().optional() }).nullable()
|
|
5523
|
+
}).strict().optional(),
|
|
5524
|
+
developerHandoff: z4.object({
|
|
5525
|
+
findings: z4.array(z4.object({ id: z4.string().min(1), description: z4.string().min(1) }).strict()),
|
|
5526
|
+
failingChecks: z4.array(z4.string().min(1))
|
|
5153
5527
|
}).strict().optional(),
|
|
5154
5528
|
publicationExpectedBase: z4.string().regex(/^[0-9a-f]{40}$/).nullable().optional(),
|
|
5155
5529
|
taskStartedAt: isoTimestamp.optional(),
|
|
@@ -5204,8 +5578,34 @@ var ResolutionRecordSchema = z4.object({
|
|
|
5204
5578
|
authenticatedFrom: z4.string().min(1),
|
|
5205
5579
|
consumedAt: isoTimestamp
|
|
5206
5580
|
}).strict();
|
|
5581
|
+
// ../../packages/aeg-core/src/principals-config.ts
|
|
5582
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
5583
|
+
import { join } from "node:path";
|
|
5584
|
+
var PRINCIPALS_CONFIG_FIX = 'add "principals": [...] to vinaya.config.json';
|
|
5585
|
+
function readConfigPrincipals(repoRoot = ".") {
|
|
5586
|
+
const path = join(repoRoot, "vinaya.config.json");
|
|
5587
|
+
let raw;
|
|
5588
|
+
try {
|
|
5589
|
+
raw = JSON.parse(readFileSync2(path, "utf8"));
|
|
5590
|
+
} catch (err) {
|
|
5591
|
+
const why = err instanceof Error ? err.message : String(err);
|
|
5592
|
+
return { ok: false, reason: `cannot read ${path} as JSON (${why}) — ${PRINCIPALS_CONFIG_FIX}` };
|
|
5593
|
+
}
|
|
5594
|
+
const value = raw !== null && typeof raw === "object" ? raw.principals : undefined;
|
|
5595
|
+
if (value === undefined) {
|
|
5596
|
+
return { ok: false, reason: `${path} declares no Principal list — ${PRINCIPALS_CONFIG_FIX}` };
|
|
5597
|
+
}
|
|
5598
|
+
if (!Array.isArray(value) || value.length === 0 || !value.every((p) => typeof p === "string" && p.length > 0)) {
|
|
5599
|
+
return {
|
|
5600
|
+
ok: false,
|
|
5601
|
+
reason: `${path}'s "principals" must be a non-empty array of login strings — ${PRINCIPALS_CONFIG_FIX}`
|
|
5602
|
+
};
|
|
5603
|
+
}
|
|
5604
|
+
return { ok: true, principals: value };
|
|
5605
|
+
}
|
|
5606
|
+
|
|
5207
5607
|
// ../../packages/aeg-core/bin/verify-dispatch.ts
|
|
5208
|
-
var REPO_ROOT =
|
|
5608
|
+
var REPO_ROOT = join2(import.meta.dirname, "../../..");
|
|
5209
5609
|
process.chdir(REPO_ROOT);
|
|
5210
5610
|
function sh(cmd, args) {
|
|
5211
5611
|
try {
|
|
@@ -5556,42 +5956,6 @@ function resolvePriorTask(tranche, taskId, branchPrs, provenanceByIssue, repo) {
|
|
|
5556
5956
|
hasProvenance: prior.issue !== null ? provenanceByIssue.get(prior.issue) ?? false : false
|
|
5557
5957
|
};
|
|
5558
5958
|
}
|
|
5559
|
-
function otherActiveTrancheSlugs(excludeSlug, repo) {
|
|
5560
|
-
return listActiveTrancheSlugs(repo.owner, repo.repo).map((m) => m.slug).filter((slug) => slug !== excludeSlug);
|
|
5561
|
-
}
|
|
5562
|
-
async function resolvePriorTrancheArchival(projects, excludeSlug, repo) {
|
|
5563
|
-
const candidates = otherActiveTrancheSlugs(excludeSlug, repo);
|
|
5564
|
-
const facts = [];
|
|
5565
|
-
for (const project of projects) {
|
|
5566
|
-
let found = null;
|
|
5567
|
-
for (const slug of candidates) {
|
|
5568
|
-
const candidateTranche = await deriveTrancheFromForge(repo.owner, repo.repo, slug);
|
|
5569
|
-
const touchesProject = candidateTranche.tasks.some((t) => t.projects.includes(project));
|
|
5570
|
-
if (!touchesProject)
|
|
5571
|
-
continue;
|
|
5572
|
-
const openIssues = shJson("gh", [
|
|
5573
|
-
"issue",
|
|
5574
|
-
"list",
|
|
5575
|
-
"-R",
|
|
5576
|
-
`${repo.owner}/${repo.repo}`,
|
|
5577
|
-
"--label",
|
|
5578
|
-
trancheLabel(slug),
|
|
5579
|
-
"--state",
|
|
5580
|
-
"open",
|
|
5581
|
-
"--json",
|
|
5582
|
-
"number",
|
|
5583
|
-
"--limit",
|
|
5584
|
-
"100"
|
|
5585
|
-
]) ?? [];
|
|
5586
|
-
if (openIssues.length === 0) {
|
|
5587
|
-
found = { project, priorTrancheSlug: slug, archived: false };
|
|
5588
|
-
break;
|
|
5589
|
-
}
|
|
5590
|
-
}
|
|
5591
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
5592
|
-
}
|
|
5593
|
-
return facts;
|
|
5594
|
-
}
|
|
5595
5959
|
function computeLeftoverForBranch(branch, worktreeDir) {
|
|
5596
5960
|
const branchExistsRemote = sh("git", ["ls-remote", "--heads", "origin", branch]).length > 0;
|
|
5597
5961
|
const worktreeExistsLocal = existsSync(worktreeDir);
|
|
@@ -5607,11 +5971,11 @@ function computeLeftoverForBranch(branch, worktreeDir) {
|
|
|
5607
5971
|
return classifyLeftover({ branchExistsRemote, worktreeExistsLocal, commitsAheadOfMain });
|
|
5608
5972
|
}
|
|
5609
5973
|
function computeLeftover(trancheSlug, taskId) {
|
|
5610
|
-
return computeLeftoverForBranch(`task/${trancheSlug}/${taskId}`,
|
|
5974
|
+
return computeLeftoverForBranch(`task/${trancheSlug}/${taskId}`, join2(REPO_ROOT, ".worktrees", "task", trancheSlug, taskId));
|
|
5611
5975
|
}
|
|
5612
5976
|
function computeLeftoverForIssue(issueNumber) {
|
|
5613
5977
|
const branch = `task/issue-${issueNumber}`;
|
|
5614
|
-
return computeLeftoverForBranch(branch,
|
|
5978
|
+
return computeLeftoverForBranch(branch, join2(REPO_ROOT, ".worktrees", branch));
|
|
5615
5979
|
}
|
|
5616
5980
|
function captureStreams(cmd, args) {
|
|
5617
5981
|
const result = spawnSync(cmd, args, { encoding: "utf8" });
|
|
@@ -5654,8 +6018,8 @@ function firstStderrLine(stderr) {
|
|
|
5654
6018
|
return line.length <= LIMIT ? line : `${line.slice(0, LIMIT)}\u2026 (truncated)`;
|
|
5655
6019
|
}
|
|
5656
6020
|
function siblingTool(name) {
|
|
5657
|
-
const built =
|
|
5658
|
-
return existsSync(built) ? built :
|
|
6021
|
+
const built = join2(import.meta.dirname, `${name}.js`);
|
|
6022
|
+
return existsSync(built) ? built : join2(import.meta.dirname, `${name}.ts`);
|
|
5659
6023
|
}
|
|
5660
6024
|
function currentFindingCounts() {
|
|
5661
6025
|
const docs = captureStreams("bun", [siblingTool("verify-docs")]);
|
|
@@ -5688,15 +6052,24 @@ function countErrorLines(output) {
|
|
|
5688
6052
|
return output.split(`
|
|
5689
6053
|
`).filter((l) => l.trim().startsWith("\u2717")).length;
|
|
5690
6054
|
}
|
|
5691
|
-
function
|
|
6055
|
+
function principalsOrExit(mode) {
|
|
6056
|
+
const principals = readConfigPrincipals();
|
|
6057
|
+
if (!principals.ok) {
|
|
6058
|
+
console.error(`verify-dispatch${mode}: ${principals.reason}`);
|
|
6059
|
+
process.exit(1);
|
|
6060
|
+
}
|
|
6061
|
+
return principals.principals;
|
|
6062
|
+
}
|
|
6063
|
+
function resolvePremiseBriefText(comments, issueNumber, principalAllowlist) {
|
|
5692
6064
|
const normalized = comments.map((c) => ({ body: c.body, author: c.author?.login ?? null }));
|
|
5693
|
-
const briefComment = resolveNewestFrozenBrief(normalized,
|
|
6065
|
+
const briefComment = resolveNewestFrozenBrief(normalized, principalAllowlist);
|
|
5694
6066
|
if (!briefComment) {
|
|
5695
6067
|
return { ok: false, message: `not dispatched \u2014 no \`aeg:brief:v<k>\` comment on Issue #${issueNumber}.` };
|
|
5696
6068
|
}
|
|
5697
6069
|
return { ok: true, text: briefComment.content };
|
|
5698
6070
|
}
|
|
5699
6071
|
async function runPremiseModeFromIssue(trancheSlug, taskId) {
|
|
6072
|
+
const principalAllowlist = principalsOrExit(" --premise");
|
|
5700
6073
|
const repo = await resolveRepo();
|
|
5701
6074
|
if (!repo) {
|
|
5702
6075
|
console.error("verify-dispatch --premise: could not resolve a GitHub repo (set AEG_REPO=owner/repo, or confirm `gh auth login`).");
|
|
@@ -5723,7 +6096,7 @@ async function runPremiseModeFromIssue(trancheSlug, taskId) {
|
|
|
5723
6096
|
"--json",
|
|
5724
6097
|
"comments"
|
|
5725
6098
|
]);
|
|
5726
|
-
const resolved = resolvePremiseBriefText(commentsJson?.comments ?? [], task.issue);
|
|
6099
|
+
const resolved = resolvePremiseBriefText(commentsJson?.comments ?? [], task.issue, principalAllowlist);
|
|
5727
6100
|
if (!resolved.ok) {
|
|
5728
6101
|
console.error(`verify-dispatch --premise: ${resolved.message}`);
|
|
5729
6102
|
process.exit(1);
|
|
@@ -5734,7 +6107,7 @@ async function runPremiseModeFromIssue(trancheSlug, taskId) {
|
|
|
5734
6107
|
console.log("verify-dispatch --premise: no `Premise:` assertions found in the dispatched brief \u2014 nothing to re-assert.");
|
|
5735
6108
|
process.exit(0);
|
|
5736
6109
|
}
|
|
5737
|
-
const result = checkPremises(assertions, (p) => existsSync(p) ?
|
|
6110
|
+
const result = checkPremises(assertions, (p) => existsSync(p) ? readFileSync3(p, "utf8") : null);
|
|
5738
6111
|
if (!result.pass) {
|
|
5739
6112
|
console.error(`
|
|
5740
6113
|
verify-dispatch --premise FAILED \u2014 ${result.failures.length} premise(s) no longer hold:
|
|
@@ -5747,13 +6120,13 @@ verify-dispatch --premise FAILED \u2014 ${result.failures.length} premise(s) no
|
|
|
5747
6120
|
process.exit(0);
|
|
5748
6121
|
}
|
|
5749
6122
|
function runPremiseMode(bodyFile) {
|
|
5750
|
-
const body =
|
|
6123
|
+
const body = readFileSync3(bodyFile, "utf8");
|
|
5751
6124
|
const assertions = parsePremiseBlock(body);
|
|
5752
6125
|
if (assertions.length === 0) {
|
|
5753
6126
|
console.log("verify-dispatch --premise: no `Premise:` assertions found in the body file \u2014 nothing to re-assert.");
|
|
5754
6127
|
process.exit(0);
|
|
5755
6128
|
}
|
|
5756
|
-
const result = checkPremises(assertions, (p) => existsSync(p) ?
|
|
6129
|
+
const result = checkPremises(assertions, (p) => existsSync(p) ? readFileSync3(p, "utf8") : null);
|
|
5757
6130
|
if (!result.pass) {
|
|
5758
6131
|
console.error(`
|
|
5759
6132
|
verify-dispatch --premise FAILED \u2014 ${result.failures.length} premise(s) no longer hold:
|
|
@@ -5767,7 +6140,7 @@ verify-dispatch --premise FAILED \u2014 ${result.failures.length} premise(s) no
|
|
|
5767
6140
|
}
|
|
5768
6141
|
function runSimulateMode(trancheSlug, taskId, bodyFile) {
|
|
5769
6142
|
const branch = `task/${trancheSlug}/${taskId}`;
|
|
5770
|
-
const body =
|
|
6143
|
+
const body = readFileSync3(bodyFile, "utf8");
|
|
5771
6144
|
const assertions = parsePremiseBlock(body);
|
|
5772
6145
|
console.log(assertions.length > 0 ? `verify-dispatch --simulate: Premise: block present (${assertions.length} assertion(s)).` : "verify-dispatch --simulate: WARNING \u2014 no `Premise:` block found in the body file (checkPremiseCoverage will fail at PR time if this task has a code surface).");
|
|
5773
6146
|
let failed = false;
|
|
@@ -5811,7 +6184,7 @@ function runSurfacesMode(surfacesArg) {
|
|
|
5811
6184
|
console.log("verify-dispatch --surfaces: no surface globs given \u2014 nothing to check.");
|
|
5812
6185
|
process.exit(0);
|
|
5813
6186
|
}
|
|
5814
|
-
const docOwnersContent = existsSync(DOC_OWNERS_PATH) ?
|
|
6187
|
+
const docOwnersContent = existsSync(DOC_OWNERS_PATH) ? readFileSync3(DOC_OWNERS_PATH, "utf8") : null;
|
|
5815
6188
|
const manifestState = classifyDocOwnersManifest(docOwnersContent);
|
|
5816
6189
|
if (manifestState === "absent") {
|
|
5817
6190
|
console.log(`verify-dispatch --surfaces: no doc-ownership manifest at ${DOC_OWNERS_PATH} \u2014 dormant, no bindings to check.`);
|
|
@@ -5840,7 +6213,7 @@ function runSurfacesMode(surfacesArg) {
|
|
|
5840
6213
|
process.exit(0);
|
|
5841
6214
|
}
|
|
5842
6215
|
function runCheckBaselineMode(baselineFile) {
|
|
5843
|
-
const baseline = JSON.parse(
|
|
6216
|
+
const baseline = JSON.parse(readFileSync3(baselineFile, "utf8"));
|
|
5844
6217
|
const current = currentFindingCounts();
|
|
5845
6218
|
const unavailable = current.filter((c) => c.unavailable);
|
|
5846
6219
|
if (unavailable.length > 0) {
|
|
@@ -5867,6 +6240,7 @@ verify-dispatch --check-baseline: within budget.`);
|
|
|
5867
6240
|
process.exit(0);
|
|
5868
6241
|
}
|
|
5869
6242
|
async function runGateMode(trancheSlug, taskId) {
|
|
6243
|
+
const principalAllowlist = principalsOrExit("");
|
|
5870
6244
|
sh("git", ["fetch", "origin", "main", "--quiet"]);
|
|
5871
6245
|
const repo = await resolveRepo();
|
|
5872
6246
|
const token = await resolveGithubToken();
|
|
@@ -5895,7 +6269,7 @@ async function runGateMode(trancheSlug, taskId) {
|
|
|
5895
6269
|
provenanceByIssue = await fetchProvenance([priorTaskRaw.issue], repo.owner, repo.repo, token);
|
|
5896
6270
|
}
|
|
5897
6271
|
const priorTask = resolvePriorTask(tranche, taskId, branchPrs, provenanceByIssue, repo);
|
|
5898
|
-
const
|
|
6272
|
+
const archival = await resolvePriorTrancheArchival(task.projects, trancheSlug, repo);
|
|
5899
6273
|
const gateResult = checkDispatchReadiness({
|
|
5900
6274
|
trancheSlug,
|
|
5901
6275
|
task,
|
|
@@ -5904,7 +6278,8 @@ async function runGateMode(trancheSlug, taskId) {
|
|
|
5904
6278
|
dependsOn,
|
|
5905
6279
|
conflictsWith,
|
|
5906
6280
|
priorTask,
|
|
5907
|
-
priorTrancheArchival
|
|
6281
|
+
priorTrancheArchival: archival.facts,
|
|
6282
|
+
principalAllowlist
|
|
5908
6283
|
});
|
|
5909
6284
|
const ambiguousEdge = await checkBareEdgeQualification(task.dependsOn, task.conflictsWith, issueJson?.milestone ?? null, repo);
|
|
5910
6285
|
const leftover = computeLeftover(trancheSlug, taskId);
|
|
@@ -5917,6 +6292,8 @@ verify-dispatch: ${trancheSlug} task ${taskId}
|
|
|
5917
6292
|
console.log(`dispatch-readiness: ${gateResult.ready ? "READY" : "NOT READY"}`);
|
|
5918
6293
|
for (const b of gateResult.blockers)
|
|
5919
6294
|
console.log(` \u2717 ${b}`);
|
|
6295
|
+
if (archival.infraFailure)
|
|
6296
|
+
console.log(` \u2717 ${archival.infraFailure}`);
|
|
5920
6297
|
if (ambiguousEdge)
|
|
5921
6298
|
console.log(` \u2717 ${ambiguousEdge}`);
|
|
5922
6299
|
console.log(`
|
|
@@ -5931,12 +6308,14 @@ baseline (informational \u2014 captured this run, not a committed file):`);
|
|
|
5931
6308
|
if (raw.diagnostic)
|
|
5932
6309
|
console.log(` \u21B3 ${raw.diagnostic}`);
|
|
5933
6310
|
}
|
|
5934
|
-
const
|
|
6311
|
+
const gateReady = gateResult.ready && archival.infraFailure === null;
|
|
6312
|
+
const overallReady = gateReady && !leftoverBlocksDispatch(leftover.verdict, { existingWork: EXISTING_WORK }) && !ambiguousEdge;
|
|
5935
6313
|
console.log(`
|
|
5936
6314
|
verify-dispatch: ${overallReady ? "READY TO DISPATCH" : "NOT READY"}`);
|
|
5937
6315
|
process.exit(overallReady ? 0 : 1);
|
|
5938
6316
|
}
|
|
5939
6317
|
async function runGateModeForIssue(issueNumber) {
|
|
6318
|
+
const principalAllowlist = principalsOrExit("");
|
|
5940
6319
|
sh("git", ["fetch", "origin", "main", "--quiet"]);
|
|
5941
6320
|
const repo = await resolveRepo();
|
|
5942
6321
|
const token = await resolveGithubToken();
|
|
@@ -5976,7 +6355,8 @@ async function runGateModeForIssue(issueNumber) {
|
|
|
5976
6355
|
dependsOn,
|
|
5977
6356
|
conflictsWith,
|
|
5978
6357
|
priorTask: null,
|
|
5979
|
-
priorTrancheArchival: []
|
|
6358
|
+
priorTrancheArchival: [],
|
|
6359
|
+
principalAllowlist
|
|
5980
6360
|
});
|
|
5981
6361
|
const ambiguousEdge = await checkBareEdgeQualification(dependsOnIds, conflictsWithIds, issueJson.milestone, repo);
|
|
5982
6362
|
const leftover = computeLeftoverForIssue(issueNumber);
|