@attalabs/vinaya 0.40.0 → 0.41.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/contracts/developer-reviewer.md +2 -2
- package/aeg-root/contracts/planner-developer.md +4 -4
- package/aeg-root/process.md +3 -3
- package/aeg-root/roles/developer/reference.md +3 -0
- package/aeg-root/state-machine.md +2 -2
- package/aeg-root/templates/brief-template.md +1 -1
- package/dist/checks/bin/check-body-bare-digits.js +165 -65
- package/dist/checks/bin/check-branch-topology.js +169 -60
- package/dist/checks/bin/check-brief-shape.js +165 -65
- package/dist/checks/bin/check-changeset-coverage.js +342 -122
- package/dist/checks/bin/check-ci-shard-coverage.js +384 -130
- package/dist/checks/bin/check-closes-n.js +169 -60
- package/dist/checks/bin/check-coherence.js +165 -65
- package/dist/checks/bin/check-dead-branch-push.js +142 -59
- package/dist/checks/bin/check-dispatch-readiness.js +211 -81
- package/dist/checks/bin/check-doc-claims.js +165 -65
- package/dist/checks/bin/check-doc-coverage-push.js +342 -122
- package/dist/checks/bin/check-doc-coverage.js +344 -124
- package/dist/checks/bin/check-doctrine-no-procedures.js +165 -65
- package/dist/checks/bin/check-doctrine-portability.js +342 -122
- package/dist/checks/bin/check-evidence-fresh.js +376 -129
- package/dist/checks/bin/check-exec-bits.js +342 -122
- package/dist/checks/bin/check-first-push-dispatch.js +208 -78
- package/dist/checks/bin/check-issue-milestone-attach.js +142 -59
- package/dist/checks/bin/check-issue-objectives-numbering.js +165 -65
- package/dist/checks/bin/check-issue-parts-coverage.js +142 -59
- package/dist/checks/bin/check-issue-surface-globs.js +218 -88
- package/dist/checks/bin/check-issue-title-grammar.js +142 -59
- package/dist/checks/bin/check-main-branch-refusal.js +142 -59
- package/dist/checks/bin/check-no-disk-state.js +142 -59
- package/dist/checks/bin/check-pr-premise-reassert.js +165 -65
- package/dist/checks/bin/check-pr-report-density.js +142 -59
- package/dist/checks/bin/check-principal-test-plan-wait.js +165 -65
- package/dist/checks/bin/check-quoted-command.js +338 -118
- package/dist/checks/bin/check-reader-resolvable-prose.js +338 -118
- package/dist/checks/bin/check-registry-gates.js +206 -78
- package/dist/checks/bin/check-retired-vocabulary.js +338 -118
- package/dist/checks/bin/check-review-gate.js +203 -83
- package/dist/checks/bin/check-single-plan-pr.js +142 -59
- package/dist/checks/bin/check-surface-scope.js +169 -60
- package/dist/checks/bin/check-test-plan.js +165 -65
- package/dist/checks/bin/check-token-collection-wired.js +142 -59
- package/dist/checks/bin/check-workspace-escape.js +340 -120
- package/dist/checks/bin/verify-coherence.js +153 -60
- package/dist/checks/bin/verify-dispatch.js +169 -69
- package/dist/checks/bin/verify-docs.js +142 -57
- package/dist/index.js +16280 -11764
- package/dist/lib/pre-push-cache-test-run.js +791 -68
- package/dist/lib/pre-push-changed-files.js +65 -19
- package/dist/lib/pre-push-mode.js +466 -0
- package/dist/lib/pre-push-progress-dir.js +4205 -0
- package/dist/lib/pre-push-record-tests.js +446 -0
- package/dist/lib/pre-push-select-tests.js +1426 -454
- package/dist/lib/push-progress-observer.js +4213 -0
- package/package.json +11 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +5 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +18 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +3 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +88 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +34 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +26 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +7 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +7 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +17 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +13 -17
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/index.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/published-prose.ts +70 -45
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +1 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +77 -7
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +24 -54
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +221 -56
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/live-record.ts +179 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +8 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/narration.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema-digest.ts +225 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +7 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +23 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/principals-config.ts +44 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/prose-rules.ts +532 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/protected-paths.ts +31 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +157 -80
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +8 -12
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/retired-vocabulary.ts +52 -109
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +46 -17
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +85 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +46 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +2 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +63 -8
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +24 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +0 -1
- 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.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]__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]__1a3j3n1._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1wzfiav._.js → [root-of-the-server]__1d4eth3._.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]__1snpgaw._.js +3 -3
- 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/_08onyya._.js +2 -2
- 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 +3 -3
- 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/{38kom-9c-oi65.js → 0x7u6si-ai179.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1p3vr9qts86_b.js → 2fu7mfsj4oima.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{21tunzmxjvm2a.js → 34b4ruddunn3q.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{Y3oaZSTSP9PivUuJvxK1W → 2ZARxTwpuRew8-SvYsRdU}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{Y3oaZSTSP9PivUuJvxK1W → 2ZARxTwpuRew8-SvYsRdU}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{Y3oaZSTSP9PivUuJvxK1W → 2ZARxTwpuRew8-SvYsRdU}/_ssgManifest.js +0 -0
|
@@ -728,10 +728,11 @@ function trancheSlugsFromLabels(labels) {
|
|
|
728
728
|
}
|
|
729
729
|
return slugs;
|
|
730
730
|
}
|
|
731
|
-
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
731
|
+
async function indexTrancheMilestonesAsync(owner, repo, options = {}) {
|
|
732
|
+
const read = (fetch) => options.retryFailedReads ? retryOnce(fetch) : fetch();
|
|
732
733
|
const [milestones, labels] = await Promise.all([
|
|
733
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
734
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`)
|
|
734
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`)),
|
|
735
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`))
|
|
735
736
|
]);
|
|
736
737
|
const active = [];
|
|
737
738
|
const archived = [];
|
|
@@ -742,9 +743,16 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
742
743
|
const uniqueNewPathSlugs = [...new Set(newPathSlugs)];
|
|
743
744
|
const uniqueLegacySlugs = [...legacySlugs];
|
|
744
745
|
const [legacyIssuesBySlug, newPathIssuesBySlug] = await Promise.all([
|
|
745
|
-
Promise.all(uniqueLegacySlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))),
|
|
746
|
-
Promise.all(uniqueNewPathSlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))
|
|
746
|
+
Promise.all(uniqueLegacySlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))),
|
|
747
|
+
Promise.all(uniqueNewPathSlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))))
|
|
747
748
|
]);
|
|
749
|
+
const issuesBySlug = new Map;
|
|
750
|
+
uniqueLegacySlugs.forEach((slug, i) => {
|
|
751
|
+
issuesBySlug.set(slug, legacyIssuesBySlug[i] ?? []);
|
|
752
|
+
});
|
|
753
|
+
uniqueNewPathSlugs.forEach((slug, i) => {
|
|
754
|
+
issuesBySlug.set(slug, newPathIssuesBySlug[i] ?? []);
|
|
755
|
+
});
|
|
748
756
|
uniqueLegacySlugs.forEach((slug, i) => {
|
|
749
757
|
const m = legacyMilestoneBySlug.get(slug);
|
|
750
758
|
if (!m)
|
|
@@ -768,7 +776,14 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
768
776
|
else if (lifecycle === "complete")
|
|
769
777
|
archived.push({ slug, goal });
|
|
770
778
|
});
|
|
771
|
-
return { active, archived, facts, legacySlugs };
|
|
779
|
+
return { active, archived, facts, legacySlugs, issuesBySlug };
|
|
780
|
+
}
|
|
781
|
+
async function retryOnce(fetch) {
|
|
782
|
+
try {
|
|
783
|
+
return await fetch();
|
|
784
|
+
} catch {
|
|
785
|
+
return fetch();
|
|
786
|
+
}
|
|
772
787
|
}
|
|
773
788
|
async function tranchesAttachedToMilestone(owner, repo, milestoneNumber) {
|
|
774
789
|
const issues = await ghApiGetAllPagesAsync(`repos/${owner}/${repo}/issues?milestone=${milestoneNumber}&state=all`, { jq: "[.[] | {labels: .labels}]" });
|
|
@@ -1793,15 +1808,16 @@ function describeError(err) {
|
|
|
1793
1808
|
}
|
|
1794
1809
|
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
1795
1810
|
function defaultPriorTrancheArchivalDeps() {
|
|
1796
|
-
let facts = new Map;
|
|
1797
1811
|
return {
|
|
1798
|
-
|
|
1799
|
-
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1812
|
+
activeTranches: async (excludeSlug, repo) => {
|
|
1813
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo, { retryFailedReads: true });
|
|
1814
|
+
return index.active.filter((m) => m.slug !== excludeSlug).map((m) => {
|
|
1815
|
+
const issues = index.issuesBySlug?.get(m.slug);
|
|
1816
|
+
if (!issues)
|
|
1817
|
+
throw new Error(`the Milestone index holds no Issue list for tranche \`${m.slug}\``);
|
|
1818
|
+
return { slug: m.slug, issues };
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1805
1821
|
};
|
|
1806
1822
|
}
|
|
1807
1823
|
function reason(err) {
|
|
@@ -1813,61 +1829,28 @@ async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = d
|
|
|
1813
1829
|
return { facts: [], infraFailure: null };
|
|
1814
1830
|
let candidates;
|
|
1815
1831
|
try {
|
|
1816
|
-
candidates = await deps.
|
|
1832
|
+
candidates = await deps.activeTranches(excludeSlug, repo);
|
|
1817
1833
|
} catch (err) {
|
|
1818
1834
|
return {
|
|
1819
1835
|
facts: [],
|
|
1820
1836
|
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
1821
1837
|
};
|
|
1822
1838
|
}
|
|
1839
|
+
const tasksBySlug = new Map(candidates.map((c) => [c.slug, tasksFromIssues(c.issues)]));
|
|
1823
1840
|
const facts = [];
|
|
1824
|
-
const unreadable = [];
|
|
1825
|
-
const derived = new Map;
|
|
1826
|
-
const derive = (slug) => {
|
|
1827
|
-
let p = derived.get(slug);
|
|
1828
|
-
if (!p) {
|
|
1829
|
-
p = deps.deriveTranche(slug, repo);
|
|
1830
|
-
derived.set(slug, p);
|
|
1831
|
-
}
|
|
1832
|
-
return p;
|
|
1833
|
-
};
|
|
1834
1841
|
for (const project of projects) {
|
|
1835
1842
|
let found = null;
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
let candidateTranche;
|
|
1839
|
-
try {
|
|
1840
|
-
candidateTranche = await derive(slug);
|
|
1841
|
-
} catch {
|
|
1842
|
-
unknown = true;
|
|
1843
|
-
unreadable.push(`the tasks of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1844
|
-
break;
|
|
1845
|
-
}
|
|
1846
|
-
if (!candidateTranche.tasks.some((t) => t.projects.includes(project)))
|
|
1843
|
+
for (const { slug, issues } of candidates) {
|
|
1844
|
+
if (!(tasksBySlug.get(slug) ?? []).some((t) => t.projects.includes(project)))
|
|
1847
1845
|
continue;
|
|
1848
|
-
|
|
1849
|
-
try {
|
|
1850
|
-
openIssues = await deps.openIssues(slug, repo);
|
|
1851
|
-
} catch {
|
|
1852
|
-
openIssues = null;
|
|
1853
|
-
}
|
|
1854
|
-
if (openIssues === null) {
|
|
1855
|
-
unknown = true;
|
|
1856
|
-
unreadable.push(`the open Issues of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1857
|
-
break;
|
|
1858
|
-
}
|
|
1859
|
-
if (openIssues.length === 0) {
|
|
1846
|
+
if (!issues.some((issue) => issue.state === "OPEN")) {
|
|
1860
1847
|
found = { project, priorTrancheSlug: slug, archived: false };
|
|
1861
1848
|
break;
|
|
1862
1849
|
}
|
|
1863
1850
|
}
|
|
1864
|
-
|
|
1865
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1851
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1866
1852
|
}
|
|
1867
|
-
return {
|
|
1868
|
-
facts,
|
|
1869
|
-
infraFailure: unreadable.length === 0 ? null : `severity:infra — could not read ${unreadable.join(", ")}; whether a prior tranche is archived is unknown.`
|
|
1870
|
-
};
|
|
1853
|
+
return { facts, infraFailure: null };
|
|
1871
1854
|
}
|
|
1872
1855
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
1873
1856
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
@@ -4996,7 +4979,17 @@ var HeaderMetaV3Schema = z3.object({
|
|
|
4996
4979
|
runtime: z3.string().nullable(),
|
|
4997
4980
|
source: z3.string().nullable()
|
|
4998
4981
|
}).strict();
|
|
4999
|
-
var
|
|
4982
|
+
var HeaderMetaV4Schema = HeaderMetaV3Schema.extend({
|
|
4983
|
+
schema: z3.literal(4),
|
|
4984
|
+
process: z3.object({ id: z3.string(), version: z3.string().nullable(), digest: z3.string().nullable() }).strict(),
|
|
4985
|
+
runner: z3.object({ id: z3.string(), version: z3.string().nullable() }).strict()
|
|
4986
|
+
}).strict();
|
|
4987
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [
|
|
4988
|
+
HeaderMetaV1Schema,
|
|
4989
|
+
HeaderMetaV2Schema,
|
|
4990
|
+
HeaderMetaV3Schema,
|
|
4991
|
+
HeaderMetaV4Schema
|
|
4992
|
+
]);
|
|
5000
4993
|
var SubjectSchema = z3.object({
|
|
5001
4994
|
issue: z3.number().int().nullable(),
|
|
5002
4995
|
pr: z3.number().int().optional(),
|
|
@@ -5216,6 +5209,75 @@ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
|
5216
5209
|
round: z3.number().int(),
|
|
5217
5210
|
phase: z3.string()
|
|
5218
5211
|
}).strict(),
|
|
5212
|
+
z3.object({
|
|
5213
|
+
...loopShared,
|
|
5214
|
+
event: z3.literal("conflict_reentry"),
|
|
5215
|
+
task: z3.number().int(),
|
|
5216
|
+
pr: z3.number().int().positive(),
|
|
5217
|
+
attempt: z3.number().int().positive(),
|
|
5218
|
+
bound: z3.number().int().positive()
|
|
5219
|
+
}).strict(),
|
|
5220
|
+
z3.object({
|
|
5221
|
+
...loopShared,
|
|
5222
|
+
event: z3.literal("storage_push"),
|
|
5223
|
+
round: z3.number().int(),
|
|
5224
|
+
branch: z3.string(),
|
|
5225
|
+
head: z3.string()
|
|
5226
|
+
}).strict(),
|
|
5227
|
+
z3.object({
|
|
5228
|
+
...loopShared,
|
|
5229
|
+
event: z3.literal("local_checks_run"),
|
|
5230
|
+
round: z3.number().int(),
|
|
5231
|
+
head: z3.string().nullable(),
|
|
5232
|
+
passed: z3.boolean(),
|
|
5233
|
+
wall_ms: z3.number().nonnegative()
|
|
5234
|
+
}).strict(),
|
|
5235
|
+
z3.object({
|
|
5236
|
+
...loopShared,
|
|
5237
|
+
event: z3.literal("ready_push"),
|
|
5238
|
+
round: z3.number().int(),
|
|
5239
|
+
head: z3.string(),
|
|
5240
|
+
outcome: z3.enum(["passed", "refused"]),
|
|
5241
|
+
selected: z3.number().int().nonnegative(),
|
|
5242
|
+
failed: z3.number().int().nonnegative(),
|
|
5243
|
+
rerun: z3.boolean(),
|
|
5244
|
+
wall_ms: z3.number().nonnegative()
|
|
5245
|
+
}).strict(),
|
|
5246
|
+
z3.object({
|
|
5247
|
+
...loopShared,
|
|
5248
|
+
event: z3.literal("failed_tests_rerun"),
|
|
5249
|
+
round: z3.number().int(),
|
|
5250
|
+
head: z3.string(),
|
|
5251
|
+
rerun_of: z3.string(),
|
|
5252
|
+
failed_files: z3.number().int().nonnegative(),
|
|
5253
|
+
affected_files: z3.number().int().nonnegative(),
|
|
5254
|
+
full_count: z3.number().int().nonnegative()
|
|
5255
|
+
}).strict(),
|
|
5256
|
+
z3.object({
|
|
5257
|
+
...loopShared,
|
|
5258
|
+
event: z3.literal("pr_opened"),
|
|
5259
|
+
round: z3.number().int(),
|
|
5260
|
+
pr: z3.number().int().positive(),
|
|
5261
|
+
head: z3.string()
|
|
5262
|
+
}).strict(),
|
|
5263
|
+
z3.object({
|
|
5264
|
+
...loopShared,
|
|
5265
|
+
event: z3.literal("ci_result_read"),
|
|
5266
|
+
round: z3.number().int(),
|
|
5267
|
+
pr: z3.number().int().positive(),
|
|
5268
|
+
head: z3.string(),
|
|
5269
|
+
conclusion: z3.enum(["green", "red", "pending", "skipped"]),
|
|
5270
|
+
failing_checks: z3.array(z3.string()),
|
|
5271
|
+
wait_ms: z3.number().nonnegative()
|
|
5272
|
+
}).strict(),
|
|
5273
|
+
z3.object({
|
|
5274
|
+
...loopShared,
|
|
5275
|
+
event: z3.literal("phase_time"),
|
|
5276
|
+
round: z3.number().int(),
|
|
5277
|
+
phase: z3.enum(["developer", "local_checks", "review", "push", "ci", "other"]),
|
|
5278
|
+
step: z3.string(),
|
|
5279
|
+
wall_ms: z3.number().nonnegative()
|
|
5280
|
+
}).strict(),
|
|
5219
5281
|
z3.object({
|
|
5220
5282
|
...loopShared,
|
|
5221
5283
|
event: z3.literal("driver_exited"),
|
|
@@ -5403,7 +5465,7 @@ var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
|
5403
5465
|
]);
|
|
5404
5466
|
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
5405
5467
|
var customShared = {
|
|
5406
|
-
meta:
|
|
5468
|
+
meta: HeaderMetaSchema,
|
|
5407
5469
|
subject: SubjectSchema,
|
|
5408
5470
|
kind: z3.literal("custom"),
|
|
5409
5471
|
...envelopeTail
|
|
@@ -5576,6 +5638,16 @@ var ResolutionRecordSchema = z4.object({
|
|
|
5576
5638
|
authenticatedFrom: z4.string().min(1),
|
|
5577
5639
|
consumedAt: isoTimestamp
|
|
5578
5640
|
}).strict();
|
|
5641
|
+
var ExecutionRoundMirrorRecordSchema = z4.object({
|
|
5642
|
+
version: z4.literal(1),
|
|
5643
|
+
kind: z4.literal("execution_round"),
|
|
5644
|
+
task: taskId,
|
|
5645
|
+
repository: z4.string().min(1),
|
|
5646
|
+
threadId: z4.string().min(1),
|
|
5647
|
+
checkpointId: z4.string().min(1),
|
|
5648
|
+
round: z4.number().int().positive(),
|
|
5649
|
+
recordedAt: isoTimestamp
|
|
5650
|
+
}).strict();
|
|
5579
5651
|
// ../../packages/aeg-core/src/principals-config.ts
|
|
5580
5652
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
5581
5653
|
import { join } from "node:path";
|
|
@@ -5603,8 +5675,29 @@ function readConfigPrincipals(repoRoot = ".") {
|
|
|
5603
5675
|
}
|
|
5604
5676
|
|
|
5605
5677
|
// ../../packages/aeg-core/bin/verify-coherence.ts
|
|
5606
|
-
var
|
|
5678
|
+
var COHERENCE_INVOCATION_CWD = process.cwd();
|
|
5679
|
+
var REPO_ROOT = (() => {
|
|
5680
|
+
for (const candidate of [COHERENCE_INVOCATION_CWD, import.meta.dirname]) {
|
|
5681
|
+
try {
|
|
5682
|
+
const root = execFileSync2("git", ["-C", candidate, "rev-parse", "--show-toplevel"], {
|
|
5683
|
+
encoding: "utf8",
|
|
5684
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
5685
|
+
}).trim();
|
|
5686
|
+
if (root !== "")
|
|
5687
|
+
return root;
|
|
5688
|
+
} catch {}
|
|
5689
|
+
}
|
|
5690
|
+
return join2(import.meta.dirname, "../../..");
|
|
5691
|
+
})();
|
|
5607
5692
|
process.chdir(REPO_ROOT);
|
|
5693
|
+
function resolveCoherenceTargetRepository() {
|
|
5694
|
+
return resolveRepo(async () => ({
|
|
5695
|
+
stdout: execFileSync2("git", ["-C", REPO_ROOT, "remote", "get-url", "origin"], {
|
|
5696
|
+
encoding: "utf8",
|
|
5697
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
5698
|
+
})
|
|
5699
|
+
}));
|
|
5700
|
+
}
|
|
5608
5701
|
function readRegisteredProjectNames() {
|
|
5609
5702
|
const abs = join2(REPO_ROOT, ".vinaya/projects.md");
|
|
5610
5703
|
if (!existsSync(abs))
|
|
@@ -5735,7 +5828,7 @@ function mergeFileTopology(forgeTranche, fileTranche) {
|
|
|
5735
5828
|
}
|
|
5736
5829
|
async function loadTrancheSweep(prContext = null, onlySlug, baseRef = "origin/main") {
|
|
5737
5830
|
gitFetchMainQuiet();
|
|
5738
|
-
const repo = await
|
|
5831
|
+
const repo = await resolveCoherenceTargetRepository();
|
|
5739
5832
|
let milestones = null;
|
|
5740
5833
|
let milestoneIndexFailed = false;
|
|
5741
5834
|
if (repo) {
|
|
@@ -5869,7 +5962,7 @@ async function runCoherenceChecks(options = {}) {
|
|
|
5869
5962
|
})();
|
|
5870
5963
|
const allEntries = files.flatMap((f) => f.tranche.tasks.map((t) => ({ trancheSlug: f.slug, archived: f.archived, task: t, facts: undefined })));
|
|
5871
5964
|
results.push(checkL3(files));
|
|
5872
|
-
const repo = await
|
|
5965
|
+
const repo = await resolveCoherenceTargetRepository();
|
|
5873
5966
|
const token = await resolveGithubToken();
|
|
5874
5967
|
if (!token) {
|
|
5875
5968
|
const allUnavailableSlugs = new Set(files.map((f) => f.slug));
|
|
@@ -6082,7 +6175,7 @@ if (isEntryPoint(import.meta.url, "verify-coherence")) {
|
|
|
6082
6175
|
}
|
|
6083
6176
|
const branchTrancheSlug = branch.match(/^task\/([^/]+)\//)?.[1];
|
|
6084
6177
|
const files = await loadTrancheFiles(null, branchTrancheSlug);
|
|
6085
|
-
const repo = await
|
|
6178
|
+
const repo = await resolveCoherenceTargetRepository();
|
|
6086
6179
|
const taskIssueRefs = repo ? await fetchTaskIssueRefs(repo.owner, repo.repo, [...extractClosesReferences(prBody)]) : undefined;
|
|
6087
6180
|
const result = checkClosesNTopology(branch, prBody, files, taskIssueRefs);
|
|
6088
6181
|
if (result.ok) {
|