@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
|
@@ -730,10 +730,11 @@ function trancheSlugsFromLabels(labels) {
|
|
|
730
730
|
}
|
|
731
731
|
return slugs;
|
|
732
732
|
}
|
|
733
|
-
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
733
|
+
async function indexTrancheMilestonesAsync(owner, repo, options = {}) {
|
|
734
|
+
const read = (fetch) => options.retryFailedReads ? retryOnce(fetch) : fetch();
|
|
734
735
|
const [milestones, labels] = await Promise.all([
|
|
735
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
736
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`)
|
|
736
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`)),
|
|
737
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`))
|
|
737
738
|
]);
|
|
738
739
|
const active = [];
|
|
739
740
|
const archived = [];
|
|
@@ -744,9 +745,16 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
744
745
|
const uniqueNewPathSlugs = [...new Set(newPathSlugs)];
|
|
745
746
|
const uniqueLegacySlugs = [...legacySlugs];
|
|
746
747
|
const [legacyIssuesBySlug, newPathIssuesBySlug] = await Promise.all([
|
|
747
|
-
Promise.all(uniqueLegacySlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))),
|
|
748
|
-
Promise.all(uniqueNewPathSlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))
|
|
748
|
+
Promise.all(uniqueLegacySlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))),
|
|
749
|
+
Promise.all(uniqueNewPathSlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))))
|
|
749
750
|
]);
|
|
751
|
+
const issuesBySlug = new Map;
|
|
752
|
+
uniqueLegacySlugs.forEach((slug, i) => {
|
|
753
|
+
issuesBySlug.set(slug, legacyIssuesBySlug[i] ?? []);
|
|
754
|
+
});
|
|
755
|
+
uniqueNewPathSlugs.forEach((slug, i) => {
|
|
756
|
+
issuesBySlug.set(slug, newPathIssuesBySlug[i] ?? []);
|
|
757
|
+
});
|
|
750
758
|
uniqueLegacySlugs.forEach((slug, i) => {
|
|
751
759
|
const m = legacyMilestoneBySlug.get(slug);
|
|
752
760
|
if (!m)
|
|
@@ -770,7 +778,14 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
770
778
|
else if (lifecycle === "complete")
|
|
771
779
|
archived.push({ slug, goal });
|
|
772
780
|
});
|
|
773
|
-
return { active, archived, facts, legacySlugs };
|
|
781
|
+
return { active, archived, facts, legacySlugs, issuesBySlug };
|
|
782
|
+
}
|
|
783
|
+
async function retryOnce(fetch) {
|
|
784
|
+
try {
|
|
785
|
+
return await fetch();
|
|
786
|
+
} catch {
|
|
787
|
+
return fetch();
|
|
788
|
+
}
|
|
774
789
|
}
|
|
775
790
|
async function tranchesAttachedToMilestone(owner, repo, milestoneNumber) {
|
|
776
791
|
const issues = await ghApiGetAllPagesAsync(`repos/${owner}/${repo}/issues?milestone=${milestoneNumber}&state=all`, { jq: "[.[] | {labels: .labels}]" });
|
|
@@ -1795,15 +1810,16 @@ function describeError(err) {
|
|
|
1795
1810
|
}
|
|
1796
1811
|
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
1797
1812
|
function defaultPriorTrancheArchivalDeps() {
|
|
1798
|
-
let facts = new Map;
|
|
1799
1813
|
return {
|
|
1800
|
-
|
|
1801
|
-
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1814
|
+
activeTranches: async (excludeSlug, repo) => {
|
|
1815
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo, { retryFailedReads: true });
|
|
1816
|
+
return index.active.filter((m) => m.slug !== excludeSlug).map((m) => {
|
|
1817
|
+
const issues = index.issuesBySlug?.get(m.slug);
|
|
1818
|
+
if (!issues)
|
|
1819
|
+
throw new Error(`the Milestone index holds no Issue list for tranche \`${m.slug}\``);
|
|
1820
|
+
return { slug: m.slug, issues };
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1807
1823
|
};
|
|
1808
1824
|
}
|
|
1809
1825
|
function reason(err) {
|
|
@@ -1815,61 +1831,28 @@ async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = d
|
|
|
1815
1831
|
return { facts: [], infraFailure: null };
|
|
1816
1832
|
let candidates;
|
|
1817
1833
|
try {
|
|
1818
|
-
candidates = await deps.
|
|
1834
|
+
candidates = await deps.activeTranches(excludeSlug, repo);
|
|
1819
1835
|
} catch (err) {
|
|
1820
1836
|
return {
|
|
1821
1837
|
facts: [],
|
|
1822
1838
|
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
1823
1839
|
};
|
|
1824
1840
|
}
|
|
1841
|
+
const tasksBySlug = new Map(candidates.map((c) => [c.slug, tasksFromIssues(c.issues)]));
|
|
1825
1842
|
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
1843
|
for (const project of projects) {
|
|
1837
1844
|
let found = null;
|
|
1838
|
-
|
|
1839
|
-
|
|
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)))
|
|
1845
|
+
for (const { slug, issues } of candidates) {
|
|
1846
|
+
if (!(tasksBySlug.get(slug) ?? []).some((t) => t.projects.includes(project)))
|
|
1849
1847
|
continue;
|
|
1850
|
-
|
|
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) {
|
|
1848
|
+
if (!issues.some((issue) => issue.state === "OPEN")) {
|
|
1862
1849
|
found = { project, priorTrancheSlug: slug, archived: false };
|
|
1863
1850
|
break;
|
|
1864
1851
|
}
|
|
1865
1852
|
}
|
|
1866
|
-
|
|
1867
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1853
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1868
1854
|
}
|
|
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
|
-
};
|
|
1855
|
+
return { facts, infraFailure: null };
|
|
1873
1856
|
}
|
|
1874
1857
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
1875
1858
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
@@ -4998,7 +4981,17 @@ var HeaderMetaV3Schema = z3.object({
|
|
|
4998
4981
|
runtime: z3.string().nullable(),
|
|
4999
4982
|
source: z3.string().nullable()
|
|
5000
4983
|
}).strict();
|
|
5001
|
-
var
|
|
4984
|
+
var HeaderMetaV4Schema = HeaderMetaV3Schema.extend({
|
|
4985
|
+
schema: z3.literal(4),
|
|
4986
|
+
process: z3.object({ id: z3.string(), version: z3.string().nullable(), digest: z3.string().nullable() }).strict(),
|
|
4987
|
+
runner: z3.object({ id: z3.string(), version: z3.string().nullable() }).strict()
|
|
4988
|
+
}).strict();
|
|
4989
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [
|
|
4990
|
+
HeaderMetaV1Schema,
|
|
4991
|
+
HeaderMetaV2Schema,
|
|
4992
|
+
HeaderMetaV3Schema,
|
|
4993
|
+
HeaderMetaV4Schema
|
|
4994
|
+
]);
|
|
5002
4995
|
var SubjectSchema = z3.object({
|
|
5003
4996
|
issue: z3.number().int().nullable(),
|
|
5004
4997
|
pr: z3.number().int().optional(),
|
|
@@ -5218,6 +5211,75 @@ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
|
5218
5211
|
round: z3.number().int(),
|
|
5219
5212
|
phase: z3.string()
|
|
5220
5213
|
}).strict(),
|
|
5214
|
+
z3.object({
|
|
5215
|
+
...loopShared,
|
|
5216
|
+
event: z3.literal("conflict_reentry"),
|
|
5217
|
+
task: z3.number().int(),
|
|
5218
|
+
pr: z3.number().int().positive(),
|
|
5219
|
+
attempt: z3.number().int().positive(),
|
|
5220
|
+
bound: z3.number().int().positive()
|
|
5221
|
+
}).strict(),
|
|
5222
|
+
z3.object({
|
|
5223
|
+
...loopShared,
|
|
5224
|
+
event: z3.literal("storage_push"),
|
|
5225
|
+
round: z3.number().int(),
|
|
5226
|
+
branch: z3.string(),
|
|
5227
|
+
head: z3.string()
|
|
5228
|
+
}).strict(),
|
|
5229
|
+
z3.object({
|
|
5230
|
+
...loopShared,
|
|
5231
|
+
event: z3.literal("local_checks_run"),
|
|
5232
|
+
round: z3.number().int(),
|
|
5233
|
+
head: z3.string().nullable(),
|
|
5234
|
+
passed: z3.boolean(),
|
|
5235
|
+
wall_ms: z3.number().nonnegative()
|
|
5236
|
+
}).strict(),
|
|
5237
|
+
z3.object({
|
|
5238
|
+
...loopShared,
|
|
5239
|
+
event: z3.literal("ready_push"),
|
|
5240
|
+
round: z3.number().int(),
|
|
5241
|
+
head: z3.string(),
|
|
5242
|
+
outcome: z3.enum(["passed", "refused"]),
|
|
5243
|
+
selected: z3.number().int().nonnegative(),
|
|
5244
|
+
failed: z3.number().int().nonnegative(),
|
|
5245
|
+
rerun: z3.boolean(),
|
|
5246
|
+
wall_ms: z3.number().nonnegative()
|
|
5247
|
+
}).strict(),
|
|
5248
|
+
z3.object({
|
|
5249
|
+
...loopShared,
|
|
5250
|
+
event: z3.literal("failed_tests_rerun"),
|
|
5251
|
+
round: z3.number().int(),
|
|
5252
|
+
head: z3.string(),
|
|
5253
|
+
rerun_of: z3.string(),
|
|
5254
|
+
failed_files: z3.number().int().nonnegative(),
|
|
5255
|
+
affected_files: z3.number().int().nonnegative(),
|
|
5256
|
+
full_count: z3.number().int().nonnegative()
|
|
5257
|
+
}).strict(),
|
|
5258
|
+
z3.object({
|
|
5259
|
+
...loopShared,
|
|
5260
|
+
event: z3.literal("pr_opened"),
|
|
5261
|
+
round: z3.number().int(),
|
|
5262
|
+
pr: z3.number().int().positive(),
|
|
5263
|
+
head: z3.string()
|
|
5264
|
+
}).strict(),
|
|
5265
|
+
z3.object({
|
|
5266
|
+
...loopShared,
|
|
5267
|
+
event: z3.literal("ci_result_read"),
|
|
5268
|
+
round: z3.number().int(),
|
|
5269
|
+
pr: z3.number().int().positive(),
|
|
5270
|
+
head: z3.string(),
|
|
5271
|
+
conclusion: z3.enum(["green", "red", "pending", "skipped"]),
|
|
5272
|
+
failing_checks: z3.array(z3.string()),
|
|
5273
|
+
wait_ms: z3.number().nonnegative()
|
|
5274
|
+
}).strict(),
|
|
5275
|
+
z3.object({
|
|
5276
|
+
...loopShared,
|
|
5277
|
+
event: z3.literal("phase_time"),
|
|
5278
|
+
round: z3.number().int(),
|
|
5279
|
+
phase: z3.enum(["developer", "local_checks", "review", "push", "ci", "other"]),
|
|
5280
|
+
step: z3.string(),
|
|
5281
|
+
wall_ms: z3.number().nonnegative()
|
|
5282
|
+
}).strict(),
|
|
5221
5283
|
z3.object({
|
|
5222
5284
|
...loopShared,
|
|
5223
5285
|
event: z3.literal("driver_exited"),
|
|
@@ -5405,7 +5467,7 @@ var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
|
5405
5467
|
]);
|
|
5406
5468
|
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
5407
5469
|
var customShared = {
|
|
5408
|
-
meta:
|
|
5470
|
+
meta: HeaderMetaSchema,
|
|
5409
5471
|
subject: SubjectSchema,
|
|
5410
5472
|
kind: z3.literal("custom"),
|
|
5411
5473
|
...envelopeTail
|
|
@@ -5578,6 +5640,16 @@ var ResolutionRecordSchema = z4.object({
|
|
|
5578
5640
|
authenticatedFrom: z4.string().min(1),
|
|
5579
5641
|
consumedAt: isoTimestamp
|
|
5580
5642
|
}).strict();
|
|
5643
|
+
var ExecutionRoundMirrorRecordSchema = z4.object({
|
|
5644
|
+
version: z4.literal(1),
|
|
5645
|
+
kind: z4.literal("execution_round"),
|
|
5646
|
+
task: taskId,
|
|
5647
|
+
repository: z4.string().min(1),
|
|
5648
|
+
threadId: z4.string().min(1),
|
|
5649
|
+
checkpointId: z4.string().min(1),
|
|
5650
|
+
round: z4.number().int().positive(),
|
|
5651
|
+
recordedAt: isoTimestamp
|
|
5652
|
+
}).strict();
|
|
5581
5653
|
// ../../packages/aeg-core/src/principals-config.ts
|
|
5582
5654
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
5583
5655
|
import { join } from "node:path";
|
|
@@ -5605,8 +5677,31 @@ function readConfigPrincipals(repoRoot = ".") {
|
|
|
5605
5677
|
}
|
|
5606
5678
|
|
|
5607
5679
|
// ../../packages/aeg-core/bin/verify-dispatch.ts
|
|
5608
|
-
var
|
|
5680
|
+
var DISPATCH_INVOCATION_CWD = process.cwd();
|
|
5681
|
+
function resolveTargetRoot(cwd = process.cwd(), exec = execFileSync2) {
|
|
5682
|
+
const gitRoot = (candidate) => {
|
|
5683
|
+
try {
|
|
5684
|
+
const root = exec("git", ["-C", candidate, "rev-parse", "--show-toplevel"], {
|
|
5685
|
+
encoding: "utf8",
|
|
5686
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
5687
|
+
});
|
|
5688
|
+
return typeof root === "string" && root.trim() !== "" ? root.trim() : null;
|
|
5689
|
+
} catch {
|
|
5690
|
+
return null;
|
|
5691
|
+
}
|
|
5692
|
+
};
|
|
5693
|
+
return gitRoot(cwd) ?? gitRoot(import.meta.dirname) ?? join2(import.meta.dirname, "../../..");
|
|
5694
|
+
}
|
|
5695
|
+
var REPO_ROOT = resolveTargetRoot(DISPATCH_INVOCATION_CWD);
|
|
5609
5696
|
process.chdir(REPO_ROOT);
|
|
5697
|
+
async function resolveTargetRepository(repoRoot = REPO_ROOT, exec = execFileSync2) {
|
|
5698
|
+
return resolveRepo(async () => ({
|
|
5699
|
+
stdout: String(exec("git", ["-C", repoRoot, "remote", "get-url", "origin"], {
|
|
5700
|
+
encoding: "utf8",
|
|
5701
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
5702
|
+
}))
|
|
5703
|
+
}));
|
|
5704
|
+
}
|
|
5610
5705
|
function sh(cmd, args) {
|
|
5611
5706
|
try {
|
|
5612
5707
|
return execFileSync2(cmd, args, { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
@@ -5977,8 +6072,8 @@ function computeLeftoverForIssue(issueNumber) {
|
|
|
5977
6072
|
const branch = `task/issue-${issueNumber}`;
|
|
5978
6073
|
return computeLeftoverForBranch(branch, join2(REPO_ROOT, ".worktrees", branch));
|
|
5979
6074
|
}
|
|
5980
|
-
function captureStreams(cmd, args) {
|
|
5981
|
-
const result = spawnSync(cmd, args, { encoding: "utf8" });
|
|
6075
|
+
function captureStreams(cmd, args, repoRoot = REPO_ROOT) {
|
|
6076
|
+
const result = spawnSync(cmd, args, { encoding: "utf8", cwd: repoRoot });
|
|
5982
6077
|
if (result.error)
|
|
5983
6078
|
return { stdout: "", stderr: "", exitCode: -1, ranAtAll: false };
|
|
5984
6079
|
return {
|
|
@@ -6021,11 +6116,11 @@ function siblingTool(name) {
|
|
|
6021
6116
|
const built = join2(import.meta.dirname, `${name}.js`);
|
|
6022
6117
|
return existsSync(built) ? built : join2(import.meta.dirname, `${name}.ts`);
|
|
6023
6118
|
}
|
|
6024
|
-
function currentFindingCounts() {
|
|
6025
|
-
const docs = captureStreams("bun", [siblingTool("verify-docs")]);
|
|
6119
|
+
function currentFindingCounts(repoRoot = REPO_ROOT) {
|
|
6120
|
+
const docs = captureStreams("bun", [siblingTool("verify-docs")], repoRoot);
|
|
6026
6121
|
const docsFindingCount = docs.ranAtAll ? countErrorLines(`${docs.stdout}${docs.stderr}`) : 0;
|
|
6027
6122
|
const docsUnavailable = !docs.ranAtAll || docs.exitCode !== 0 && docsFindingCount === 0;
|
|
6028
|
-
const coherence = captureStreams("bun", [siblingTool("verify-coherence"), "--json"]);
|
|
6123
|
+
const coherence = captureStreams("bun", [siblingTool("verify-coherence"), "--json"], repoRoot);
|
|
6029
6124
|
const coherenceRead = coherence.ranAtAll ? coherenceFailedCount(coherence.stdout) : null;
|
|
6030
6125
|
const coherenceFailed = typeof coherenceRead === "number" ? coherenceRead : null;
|
|
6031
6126
|
const coherenceUnavailable = !coherence.ranAtAll || coherenceFailed === null;
|
|
@@ -6070,7 +6165,7 @@ function resolvePremiseBriefText(comments, issueNumber, principalAllowlist) {
|
|
|
6070
6165
|
}
|
|
6071
6166
|
async function runPremiseModeFromIssue(trancheSlug, taskId) {
|
|
6072
6167
|
const principalAllowlist = principalsOrExit(" --premise");
|
|
6073
|
-
const repo = await
|
|
6168
|
+
const repo = await resolveTargetRepository();
|
|
6074
6169
|
if (!repo) {
|
|
6075
6170
|
console.error("verify-dispatch --premise: could not resolve a GitHub repo (set AEG_REPO=owner/repo, or confirm `gh auth login`).");
|
|
6076
6171
|
process.exit(1);
|
|
@@ -6147,21 +6242,24 @@ function runSimulateMode(trancheSlug, taskId, bodyFile) {
|
|
|
6147
6242
|
const gates = [
|
|
6148
6243
|
[
|
|
6149
6244
|
"verify-brief",
|
|
6150
|
-
() => execFileSync2("bun", ["
|
|
6245
|
+
() => execFileSync2("bun", [siblingTool("verify-brief")], {
|
|
6246
|
+
cwd: REPO_ROOT,
|
|
6151
6247
|
env: { ...process.env, BRANCH: branch, PR_BODY: body },
|
|
6152
6248
|
stdio: "inherit"
|
|
6153
6249
|
})
|
|
6154
6250
|
],
|
|
6155
6251
|
[
|
|
6156
6252
|
"verify-docs --pr",
|
|
6157
|
-
() => execFileSync2("bun", ["
|
|
6253
|
+
() => execFileSync2("bun", [siblingTool("verify-docs"), "--pr"], {
|
|
6254
|
+
cwd: REPO_ROOT,
|
|
6158
6255
|
env: { ...process.env, PR_BODY: body },
|
|
6159
6256
|
stdio: "inherit"
|
|
6160
6257
|
})
|
|
6161
6258
|
],
|
|
6162
6259
|
[
|
|
6163
6260
|
"verify-docs --push (C5, via PR_BODY_FILE)",
|
|
6164
|
-
() => execFileSync2("bun", ["
|
|
6261
|
+
() => execFileSync2("bun", [siblingTool("verify-docs"), "--push"], {
|
|
6262
|
+
cwd: REPO_ROOT,
|
|
6165
6263
|
env: { ...process.env, PR_BODY_FILE: bodyFile },
|
|
6166
6264
|
stdio: "inherit"
|
|
6167
6265
|
})
|
|
@@ -6242,7 +6340,7 @@ verify-dispatch --check-baseline: within budget.`);
|
|
|
6242
6340
|
async function runGateMode(trancheSlug, taskId) {
|
|
6243
6341
|
const principalAllowlist = principalsOrExit("");
|
|
6244
6342
|
sh("git", ["fetch", "origin", "main", "--quiet"]);
|
|
6245
|
-
const repo = await
|
|
6343
|
+
const repo = await resolveTargetRepository();
|
|
6246
6344
|
const token = await resolveGithubToken();
|
|
6247
6345
|
if (!repo || !token) {
|
|
6248
6346
|
console.error("verify-dispatch severity:infra \u2014 could not resolve a GitHub repo/token (set AEG_REPO / GITHUB_TOKEN, or `gh auth login`). Cannot evaluate forge-dependent predicates.");
|
|
@@ -6317,7 +6415,7 @@ verify-dispatch: ${overallReady ? "READY TO DISPATCH" : "NOT READY"}`);
|
|
|
6317
6415
|
async function runGateModeForIssue(issueNumber) {
|
|
6318
6416
|
const principalAllowlist = principalsOrExit("");
|
|
6319
6417
|
sh("git", ["fetch", "origin", "main", "--quiet"]);
|
|
6320
|
-
const repo = await
|
|
6418
|
+
const repo = await resolveTargetRepository();
|
|
6321
6419
|
const token = await resolveGithubToken();
|
|
6322
6420
|
if (!repo || !token) {
|
|
6323
6421
|
console.error("verify-dispatch severity:infra \u2014 could not resolve a GitHub repo/token (set AEG_REPO / GITHUB_TOKEN, or `gh auth login`). Cannot evaluate forge-dependent predicates.");
|
|
@@ -6462,5 +6560,7 @@ export {
|
|
|
6462
6560
|
fetchIssueStatesBatch,
|
|
6463
6561
|
resolveConflictsWith,
|
|
6464
6562
|
resolveDependsOn,
|
|
6465
|
-
resolvePremiseBriefText
|
|
6563
|
+
resolvePremiseBriefText,
|
|
6564
|
+
resolveTargetRepository,
|
|
6565
|
+
resolveTargetRoot
|
|
6466
6566
|
};
|
|
@@ -1415,10 +1415,11 @@ function trancheSlugsFromLabels(labels) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
return slugs;
|
|
1417
1417
|
}
|
|
1418
|
-
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
1418
|
+
async function indexTrancheMilestonesAsync(owner, repo, options = {}) {
|
|
1419
|
+
const read = (fetch) => options.retryFailedReads ? retryOnce(fetch) : fetch();
|
|
1419
1420
|
const [milestones, labels] = await Promise.all([
|
|
1420
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
1421
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`)
|
|
1421
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`)),
|
|
1422
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`))
|
|
1422
1423
|
]);
|
|
1423
1424
|
const active = [];
|
|
1424
1425
|
const archived = [];
|
|
@@ -1429,9 +1430,16 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
1429
1430
|
const uniqueNewPathSlugs = [...new Set(newPathSlugs)];
|
|
1430
1431
|
const uniqueLegacySlugs = [...legacySlugs];
|
|
1431
1432
|
const [legacyIssuesBySlug, newPathIssuesBySlug] = await Promise.all([
|
|
1432
|
-
Promise.all(uniqueLegacySlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))),
|
|
1433
|
-
Promise.all(uniqueNewPathSlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))
|
|
1433
|
+
Promise.all(uniqueLegacySlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))),
|
|
1434
|
+
Promise.all(uniqueNewPathSlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))))
|
|
1434
1435
|
]);
|
|
1436
|
+
const issuesBySlug = new Map;
|
|
1437
|
+
uniqueLegacySlugs.forEach((slug, i) => {
|
|
1438
|
+
issuesBySlug.set(slug, legacyIssuesBySlug[i] ?? []);
|
|
1439
|
+
});
|
|
1440
|
+
uniqueNewPathSlugs.forEach((slug, i) => {
|
|
1441
|
+
issuesBySlug.set(slug, newPathIssuesBySlug[i] ?? []);
|
|
1442
|
+
});
|
|
1435
1443
|
uniqueLegacySlugs.forEach((slug, i) => {
|
|
1436
1444
|
const m = legacyMilestoneBySlug.get(slug);
|
|
1437
1445
|
if (!m)
|
|
@@ -1455,7 +1463,14 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
1455
1463
|
else if (lifecycle === "complete")
|
|
1456
1464
|
archived.push({ slug, goal });
|
|
1457
1465
|
});
|
|
1458
|
-
return { active, archived, facts, legacySlugs };
|
|
1466
|
+
return { active, archived, facts, legacySlugs, issuesBySlug };
|
|
1467
|
+
}
|
|
1468
|
+
async function retryOnce(fetch) {
|
|
1469
|
+
try {
|
|
1470
|
+
return await fetch();
|
|
1471
|
+
} catch {
|
|
1472
|
+
return fetch();
|
|
1473
|
+
}
|
|
1459
1474
|
}
|
|
1460
1475
|
async function tranchesAttachedToMilestone(owner, repo, milestoneNumber) {
|
|
1461
1476
|
const issues = await ghApiGetAllPagesAsync(`repos/${owner}/${repo}/issues?milestone=${milestoneNumber}&state=all`, { jq: "[.[] | {labels: .labels}]" });
|
|
@@ -2480,15 +2495,16 @@ function describeError(err) {
|
|
|
2480
2495
|
}
|
|
2481
2496
|
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
2482
2497
|
function defaultPriorTrancheArchivalDeps() {
|
|
2483
|
-
let facts = new Map;
|
|
2484
2498
|
return {
|
|
2485
|
-
|
|
2486
|
-
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2499
|
+
activeTranches: async (excludeSlug, repo) => {
|
|
2500
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo, { retryFailedReads: true });
|
|
2501
|
+
return index.active.filter((m) => m.slug !== excludeSlug).map((m) => {
|
|
2502
|
+
const issues = index.issuesBySlug?.get(m.slug);
|
|
2503
|
+
if (!issues)
|
|
2504
|
+
throw new Error(`the Milestone index holds no Issue list for tranche \`${m.slug}\``);
|
|
2505
|
+
return { slug: m.slug, issues };
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2492
2508
|
};
|
|
2493
2509
|
}
|
|
2494
2510
|
function reason(err) {
|
|
@@ -2500,61 +2516,28 @@ async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = d
|
|
|
2500
2516
|
return { facts: [], infraFailure: null };
|
|
2501
2517
|
let candidates;
|
|
2502
2518
|
try {
|
|
2503
|
-
candidates = await deps.
|
|
2519
|
+
candidates = await deps.activeTranches(excludeSlug, repo);
|
|
2504
2520
|
} catch (err) {
|
|
2505
2521
|
return {
|
|
2506
2522
|
facts: [],
|
|
2507
2523
|
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
2508
2524
|
};
|
|
2509
2525
|
}
|
|
2526
|
+
const tasksBySlug = new Map(candidates.map((c) => [c.slug, tasksFromIssues(c.issues)]));
|
|
2510
2527
|
const facts = [];
|
|
2511
|
-
const unreadable = [];
|
|
2512
|
-
const derived = new Map;
|
|
2513
|
-
const derive = (slug) => {
|
|
2514
|
-
let p = derived.get(slug);
|
|
2515
|
-
if (!p) {
|
|
2516
|
-
p = deps.deriveTranche(slug, repo);
|
|
2517
|
-
derived.set(slug, p);
|
|
2518
|
-
}
|
|
2519
|
-
return p;
|
|
2520
|
-
};
|
|
2521
2528
|
for (const project of projects) {
|
|
2522
2529
|
let found = null;
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
let candidateTranche;
|
|
2526
|
-
try {
|
|
2527
|
-
candidateTranche = await derive(slug);
|
|
2528
|
-
} catch {
|
|
2529
|
-
unknown = true;
|
|
2530
|
-
unreadable.push(`the tasks of tranche \`${slug}\` (project \`${project}\`)`);
|
|
2531
|
-
break;
|
|
2532
|
-
}
|
|
2533
|
-
if (!candidateTranche.tasks.some((t) => t.projects.includes(project)))
|
|
2530
|
+
for (const { slug, issues } of candidates) {
|
|
2531
|
+
if (!(tasksBySlug.get(slug) ?? []).some((t) => t.projects.includes(project)))
|
|
2534
2532
|
continue;
|
|
2535
|
-
|
|
2536
|
-
try {
|
|
2537
|
-
openIssues = await deps.openIssues(slug, repo);
|
|
2538
|
-
} catch {
|
|
2539
|
-
openIssues = null;
|
|
2540
|
-
}
|
|
2541
|
-
if (openIssues === null) {
|
|
2542
|
-
unknown = true;
|
|
2543
|
-
unreadable.push(`the open Issues of tranche \`${slug}\` (project \`${project}\`)`);
|
|
2544
|
-
break;
|
|
2545
|
-
}
|
|
2546
|
-
if (openIssues.length === 0) {
|
|
2533
|
+
if (!issues.some((issue) => issue.state === "OPEN")) {
|
|
2547
2534
|
found = { project, priorTrancheSlug: slug, archived: false };
|
|
2548
2535
|
break;
|
|
2549
2536
|
}
|
|
2550
2537
|
}
|
|
2551
|
-
|
|
2552
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
2538
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
2553
2539
|
}
|
|
2554
|
-
return {
|
|
2555
|
-
facts,
|
|
2556
|
-
infraFailure: unreadable.length === 0 ? null : `severity:infra — could not read ${unreadable.join(", ")}; whether a prior tranche is archived is unknown.`
|
|
2557
|
-
};
|
|
2540
|
+
return { facts, infraFailure: null };
|
|
2558
2541
|
}
|
|
2559
2542
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
2560
2543
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
@@ -5288,7 +5271,17 @@ var HeaderMetaV3Schema = z3.object({
|
|
|
5288
5271
|
runtime: z3.string().nullable(),
|
|
5289
5272
|
source: z3.string().nullable()
|
|
5290
5273
|
}).strict();
|
|
5291
|
-
var
|
|
5274
|
+
var HeaderMetaV4Schema = HeaderMetaV3Schema.extend({
|
|
5275
|
+
schema: z3.literal(4),
|
|
5276
|
+
process: z3.object({ id: z3.string(), version: z3.string().nullable(), digest: z3.string().nullable() }).strict(),
|
|
5277
|
+
runner: z3.object({ id: z3.string(), version: z3.string().nullable() }).strict()
|
|
5278
|
+
}).strict();
|
|
5279
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [
|
|
5280
|
+
HeaderMetaV1Schema,
|
|
5281
|
+
HeaderMetaV2Schema,
|
|
5282
|
+
HeaderMetaV3Schema,
|
|
5283
|
+
HeaderMetaV4Schema
|
|
5284
|
+
]);
|
|
5292
5285
|
var SubjectSchema = z3.object({
|
|
5293
5286
|
issue: z3.number().int().nullable(),
|
|
5294
5287
|
pr: z3.number().int().optional(),
|
|
@@ -5508,6 +5501,75 @@ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
|
5508
5501
|
round: z3.number().int(),
|
|
5509
5502
|
phase: z3.string()
|
|
5510
5503
|
}).strict(),
|
|
5504
|
+
z3.object({
|
|
5505
|
+
...loopShared,
|
|
5506
|
+
event: z3.literal("conflict_reentry"),
|
|
5507
|
+
task: z3.number().int(),
|
|
5508
|
+
pr: z3.number().int().positive(),
|
|
5509
|
+
attempt: z3.number().int().positive(),
|
|
5510
|
+
bound: z3.number().int().positive()
|
|
5511
|
+
}).strict(),
|
|
5512
|
+
z3.object({
|
|
5513
|
+
...loopShared,
|
|
5514
|
+
event: z3.literal("storage_push"),
|
|
5515
|
+
round: z3.number().int(),
|
|
5516
|
+
branch: z3.string(),
|
|
5517
|
+
head: z3.string()
|
|
5518
|
+
}).strict(),
|
|
5519
|
+
z3.object({
|
|
5520
|
+
...loopShared,
|
|
5521
|
+
event: z3.literal("local_checks_run"),
|
|
5522
|
+
round: z3.number().int(),
|
|
5523
|
+
head: z3.string().nullable(),
|
|
5524
|
+
passed: z3.boolean(),
|
|
5525
|
+
wall_ms: z3.number().nonnegative()
|
|
5526
|
+
}).strict(),
|
|
5527
|
+
z3.object({
|
|
5528
|
+
...loopShared,
|
|
5529
|
+
event: z3.literal("ready_push"),
|
|
5530
|
+
round: z3.number().int(),
|
|
5531
|
+
head: z3.string(),
|
|
5532
|
+
outcome: z3.enum(["passed", "refused"]),
|
|
5533
|
+
selected: z3.number().int().nonnegative(),
|
|
5534
|
+
failed: z3.number().int().nonnegative(),
|
|
5535
|
+
rerun: z3.boolean(),
|
|
5536
|
+
wall_ms: z3.number().nonnegative()
|
|
5537
|
+
}).strict(),
|
|
5538
|
+
z3.object({
|
|
5539
|
+
...loopShared,
|
|
5540
|
+
event: z3.literal("failed_tests_rerun"),
|
|
5541
|
+
round: z3.number().int(),
|
|
5542
|
+
head: z3.string(),
|
|
5543
|
+
rerun_of: z3.string(),
|
|
5544
|
+
failed_files: z3.number().int().nonnegative(),
|
|
5545
|
+
affected_files: z3.number().int().nonnegative(),
|
|
5546
|
+
full_count: z3.number().int().nonnegative()
|
|
5547
|
+
}).strict(),
|
|
5548
|
+
z3.object({
|
|
5549
|
+
...loopShared,
|
|
5550
|
+
event: z3.literal("pr_opened"),
|
|
5551
|
+
round: z3.number().int(),
|
|
5552
|
+
pr: z3.number().int().positive(),
|
|
5553
|
+
head: z3.string()
|
|
5554
|
+
}).strict(),
|
|
5555
|
+
z3.object({
|
|
5556
|
+
...loopShared,
|
|
5557
|
+
event: z3.literal("ci_result_read"),
|
|
5558
|
+
round: z3.number().int(),
|
|
5559
|
+
pr: z3.number().int().positive(),
|
|
5560
|
+
head: z3.string(),
|
|
5561
|
+
conclusion: z3.enum(["green", "red", "pending", "skipped"]),
|
|
5562
|
+
failing_checks: z3.array(z3.string()),
|
|
5563
|
+
wait_ms: z3.number().nonnegative()
|
|
5564
|
+
}).strict(),
|
|
5565
|
+
z3.object({
|
|
5566
|
+
...loopShared,
|
|
5567
|
+
event: z3.literal("phase_time"),
|
|
5568
|
+
round: z3.number().int(),
|
|
5569
|
+
phase: z3.enum(["developer", "local_checks", "review", "push", "ci", "other"]),
|
|
5570
|
+
step: z3.string(),
|
|
5571
|
+
wall_ms: z3.number().nonnegative()
|
|
5572
|
+
}).strict(),
|
|
5511
5573
|
z3.object({
|
|
5512
5574
|
...loopShared,
|
|
5513
5575
|
event: z3.literal("driver_exited"),
|
|
@@ -5695,7 +5757,7 @@ var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
|
5695
5757
|
]);
|
|
5696
5758
|
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
5697
5759
|
var customShared = {
|
|
5698
|
-
meta:
|
|
5760
|
+
meta: HeaderMetaSchema,
|
|
5699
5761
|
subject: SubjectSchema,
|
|
5700
5762
|
kind: z3.literal("custom"),
|
|
5701
5763
|
...envelopeTail
|
|
@@ -5868,6 +5930,16 @@ var ResolutionRecordSchema = z4.object({
|
|
|
5868
5930
|
authenticatedFrom: z4.string().min(1),
|
|
5869
5931
|
consumedAt: isoTimestamp
|
|
5870
5932
|
}).strict();
|
|
5933
|
+
var ExecutionRoundMirrorRecordSchema = z4.object({
|
|
5934
|
+
version: z4.literal(1),
|
|
5935
|
+
kind: z4.literal("execution_round"),
|
|
5936
|
+
task: taskId,
|
|
5937
|
+
repository: z4.string().min(1),
|
|
5938
|
+
threadId: z4.string().min(1),
|
|
5939
|
+
checkpointId: z4.string().min(1),
|
|
5940
|
+
round: z4.number().int().positive(),
|
|
5941
|
+
recordedAt: isoTimestamp
|
|
5942
|
+
}).strict();
|
|
5871
5943
|
// ../../packages/aeg-core/src/principals-config.ts
|
|
5872
5944
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
5873
5945
|
import { join } from "node:path";
|
|
@@ -5895,7 +5967,20 @@ function readConfigPrincipals(repoRoot = ".") {
|
|
|
5895
5967
|
}
|
|
5896
5968
|
|
|
5897
5969
|
// ../../packages/aeg-core/bin/verify-docs.ts
|
|
5898
|
-
var
|
|
5970
|
+
var DOCS_INVOCATION_CWD = process.cwd();
|
|
5971
|
+
var REPO_ROOT = (() => {
|
|
5972
|
+
for (const candidate of [DOCS_INVOCATION_CWD, import.meta.dirname]) {
|
|
5973
|
+
try {
|
|
5974
|
+
const root = execFileSync2("git", ["-C", candidate, "rev-parse", "--show-toplevel"], {
|
|
5975
|
+
encoding: "utf8",
|
|
5976
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
5977
|
+
}).trim();
|
|
5978
|
+
if (root !== "")
|
|
5979
|
+
return root;
|
|
5980
|
+
} catch {}
|
|
5981
|
+
}
|
|
5982
|
+
return join2(import.meta.dirname, "../../..");
|
|
5983
|
+
})();
|
|
5899
5984
|
process.chdir(REPO_ROOT);
|
|
5900
5985
|
var args = process.argv.slice(2);
|
|
5901
5986
|
var mode = args.includes("--pr") ? "pr" : args.includes("--push") ? "push" : "full";
|