@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
|
@@ -782,10 +782,11 @@ function trancheSlugsFromLabels(labels) {
|
|
|
782
782
|
}
|
|
783
783
|
return slugs;
|
|
784
784
|
}
|
|
785
|
-
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
785
|
+
async function indexTrancheMilestonesAsync(owner, repo, options = {}) {
|
|
786
|
+
const read = (fetch) => options.retryFailedReads ? retryOnce(fetch) : fetch();
|
|
786
787
|
const [milestones, labels] = await Promise.all([
|
|
787
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
788
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`)
|
|
788
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`)),
|
|
789
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`))
|
|
789
790
|
]);
|
|
790
791
|
const active = [];
|
|
791
792
|
const archived = [];
|
|
@@ -796,9 +797,16 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
796
797
|
const uniqueNewPathSlugs = [...new Set(newPathSlugs)];
|
|
797
798
|
const uniqueLegacySlugs = [...legacySlugs];
|
|
798
799
|
const [legacyIssuesBySlug, newPathIssuesBySlug] = await Promise.all([
|
|
799
|
-
Promise.all(uniqueLegacySlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))),
|
|
800
|
-
Promise.all(uniqueNewPathSlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))
|
|
800
|
+
Promise.all(uniqueLegacySlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))),
|
|
801
|
+
Promise.all(uniqueNewPathSlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))))
|
|
801
802
|
]);
|
|
803
|
+
const issuesBySlug = new Map;
|
|
804
|
+
uniqueLegacySlugs.forEach((slug, i) => {
|
|
805
|
+
issuesBySlug.set(slug, legacyIssuesBySlug[i] ?? []);
|
|
806
|
+
});
|
|
807
|
+
uniqueNewPathSlugs.forEach((slug, i) => {
|
|
808
|
+
issuesBySlug.set(slug, newPathIssuesBySlug[i] ?? []);
|
|
809
|
+
});
|
|
802
810
|
uniqueLegacySlugs.forEach((slug, i) => {
|
|
803
811
|
const m = legacyMilestoneBySlug.get(slug);
|
|
804
812
|
if (!m)
|
|
@@ -822,7 +830,14 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
822
830
|
else if (lifecycle === "complete")
|
|
823
831
|
archived.push({ slug, goal });
|
|
824
832
|
});
|
|
825
|
-
return { active, archived, facts, legacySlugs };
|
|
833
|
+
return { active, archived, facts, legacySlugs, issuesBySlug };
|
|
834
|
+
}
|
|
835
|
+
async function retryOnce(fetch) {
|
|
836
|
+
try {
|
|
837
|
+
return await fetch();
|
|
838
|
+
} catch {
|
|
839
|
+
return fetch();
|
|
840
|
+
}
|
|
826
841
|
}
|
|
827
842
|
async function indexTrancheMilestonesForSlugAsync(owner, repo, slug) {
|
|
828
843
|
const [milestones, labels, issues] = await Promise.all([
|
|
@@ -1867,15 +1882,16 @@ function describeError(err) {
|
|
|
1867
1882
|
}
|
|
1868
1883
|
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
1869
1884
|
function defaultPriorTrancheArchivalDeps() {
|
|
1870
|
-
let facts = new Map;
|
|
1871
1885
|
return {
|
|
1872
|
-
|
|
1873
|
-
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1886
|
+
activeTranches: async (excludeSlug, repo) => {
|
|
1887
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo, { retryFailedReads: true });
|
|
1888
|
+
return index.active.filter((m) => m.slug !== excludeSlug).map((m) => {
|
|
1889
|
+
const issues = index.issuesBySlug?.get(m.slug);
|
|
1890
|
+
if (!issues)
|
|
1891
|
+
throw new Error(`the Milestone index holds no Issue list for tranche \`${m.slug}\``);
|
|
1892
|
+
return { slug: m.slug, issues };
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1879
1895
|
};
|
|
1880
1896
|
}
|
|
1881
1897
|
function reason(err) {
|
|
@@ -1887,61 +1903,28 @@ async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = d
|
|
|
1887
1903
|
return { facts: [], infraFailure: null };
|
|
1888
1904
|
let candidates;
|
|
1889
1905
|
try {
|
|
1890
|
-
candidates = await deps.
|
|
1906
|
+
candidates = await deps.activeTranches(excludeSlug, repo);
|
|
1891
1907
|
} catch (err) {
|
|
1892
1908
|
return {
|
|
1893
1909
|
facts: [],
|
|
1894
1910
|
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
1895
1911
|
};
|
|
1896
1912
|
}
|
|
1913
|
+
const tasksBySlug = new Map(candidates.map((c) => [c.slug, tasksFromIssues(c.issues)]));
|
|
1897
1914
|
const facts = [];
|
|
1898
|
-
const unreadable = [];
|
|
1899
|
-
const derived = new Map;
|
|
1900
|
-
const derive = (slug) => {
|
|
1901
|
-
let p = derived.get(slug);
|
|
1902
|
-
if (!p) {
|
|
1903
|
-
p = deps.deriveTranche(slug, repo);
|
|
1904
|
-
derived.set(slug, p);
|
|
1905
|
-
}
|
|
1906
|
-
return p;
|
|
1907
|
-
};
|
|
1908
1915
|
for (const project of projects) {
|
|
1909
1916
|
let found = null;
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
let candidateTranche;
|
|
1913
|
-
try {
|
|
1914
|
-
candidateTranche = await derive(slug);
|
|
1915
|
-
} catch {
|
|
1916
|
-
unknown = true;
|
|
1917
|
-
unreadable.push(`the tasks of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1918
|
-
break;
|
|
1919
|
-
}
|
|
1920
|
-
if (!candidateTranche.tasks.some((t) => t.projects.includes(project)))
|
|
1917
|
+
for (const { slug, issues } of candidates) {
|
|
1918
|
+
if (!(tasksBySlug.get(slug) ?? []).some((t) => t.projects.includes(project)))
|
|
1921
1919
|
continue;
|
|
1922
|
-
|
|
1923
|
-
try {
|
|
1924
|
-
openIssues = await deps.openIssues(slug, repo);
|
|
1925
|
-
} catch {
|
|
1926
|
-
openIssues = null;
|
|
1927
|
-
}
|
|
1928
|
-
if (openIssues === null) {
|
|
1929
|
-
unknown = true;
|
|
1930
|
-
unreadable.push(`the open Issues of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1931
|
-
break;
|
|
1932
|
-
}
|
|
1933
|
-
if (openIssues.length === 0) {
|
|
1920
|
+
if (!issues.some((issue) => issue.state === "OPEN")) {
|
|
1934
1921
|
found = { project, priorTrancheSlug: slug, archived: false };
|
|
1935
1922
|
break;
|
|
1936
1923
|
}
|
|
1937
1924
|
}
|
|
1938
|
-
|
|
1939
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1925
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1940
1926
|
}
|
|
1941
|
-
return {
|
|
1942
|
-
facts,
|
|
1943
|
-
infraFailure: unreadable.length === 0 ? null : `severity:infra — could not read ${unreadable.join(", ")}; whether a prior tranche is archived is unknown.`
|
|
1944
|
-
};
|
|
1927
|
+
return { facts, infraFailure: null };
|
|
1945
1928
|
}
|
|
1946
1929
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
1947
1930
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
@@ -2767,11 +2750,13 @@ var CODE_REVIEW_SEVERITY_ORDER = ["BLOCKER", "MAJOR", "MINOR"];
|
|
|
2767
2750
|
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
2768
2751
|
var DEFAULT_MAX_ROUNDS = 3;
|
|
2769
2752
|
var DEFAULT_MAX_TASK_MINUTES = 180;
|
|
2753
|
+
var DEFAULT_READY_PUSH_TIMEOUT_MINUTES = 20;
|
|
2770
2754
|
var DEFAULT_REVIEW_POLICY = {
|
|
2771
2755
|
codeReviewThreshold: "BLOCKER",
|
|
2772
2756
|
securityThreshold: "HIGH",
|
|
2773
2757
|
maxRounds: DEFAULT_MAX_ROUNDS,
|
|
2774
|
-
maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES
|
|
2758
|
+
maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES,
|
|
2759
|
+
readyPushTimeoutMinutes: DEFAULT_READY_PUSH_TIMEOUT_MINUTES
|
|
2775
2760
|
};
|
|
2776
2761
|
var FILE_SHAPED_LOCATION = /\.[a-zA-Z0-9]{1,10}(:\d+)?\s*$/;
|
|
2777
2762
|
var PROSE_LOCATION_PATTERNS = [/\bpr\s*body\b/i, /\bcomment\b/i];
|
|
@@ -6960,7 +6945,17 @@ var HeaderMetaV3Schema = z3.object({
|
|
|
6960
6945
|
runtime: z3.string().nullable(),
|
|
6961
6946
|
source: z3.string().nullable()
|
|
6962
6947
|
}).strict();
|
|
6963
|
-
var
|
|
6948
|
+
var HeaderMetaV4Schema = HeaderMetaV3Schema.extend({
|
|
6949
|
+
schema: z3.literal(4),
|
|
6950
|
+
process: z3.object({ id: z3.string(), version: z3.string().nullable(), digest: z3.string().nullable() }).strict(),
|
|
6951
|
+
runner: z3.object({ id: z3.string(), version: z3.string().nullable() }).strict()
|
|
6952
|
+
}).strict();
|
|
6953
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [
|
|
6954
|
+
HeaderMetaV1Schema,
|
|
6955
|
+
HeaderMetaV2Schema,
|
|
6956
|
+
HeaderMetaV3Schema,
|
|
6957
|
+
HeaderMetaV4Schema
|
|
6958
|
+
]);
|
|
6964
6959
|
var SubjectSchema = z3.object({
|
|
6965
6960
|
issue: z3.number().int().nullable(),
|
|
6966
6961
|
pr: z3.number().int().optional(),
|
|
@@ -7180,6 +7175,75 @@ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
|
7180
7175
|
round: z3.number().int(),
|
|
7181
7176
|
phase: z3.string()
|
|
7182
7177
|
}).strict(),
|
|
7178
|
+
z3.object({
|
|
7179
|
+
...loopShared,
|
|
7180
|
+
event: z3.literal("conflict_reentry"),
|
|
7181
|
+
task: z3.number().int(),
|
|
7182
|
+
pr: z3.number().int().positive(),
|
|
7183
|
+
attempt: z3.number().int().positive(),
|
|
7184
|
+
bound: z3.number().int().positive()
|
|
7185
|
+
}).strict(),
|
|
7186
|
+
z3.object({
|
|
7187
|
+
...loopShared,
|
|
7188
|
+
event: z3.literal("storage_push"),
|
|
7189
|
+
round: z3.number().int(),
|
|
7190
|
+
branch: z3.string(),
|
|
7191
|
+
head: z3.string()
|
|
7192
|
+
}).strict(),
|
|
7193
|
+
z3.object({
|
|
7194
|
+
...loopShared,
|
|
7195
|
+
event: z3.literal("local_checks_run"),
|
|
7196
|
+
round: z3.number().int(),
|
|
7197
|
+
head: z3.string().nullable(),
|
|
7198
|
+
passed: z3.boolean(),
|
|
7199
|
+
wall_ms: z3.number().nonnegative()
|
|
7200
|
+
}).strict(),
|
|
7201
|
+
z3.object({
|
|
7202
|
+
...loopShared,
|
|
7203
|
+
event: z3.literal("ready_push"),
|
|
7204
|
+
round: z3.number().int(),
|
|
7205
|
+
head: z3.string(),
|
|
7206
|
+
outcome: z3.enum(["passed", "refused"]),
|
|
7207
|
+
selected: z3.number().int().nonnegative(),
|
|
7208
|
+
failed: z3.number().int().nonnegative(),
|
|
7209
|
+
rerun: z3.boolean(),
|
|
7210
|
+
wall_ms: z3.number().nonnegative()
|
|
7211
|
+
}).strict(),
|
|
7212
|
+
z3.object({
|
|
7213
|
+
...loopShared,
|
|
7214
|
+
event: z3.literal("failed_tests_rerun"),
|
|
7215
|
+
round: z3.number().int(),
|
|
7216
|
+
head: z3.string(),
|
|
7217
|
+
rerun_of: z3.string(),
|
|
7218
|
+
failed_files: z3.number().int().nonnegative(),
|
|
7219
|
+
affected_files: z3.number().int().nonnegative(),
|
|
7220
|
+
full_count: z3.number().int().nonnegative()
|
|
7221
|
+
}).strict(),
|
|
7222
|
+
z3.object({
|
|
7223
|
+
...loopShared,
|
|
7224
|
+
event: z3.literal("pr_opened"),
|
|
7225
|
+
round: z3.number().int(),
|
|
7226
|
+
pr: z3.number().int().positive(),
|
|
7227
|
+
head: z3.string()
|
|
7228
|
+
}).strict(),
|
|
7229
|
+
z3.object({
|
|
7230
|
+
...loopShared,
|
|
7231
|
+
event: z3.literal("ci_result_read"),
|
|
7232
|
+
round: z3.number().int(),
|
|
7233
|
+
pr: z3.number().int().positive(),
|
|
7234
|
+
head: z3.string(),
|
|
7235
|
+
conclusion: z3.enum(["green", "red", "pending", "skipped"]),
|
|
7236
|
+
failing_checks: z3.array(z3.string()),
|
|
7237
|
+
wait_ms: z3.number().nonnegative()
|
|
7238
|
+
}).strict(),
|
|
7239
|
+
z3.object({
|
|
7240
|
+
...loopShared,
|
|
7241
|
+
event: z3.literal("phase_time"),
|
|
7242
|
+
round: z3.number().int(),
|
|
7243
|
+
phase: z3.enum(["developer", "local_checks", "review", "push", "ci", "other"]),
|
|
7244
|
+
step: z3.string(),
|
|
7245
|
+
wall_ms: z3.number().nonnegative()
|
|
7246
|
+
}).strict(),
|
|
7183
7247
|
z3.object({
|
|
7184
7248
|
...loopShared,
|
|
7185
7249
|
event: z3.literal("driver_exited"),
|
|
@@ -7367,7 +7431,7 @@ var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
|
7367
7431
|
]);
|
|
7368
7432
|
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
7369
7433
|
var customShared = {
|
|
7370
|
-
meta:
|
|
7434
|
+
meta: HeaderMetaSchema,
|
|
7371
7435
|
subject: SubjectSchema,
|
|
7372
7436
|
kind: z3.literal("custom"),
|
|
7373
7437
|
...envelopeTail
|
|
@@ -7452,7 +7516,7 @@ function buildHeader(input) {
|
|
|
7452
7516
|
const issue = subject.issue;
|
|
7453
7517
|
return {
|
|
7454
7518
|
meta: {
|
|
7455
|
-
schema:
|
|
7519
|
+
schema: 4,
|
|
7456
7520
|
ts: input.now.toISOString(),
|
|
7457
7521
|
run_id: input.runId,
|
|
7458
7522
|
seq: input.seq,
|
|
@@ -7489,6 +7553,15 @@ function buildHeader(input) {
|
|
|
7489
7553
|
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
7490
7554
|
},
|
|
7491
7555
|
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
7556
|
+
process: {
|
|
7557
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
7558
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
7559
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
7560
|
+
},
|
|
7561
|
+
runner: {
|
|
7562
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
7563
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
7564
|
+
},
|
|
7492
7565
|
source: lineageFieldFromEnv(input.env.source)
|
|
7493
7566
|
},
|
|
7494
7567
|
subject
|
|
@@ -7532,7 +7605,7 @@ function redact(value, home) {
|
|
|
7532
7605
|
return value;
|
|
7533
7606
|
}
|
|
7534
7607
|
// ../../packages/aeg-core/src/log/store.ts
|
|
7535
|
-
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
|
|
7608
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3, 4];
|
|
7536
7609
|
function metaOf(obj) {
|
|
7537
7610
|
if (obj === null || typeof obj !== "object")
|
|
7538
7611
|
return null;
|
|
@@ -7756,14 +7829,24 @@ var ResolutionRecordSchema = z4.object({
|
|
|
7756
7829
|
authenticatedFrom: z4.string().min(1),
|
|
7757
7830
|
consumedAt: isoTimestamp
|
|
7758
7831
|
}).strict();
|
|
7832
|
+
var ExecutionRoundMirrorRecordSchema = z4.object({
|
|
7833
|
+
version: z4.literal(1),
|
|
7834
|
+
kind: z4.literal("execution_round"),
|
|
7835
|
+
task: taskId,
|
|
7836
|
+
repository: z4.string().min(1),
|
|
7837
|
+
threadId: z4.string().min(1),
|
|
7838
|
+
checkpointId: z4.string().min(1),
|
|
7839
|
+
round: z4.number().int().positive(),
|
|
7840
|
+
recordedAt: isoTimestamp
|
|
7841
|
+
}).strict();
|
|
7759
7842
|
// ../../packages/aeg-core/src/control-store/local.ts
|
|
7760
7843
|
var CONTROL_AREA_DIRNAME = "control";
|
|
7761
7844
|
// src/lib/config.ts
|
|
7762
7845
|
import { execFile as execFile4, execFileSync as execFileSync2 } from "node:child_process";
|
|
7763
7846
|
import { promisify as promisify4 } from "node:util";
|
|
7764
|
-
import { existsSync, mkdirSync, readFileSync as readFileSync2, realpathSync as realpathSync2, writeFileSync } from "node:fs";
|
|
7847
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync as readFileSync2, realpathSync as realpathSync2, writeFileSync } from "node:fs";
|
|
7765
7848
|
import { homedir } from "node:os";
|
|
7766
|
-
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
7849
|
+
import { basename as basename3, dirname, isAbsolute, join, resolve } from "node:path";
|
|
7767
7850
|
import { z as z6 } from "zod";
|
|
7768
7851
|
|
|
7769
7852
|
// src/checks/contract.ts
|
|
@@ -8226,7 +8309,8 @@ var VinayaConfigObjectSchema = z6.object({
|
|
|
8226
8309
|
codeReviewThreshold: z6.string().min(1).optional(),
|
|
8227
8310
|
securityThreshold: z6.string().min(1).optional(),
|
|
8228
8311
|
maxRounds: z6.number().optional(),
|
|
8229
|
-
maxTaskMinutes: z6.number().optional()
|
|
8312
|
+
maxTaskMinutes: z6.number().optional(),
|
|
8313
|
+
readyPushTimeoutMinutes: z6.number().optional()
|
|
8230
8314
|
}).optional(),
|
|
8231
8315
|
securityScan: z6.object({
|
|
8232
8316
|
command: z6.array(z6.string().min(1)).min(1)
|
|
@@ -8242,7 +8326,16 @@ var VinayaConfigObjectSchema = z6.object({
|
|
|
8242
8326
|
collisionThreshold: z6.number().int().nonnegative().optional()
|
|
8243
8327
|
}).optional(),
|
|
8244
8328
|
prePush: z6.object({
|
|
8245
|
-
alwaysRun: z6.array(z6.string()).optional()
|
|
8329
|
+
alwaysRun: z6.array(z6.string()).optional(),
|
|
8330
|
+
readyTests: z6.object({
|
|
8331
|
+
mode: z6.literal("ci"),
|
|
8332
|
+
workflow: z6.literal(".github/workflows/ci.yml"),
|
|
8333
|
+
check: z6.literal("Vinaya CI")
|
|
8334
|
+
}).strict().optional(),
|
|
8335
|
+
requiredCi: z6.object({
|
|
8336
|
+
workflow: z6.literal(".github/workflows/ci.yml"),
|
|
8337
|
+
check: z6.literal("Vinaya CI")
|
|
8338
|
+
}).strict().optional()
|
|
8246
8339
|
}).optional(),
|
|
8247
8340
|
report: z6.object({
|
|
8248
8341
|
commandTimeoutMs: z6.number().int().positive().optional()
|
|
@@ -8260,6 +8353,7 @@ var VinayaConfigObjectSchema = z6.object({
|
|
|
8260
8353
|
message: "logPublish is removed — telemetry is never posted to a tracker or a code host; configure `logs` instead (a folder or a server destination)"
|
|
8261
8354
|
}),
|
|
8262
8355
|
runtimeDir: z6.string().min(1).refine((v) => isAbsolute(v), { message: "runtimeDir: must be an absolute path" }).optional(),
|
|
8356
|
+
runner: z6.enum(["standalone", "atta-engine"]).optional(),
|
|
8263
8357
|
logs: z6.object({
|
|
8264
8358
|
folder: z6.string().min(1).refine((v) => isAbsolute(v), { message: "logs.folder: must be an absolute path" }).optional(),
|
|
8265
8359
|
url: z6.string().url().optional(),
|
|
@@ -8272,7 +8366,7 @@ var VinayaConfigObjectSchema = z6.object({
|
|
|
8272
8366
|
message: "logs: headers requires url"
|
|
8273
8367
|
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
8274
8368
|
message: "logs: readHeaders requires url"
|
|
8275
|
-
}).optional(),
|
|
8369
|
+
}).or(z6.literal(false)).optional(),
|
|
8276
8370
|
decisionRecords: z6.object({
|
|
8277
8371
|
path: RepoRelativePathSchema
|
|
8278
8372
|
}).strict().optional()
|
|
@@ -8402,13 +8496,19 @@ function resolveReviewPolicy(config) {
|
|
|
8402
8496
|
if (!Number.isInteger(maxTaskMinutes) || maxTaskMinutes < 0) {
|
|
8403
8497
|
throw new Error(`vinaya.config.json: reviewPolicy.maxTaskMinutes "${maxTaskMinutes}" is not a non-negative integer (0 turns the budget off) — fix the config, this never falls back to a default.`);
|
|
8404
8498
|
}
|
|
8499
|
+
const readyPushTimeoutMinutes = raw.readyPushTimeoutMinutes ?? DEFAULT_READY_PUSH_TIMEOUT_MINUTES;
|
|
8500
|
+
if (!Number.isInteger(readyPushTimeoutMinutes) || readyPushTimeoutMinutes < 1) {
|
|
8501
|
+
throw new Error(`vinaya.config.json: reviewPolicy.readyPushTimeoutMinutes "${readyPushTimeoutMinutes}" is not a positive integer — fix the config, this never falls back to a default.`);
|
|
8502
|
+
}
|
|
8405
8503
|
return {
|
|
8406
8504
|
codeReviewThreshold,
|
|
8407
8505
|
securityThreshold,
|
|
8408
8506
|
maxRounds,
|
|
8409
|
-
maxTaskMinutes
|
|
8507
|
+
maxTaskMinutes,
|
|
8508
|
+
readyPushTimeoutMinutes
|
|
8410
8509
|
};
|
|
8411
8510
|
}
|
|
8511
|
+
var emittedLocalOverrideWarnings = new Set;
|
|
8412
8512
|
function resolveGateCutovers(config) {
|
|
8413
8513
|
const raw = config?.gateCutovers;
|
|
8414
8514
|
if (!raw)
|