@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
|
@@ -777,10 +777,11 @@ function trancheSlugsFromLabels(labels) {
|
|
|
777
777
|
}
|
|
778
778
|
return slugs;
|
|
779
779
|
}
|
|
780
|
-
async function indexTrancheMilestonesAsync(owner, repo) {
|
|
780
|
+
async function indexTrancheMilestonesAsync(owner, repo, options = {}) {
|
|
781
|
+
const read = (fetch) => options.retryFailedReads ? retryOnce(fetch) : fetch();
|
|
781
782
|
const [milestones, labels] = await Promise.all([
|
|
782
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`),
|
|
783
|
-
ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`)
|
|
783
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/milestones?state=all&per_page=100`)),
|
|
784
|
+
read(() => ghApiGetAllPagesAsync(`repos/${owner}/${repo}/labels?per_page=100`))
|
|
784
785
|
]);
|
|
785
786
|
const active = [];
|
|
786
787
|
const archived = [];
|
|
@@ -791,9 +792,16 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
791
792
|
const uniqueNewPathSlugs = [...new Set(newPathSlugs)];
|
|
792
793
|
const uniqueLegacySlugs = [...legacySlugs];
|
|
793
794
|
const [legacyIssuesBySlug, newPathIssuesBySlug] = await Promise.all([
|
|
794
|
-
Promise.all(uniqueLegacySlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))),
|
|
795
|
-
Promise.all(uniqueNewPathSlugs.map((slug) => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))
|
|
795
|
+
Promise.all(uniqueLegacySlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug))))),
|
|
796
|
+
Promise.all(uniqueNewPathSlugs.map((slug) => read(() => ghIssueListByLabelAsync(owner, repo, trancheLabel(slug)))))
|
|
796
797
|
]);
|
|
798
|
+
const issuesBySlug = new Map;
|
|
799
|
+
uniqueLegacySlugs.forEach((slug, i) => {
|
|
800
|
+
issuesBySlug.set(slug, legacyIssuesBySlug[i] ?? []);
|
|
801
|
+
});
|
|
802
|
+
uniqueNewPathSlugs.forEach((slug, i) => {
|
|
803
|
+
issuesBySlug.set(slug, newPathIssuesBySlug[i] ?? []);
|
|
804
|
+
});
|
|
797
805
|
uniqueLegacySlugs.forEach((slug, i) => {
|
|
798
806
|
const m = legacyMilestoneBySlug.get(slug);
|
|
799
807
|
if (!m)
|
|
@@ -817,7 +825,14 @@ async function indexTrancheMilestonesAsync(owner, repo) {
|
|
|
817
825
|
else if (lifecycle === "complete")
|
|
818
826
|
archived.push({ slug, goal });
|
|
819
827
|
});
|
|
820
|
-
return { active, archived, facts, legacySlugs };
|
|
828
|
+
return { active, archived, facts, legacySlugs, issuesBySlug };
|
|
829
|
+
}
|
|
830
|
+
async function retryOnce(fetch) {
|
|
831
|
+
try {
|
|
832
|
+
return await fetch();
|
|
833
|
+
} catch {
|
|
834
|
+
return fetch();
|
|
835
|
+
}
|
|
821
836
|
}
|
|
822
837
|
async function indexTrancheMilestonesForSlugAsync(owner, repo, slug) {
|
|
823
838
|
const [milestones, labels, issues] = await Promise.all([
|
|
@@ -1862,15 +1877,16 @@ function describeError(err) {
|
|
|
1862
1877
|
}
|
|
1863
1878
|
// ../../packages/aeg-forge-state/src/prior-tranche-archival.ts
|
|
1864
1879
|
function defaultPriorTrancheArchivalDeps() {
|
|
1865
|
-
let facts = new Map;
|
|
1866
1880
|
return {
|
|
1867
|
-
|
|
1868
|
-
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo);
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1881
|
+
activeTranches: async (excludeSlug, repo) => {
|
|
1882
|
+
const index = await indexTrancheMilestonesAsync(repo.owner, repo.repo, { retryFailedReads: true });
|
|
1883
|
+
return index.active.filter((m) => m.slug !== excludeSlug).map((m) => {
|
|
1884
|
+
const issues = index.issuesBySlug?.get(m.slug);
|
|
1885
|
+
if (!issues)
|
|
1886
|
+
throw new Error(`the Milestone index holds no Issue list for tranche \`${m.slug}\``);
|
|
1887
|
+
return { slug: m.slug, issues };
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1874
1890
|
};
|
|
1875
1891
|
}
|
|
1876
1892
|
function reason(err) {
|
|
@@ -1882,61 +1898,28 @@ async function resolvePriorTrancheArchival(projects, excludeSlug, repo, deps = d
|
|
|
1882
1898
|
return { facts: [], infraFailure: null };
|
|
1883
1899
|
let candidates;
|
|
1884
1900
|
try {
|
|
1885
|
-
candidates = await deps.
|
|
1901
|
+
candidates = await deps.activeTranches(excludeSlug, repo);
|
|
1886
1902
|
} catch (err) {
|
|
1887
1903
|
return {
|
|
1888
1904
|
facts: [],
|
|
1889
1905
|
infraFailure: `severity:infra — could not read the active tranches (${reason(err)}); whether a prior tranche is archived is unknown.`
|
|
1890
1906
|
};
|
|
1891
1907
|
}
|
|
1908
|
+
const tasksBySlug = new Map(candidates.map((c) => [c.slug, tasksFromIssues(c.issues)]));
|
|
1892
1909
|
const facts = [];
|
|
1893
|
-
const unreadable = [];
|
|
1894
|
-
const derived = new Map;
|
|
1895
|
-
const derive = (slug) => {
|
|
1896
|
-
let p = derived.get(slug);
|
|
1897
|
-
if (!p) {
|
|
1898
|
-
p = deps.deriveTranche(slug, repo);
|
|
1899
|
-
derived.set(slug, p);
|
|
1900
|
-
}
|
|
1901
|
-
return p;
|
|
1902
|
-
};
|
|
1903
1910
|
for (const project of projects) {
|
|
1904
1911
|
let found = null;
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
let candidateTranche;
|
|
1908
|
-
try {
|
|
1909
|
-
candidateTranche = await derive(slug);
|
|
1910
|
-
} catch {
|
|
1911
|
-
unknown = true;
|
|
1912
|
-
unreadable.push(`the tasks of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1913
|
-
break;
|
|
1914
|
-
}
|
|
1915
|
-
if (!candidateTranche.tasks.some((t) => t.projects.includes(project)))
|
|
1912
|
+
for (const { slug, issues } of candidates) {
|
|
1913
|
+
if (!(tasksBySlug.get(slug) ?? []).some((t) => t.projects.includes(project)))
|
|
1916
1914
|
continue;
|
|
1917
|
-
|
|
1918
|
-
try {
|
|
1919
|
-
openIssues = await deps.openIssues(slug, repo);
|
|
1920
|
-
} catch {
|
|
1921
|
-
openIssues = null;
|
|
1922
|
-
}
|
|
1923
|
-
if (openIssues === null) {
|
|
1924
|
-
unknown = true;
|
|
1925
|
-
unreadable.push(`the open Issues of tranche \`${slug}\` (project \`${project}\`)`);
|
|
1926
|
-
break;
|
|
1927
|
-
}
|
|
1928
|
-
if (openIssues.length === 0) {
|
|
1915
|
+
if (!issues.some((issue) => issue.state === "OPEN")) {
|
|
1929
1916
|
found = { project, priorTrancheSlug: slug, archived: false };
|
|
1930
1917
|
break;
|
|
1931
1918
|
}
|
|
1932
1919
|
}
|
|
1933
|
-
|
|
1934
|
-
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1920
|
+
facts.push(found ?? { project, priorTrancheSlug: null, archived: false });
|
|
1935
1921
|
}
|
|
1936
|
-
return {
|
|
1937
|
-
facts,
|
|
1938
|
-
infraFailure: unreadable.length === 0 ? null : `severity:infra — could not read ${unreadable.join(", ")}; whether a prior tranche is archived is unknown.`
|
|
1939
|
-
};
|
|
1922
|
+
return { facts, infraFailure: null };
|
|
1940
1923
|
}
|
|
1941
1924
|
// ../../packages/aeg-forge-state/src/fetch-open-issues.ts
|
|
1942
1925
|
async function fetchOpenIssuesByLabel(slugs, owner, repo, token) {
|
|
@@ -2762,11 +2745,13 @@ var CODE_REVIEW_SEVERITY_ORDER = ["BLOCKER", "MAJOR", "MINOR"];
|
|
|
2762
2745
|
var SECURITY_SEVERITY_ORDER = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
|
|
2763
2746
|
var DEFAULT_MAX_ROUNDS = 3;
|
|
2764
2747
|
var DEFAULT_MAX_TASK_MINUTES = 180;
|
|
2748
|
+
var DEFAULT_READY_PUSH_TIMEOUT_MINUTES = 20;
|
|
2765
2749
|
var DEFAULT_REVIEW_POLICY = {
|
|
2766
2750
|
codeReviewThreshold: "BLOCKER",
|
|
2767
2751
|
securityThreshold: "HIGH",
|
|
2768
2752
|
maxRounds: DEFAULT_MAX_ROUNDS,
|
|
2769
|
-
maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES
|
|
2753
|
+
maxTaskMinutes: DEFAULT_MAX_TASK_MINUTES,
|
|
2754
|
+
readyPushTimeoutMinutes: DEFAULT_READY_PUSH_TIMEOUT_MINUTES
|
|
2770
2755
|
};
|
|
2771
2756
|
var FILE_SHAPED_LOCATION = /\.[a-zA-Z0-9]{1,10}(:\d+)?\s*$/;
|
|
2772
2757
|
var PROSE_LOCATION_PATTERNS = [/\bpr\s*body\b/i, /\bcomment\b/i];
|
|
@@ -6955,7 +6940,17 @@ var HeaderMetaV3Schema = z3.object({
|
|
|
6955
6940
|
runtime: z3.string().nullable(),
|
|
6956
6941
|
source: z3.string().nullable()
|
|
6957
6942
|
}).strict();
|
|
6958
|
-
var
|
|
6943
|
+
var HeaderMetaV4Schema = HeaderMetaV3Schema.extend({
|
|
6944
|
+
schema: z3.literal(4),
|
|
6945
|
+
process: z3.object({ id: z3.string(), version: z3.string().nullable(), digest: z3.string().nullable() }).strict(),
|
|
6946
|
+
runner: z3.object({ id: z3.string(), version: z3.string().nullable() }).strict()
|
|
6947
|
+
}).strict();
|
|
6948
|
+
var HeaderMetaSchema = z3.discriminatedUnion("schema", [
|
|
6949
|
+
HeaderMetaV1Schema,
|
|
6950
|
+
HeaderMetaV2Schema,
|
|
6951
|
+
HeaderMetaV3Schema,
|
|
6952
|
+
HeaderMetaV4Schema
|
|
6953
|
+
]);
|
|
6959
6954
|
var SubjectSchema = z3.object({
|
|
6960
6955
|
issue: z3.number().int().nullable(),
|
|
6961
6956
|
pr: z3.number().int().optional(),
|
|
@@ -7175,6 +7170,75 @@ var DevReviewLoopEventSchema = z3.discriminatedUnion("event", [
|
|
|
7175
7170
|
round: z3.number().int(),
|
|
7176
7171
|
phase: z3.string()
|
|
7177
7172
|
}).strict(),
|
|
7173
|
+
z3.object({
|
|
7174
|
+
...loopShared,
|
|
7175
|
+
event: z3.literal("conflict_reentry"),
|
|
7176
|
+
task: z3.number().int(),
|
|
7177
|
+
pr: z3.number().int().positive(),
|
|
7178
|
+
attempt: z3.number().int().positive(),
|
|
7179
|
+
bound: z3.number().int().positive()
|
|
7180
|
+
}).strict(),
|
|
7181
|
+
z3.object({
|
|
7182
|
+
...loopShared,
|
|
7183
|
+
event: z3.literal("storage_push"),
|
|
7184
|
+
round: z3.number().int(),
|
|
7185
|
+
branch: z3.string(),
|
|
7186
|
+
head: z3.string()
|
|
7187
|
+
}).strict(),
|
|
7188
|
+
z3.object({
|
|
7189
|
+
...loopShared,
|
|
7190
|
+
event: z3.literal("local_checks_run"),
|
|
7191
|
+
round: z3.number().int(),
|
|
7192
|
+
head: z3.string().nullable(),
|
|
7193
|
+
passed: z3.boolean(),
|
|
7194
|
+
wall_ms: z3.number().nonnegative()
|
|
7195
|
+
}).strict(),
|
|
7196
|
+
z3.object({
|
|
7197
|
+
...loopShared,
|
|
7198
|
+
event: z3.literal("ready_push"),
|
|
7199
|
+
round: z3.number().int(),
|
|
7200
|
+
head: z3.string(),
|
|
7201
|
+
outcome: z3.enum(["passed", "refused"]),
|
|
7202
|
+
selected: z3.number().int().nonnegative(),
|
|
7203
|
+
failed: z3.number().int().nonnegative(),
|
|
7204
|
+
rerun: z3.boolean(),
|
|
7205
|
+
wall_ms: z3.number().nonnegative()
|
|
7206
|
+
}).strict(),
|
|
7207
|
+
z3.object({
|
|
7208
|
+
...loopShared,
|
|
7209
|
+
event: z3.literal("failed_tests_rerun"),
|
|
7210
|
+
round: z3.number().int(),
|
|
7211
|
+
head: z3.string(),
|
|
7212
|
+
rerun_of: z3.string(),
|
|
7213
|
+
failed_files: z3.number().int().nonnegative(),
|
|
7214
|
+
affected_files: z3.number().int().nonnegative(),
|
|
7215
|
+
full_count: z3.number().int().nonnegative()
|
|
7216
|
+
}).strict(),
|
|
7217
|
+
z3.object({
|
|
7218
|
+
...loopShared,
|
|
7219
|
+
event: z3.literal("pr_opened"),
|
|
7220
|
+
round: z3.number().int(),
|
|
7221
|
+
pr: z3.number().int().positive(),
|
|
7222
|
+
head: z3.string()
|
|
7223
|
+
}).strict(),
|
|
7224
|
+
z3.object({
|
|
7225
|
+
...loopShared,
|
|
7226
|
+
event: z3.literal("ci_result_read"),
|
|
7227
|
+
round: z3.number().int(),
|
|
7228
|
+
pr: z3.number().int().positive(),
|
|
7229
|
+
head: z3.string(),
|
|
7230
|
+
conclusion: z3.enum(["green", "red", "pending", "skipped"]),
|
|
7231
|
+
failing_checks: z3.array(z3.string()),
|
|
7232
|
+
wait_ms: z3.number().nonnegative()
|
|
7233
|
+
}).strict(),
|
|
7234
|
+
z3.object({
|
|
7235
|
+
...loopShared,
|
|
7236
|
+
event: z3.literal("phase_time"),
|
|
7237
|
+
round: z3.number().int(),
|
|
7238
|
+
phase: z3.enum(["developer", "local_checks", "review", "push", "ci", "other"]),
|
|
7239
|
+
step: z3.string(),
|
|
7240
|
+
wall_ms: z3.number().nonnegative()
|
|
7241
|
+
}).strict(),
|
|
7178
7242
|
z3.object({
|
|
7179
7243
|
...loopShared,
|
|
7180
7244
|
event: z3.literal("driver_exited"),
|
|
@@ -7362,7 +7426,7 @@ var EffectEventSchema = z3.discriminatedUnion("event", [
|
|
|
7362
7426
|
]);
|
|
7363
7427
|
var CustomFieldValueSchema = z3.union([z3.string().max(CUSTOM_TEXT_MAX_LENGTH), z3.number().finite(), z3.boolean()]);
|
|
7364
7428
|
var customShared = {
|
|
7365
|
-
meta:
|
|
7429
|
+
meta: HeaderMetaSchema,
|
|
7366
7430
|
subject: SubjectSchema,
|
|
7367
7431
|
kind: z3.literal("custom"),
|
|
7368
7432
|
...envelopeTail
|
|
@@ -7447,7 +7511,7 @@ function buildHeader(input) {
|
|
|
7447
7511
|
const issue = subject.issue;
|
|
7448
7512
|
return {
|
|
7449
7513
|
meta: {
|
|
7450
|
-
schema:
|
|
7514
|
+
schema: 4,
|
|
7451
7515
|
ts: input.now.toISOString(),
|
|
7452
7516
|
run_id: input.runId,
|
|
7453
7517
|
seq: input.seq,
|
|
@@ -7484,6 +7548,15 @@ function buildHeader(input) {
|
|
|
7484
7548
|
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
7485
7549
|
},
|
|
7486
7550
|
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
7551
|
+
process: {
|
|
7552
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
7553
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
7554
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
7555
|
+
},
|
|
7556
|
+
runner: {
|
|
7557
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
7558
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
7559
|
+
},
|
|
7487
7560
|
source: lineageFieldFromEnv(input.env.source)
|
|
7488
7561
|
},
|
|
7489
7562
|
subject
|
|
@@ -7527,7 +7600,7 @@ function redact(value, home) {
|
|
|
7527
7600
|
return value;
|
|
7528
7601
|
}
|
|
7529
7602
|
// ../../packages/aeg-core/src/log/store.ts
|
|
7530
|
-
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3];
|
|
7603
|
+
var KNOWN_SCHEMA_VERSIONS = [1, 2, 3, 4];
|
|
7531
7604
|
function metaOf(obj) {
|
|
7532
7605
|
if (obj === null || typeof obj !== "object")
|
|
7533
7606
|
return null;
|
|
@@ -7751,13 +7824,23 @@ var ResolutionRecordSchema = z4.object({
|
|
|
7751
7824
|
authenticatedFrom: z4.string().min(1),
|
|
7752
7825
|
consumedAt: isoTimestamp
|
|
7753
7826
|
}).strict();
|
|
7827
|
+
var ExecutionRoundMirrorRecordSchema = z4.object({
|
|
7828
|
+
version: z4.literal(1),
|
|
7829
|
+
kind: z4.literal("execution_round"),
|
|
7830
|
+
task: taskId,
|
|
7831
|
+
repository: z4.string().min(1),
|
|
7832
|
+
threadId: z4.string().min(1),
|
|
7833
|
+
checkpointId: z4.string().min(1),
|
|
7834
|
+
round: z4.number().int().positive(),
|
|
7835
|
+
recordedAt: isoTimestamp
|
|
7836
|
+
}).strict();
|
|
7754
7837
|
// ../../packages/aeg-core/src/control-store/local.ts
|
|
7755
7838
|
var CONTROL_AREA_DIRNAME = "control";
|
|
7756
7839
|
// src/checks/bin/check-dispatch-readiness.ts
|
|
7757
|
-
import { execFile as
|
|
7840
|
+
import { execFile as execFile6, execFileSync as execFileSync5 } from "node:child_process";
|
|
7758
7841
|
import { existsSync as existsSync3, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
|
|
7759
7842
|
import { sep as sep2 } from "node:path";
|
|
7760
|
-
import { promisify as
|
|
7843
|
+
import { promisify as promisify6 } from "node:util";
|
|
7761
7844
|
|
|
7762
7845
|
// ../../packages/sources/src/commands.ts
|
|
7763
7846
|
var COMMANDS = [
|
|
@@ -7925,6 +8008,10 @@ var COMMANDS = [
|
|
|
7925
8008
|
needs: ["forge", "operator-seat"],
|
|
7926
8009
|
description: "One command from a planned Issue to a reviewed pull request — exactly one developer started",
|
|
7927
8010
|
flags: [
|
|
8011
|
+
{
|
|
8012
|
+
flag: "--runner <standalone|atta-engine>",
|
|
8013
|
+
description: "Override runner config for this invocation; absent uses config, whose default is standalone"
|
|
8014
|
+
},
|
|
7928
8015
|
{
|
|
7929
8016
|
flag: "--agent <claude|codex>",
|
|
7930
8017
|
description: "Vendor for the developer and both reviewers this run dispatches"
|
|
@@ -7936,17 +8023,39 @@ var COMMANDS = [
|
|
|
7936
8023
|
{
|
|
7937
8024
|
flag: "--widen-surface <glob,...> --reason <text>",
|
|
7938
8025
|
description: "Continue a pre-pull-request escalation whose Developer asked for `widen_surface`: supersede the frozen brief with the globs added to `## Surface`, record that as the escalation's resolution, grade the widened Issue through the write gate, then start the run"
|
|
8026
|
+
},
|
|
8027
|
+
{
|
|
8028
|
+
flag: "--rollback",
|
|
8029
|
+
description: "Run the terminate-and-restart procedure for this task: cancel its in-flight Engine run, reconcile every prepared and uncertain effect by its identity, then start a fresh standalone run from the same frozen brief. Refuses a task whose recorded runner is not `atta-engine`"
|
|
7939
8030
|
}
|
|
7940
8031
|
],
|
|
7941
8032
|
details: [
|
|
8033
|
+
"The atta-engine runner starts the workspace Engine script with Bun, streams its output and returns its exit code. A published install without the script prints one notice and falls back to standalone. Engine Log events use the local folder only; logs: false disables all Log destinations for both runners.",
|
|
8034
|
+
"A run's runner is recorded when it starts and never changes: switching `runner` in config changes only the runner of new runs, and a run recorded on `atta-engine` keeps routing to the Engine for `task status`, `task_resume` and `task_cancel`. A start on a pause another runner holds is refused with a typed reason naming the recorded runner and the requested one, and so is a start on another runner's Engine run that is still in flight with no pause held — halted or stopped short of completed or cancelled.",
|
|
8035
|
+
"`--rollback` ends the Engine run first: a held pause through the shared cancel `task_cancel` uses, which needs a Principal ruling newer than the pause as any cancel does; a run halted with no pause held has its started effects fenced; a run that already completed or was cancelled is refused, as is a driver still running with no pause held, which is never signalled; and the standalone run never starts while the Engine driver lives, a cancelled run's driver given a bounded wait to release its lock. Every started and uncertain effect is then reconciled by its identity: one the forge carries is recorded verified, one it does not carry is left for the restarted run to complete, and one the forge read cannot settle refuses the restart. Each rehearsal appends a record — task, recorded runner, action, reconciled effect identities, the restarted run's runner and terminal state — to `backend-rollback-rehearsals.jsonl` in the task's runtime directory, whether it completed, was refused or failed at a later step, and nothing removes it.",
|
|
7942
8036
|
"`--widen-surface` is the Planner's one command for a widen-surface escalation, and refuses before any write when the held pause is not one (no pause, a pause with a pull request — whose continuation is the ruling on that pull request — or a round whose Developer asked for no `widen_surface`), when a driver is still alive for the task, when the escalation's resolution is already consumed (a replay — the Surface is never widened twice), or when the widened body fails the write gate, whose findings name the field to edit first. The escalation packet's permitted next actions name this command with the globs the Developer asked for, and `task_resume` refuses such an escalation naming it.",
|
|
7943
|
-
"
|
|
8037
|
+
"Prepares the frozen brief and resolves the task, branch and model once. The standalone runner then starts the watching driver (`runDriverLoop`, `dev-review-loop.ts`). Preparation starts no agent; the loop's own round 1 reads the frozen brief off the Issue and is the only place a developer is ever dispatched from a fresh task, so exactly one developer is started by construction.",
|
|
7944
8038
|
"A brief already frozen on the Issue is reused, never re-posted — the second `task dispatch`/`task brief` call this composes around does not fail the whole run, it just skips straight to running the loop. A task whose Issue refuses preparation (a missing brief section, an unmet dispatch gate) is refused before any agent starts, with nothing posted.",
|
|
7945
8039
|
"Refuses when the frozen brief's developer branch already has an open pull request AND a driver is still live for it — a driver that crashed or was killed leaves its PR behind, and this command is the one that revives it, in any state, pause held or not.",
|
|
7946
8040
|
"issue-711 O4: a pause never ends this process — it keeps running and watches the pull request, continuing on its own once a newer Principal ruling appears (or, for an `'infrastructure'`/`'stale_driver'` pause, after a bounded backoff), with no `--resume` command needed for the ordinary case. Exit and printed summary distinguish a published pull request OR a watched pause's own genuine end — merged, closed, or an operator's own `--cancel` (exit `0` either way, the PR URL) — from the one pause this process can never watch (no pull request exists yet — exit `1`, with the working `vinaya task run` command for this task's own branch to continue by hand — `<tranche> <n>` for a tranche task, `--issue <n>` for a backlog one — never a `dev-review-loop --resume` line naming a pull-request number this pause does not have), a usage/argv error (exit `2`), and any other failure (exit `3`)."
|
|
7947
8041
|
],
|
|
7948
8042
|
status: "shipped"
|
|
7949
8043
|
},
|
|
8044
|
+
{
|
|
8045
|
+
name: "task switch",
|
|
8046
|
+
needs: ["forge"],
|
|
8047
|
+
description: "Change a task's agent or model by setting its Engine checkpoint aside, so the next `task run` is accepted",
|
|
8048
|
+
flags: [
|
|
8049
|
+
{ flag: "--issue <n>", description: "Address the task by its Issue number instead of `<tranche> <n>`" },
|
|
8050
|
+
{ flag: "--agent <claude|codex>", description: "Vendor the next `task run` of the task continues on" },
|
|
8051
|
+
{ flag: "--model <model>", description: "Model the next `task run` is meant to use; absent, the vendor default" }
|
|
8052
|
+
],
|
|
8053
|
+
details: [
|
|
8054
|
+
"Refuses, changing nothing, while a driver for the task is alive, naming its pid. Otherwise moves the task's Engine checkpoint (`checkpoints.sqlite` with its `-wal` and `-shm` files) into a timestamped `switched-*` folder of the task's run directory and never deletes it; the branch, its commits and its pull request are untouched, so the next `task run` with the new agent continues the same branch on a fresh checkpoint.",
|
|
8055
|
+
"Writes one driver-log line naming the from and to agent, the from and to model and the folder the checkpoint went to. On the standalone runner it changes nothing on disk and says that runner already continues a task on a new `--agent` by itself. `task run` and `run-engine --resume` still refuse an agent other than the checkpoint's, and their refusal names this command."
|
|
8056
|
+
],
|
|
8057
|
+
status: "shipped"
|
|
8058
|
+
},
|
|
7950
8059
|
{
|
|
7951
8060
|
name: "task status",
|
|
7952
8061
|
needs: ["forge"],
|
|
@@ -8670,9 +8779,9 @@ function emitCheckError(error) {
|
|
|
8670
8779
|
// src/lib/config.ts
|
|
8671
8780
|
import { execFile as execFile4, execFileSync as execFileSync2 } from "node:child_process";
|
|
8672
8781
|
import { promisify as promisify4 } from "node:util";
|
|
8673
|
-
import { existsSync, mkdirSync, readFileSync as readFileSync2, realpathSync as realpathSync2, writeFileSync } from "node:fs";
|
|
8782
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync as readFileSync2, realpathSync as realpathSync2, writeFileSync } from "node:fs";
|
|
8674
8783
|
import { homedir } from "node:os";
|
|
8675
|
-
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
8784
|
+
import { basename as basename3, dirname, isAbsolute, join, resolve } from "node:path";
|
|
8676
8785
|
import { z as z7 } from "zod";
|
|
8677
8786
|
|
|
8678
8787
|
// src/lib/agent-vendors.ts
|
|
@@ -9128,7 +9237,8 @@ var VinayaConfigObjectSchema = z7.object({
|
|
|
9128
9237
|
codeReviewThreshold: z7.string().min(1).optional(),
|
|
9129
9238
|
securityThreshold: z7.string().min(1).optional(),
|
|
9130
9239
|
maxRounds: z7.number().optional(),
|
|
9131
|
-
maxTaskMinutes: z7.number().optional()
|
|
9240
|
+
maxTaskMinutes: z7.number().optional(),
|
|
9241
|
+
readyPushTimeoutMinutes: z7.number().optional()
|
|
9132
9242
|
}).optional(),
|
|
9133
9243
|
securityScan: z7.object({
|
|
9134
9244
|
command: z7.array(z7.string().min(1)).min(1)
|
|
@@ -9144,7 +9254,16 @@ var VinayaConfigObjectSchema = z7.object({
|
|
|
9144
9254
|
collisionThreshold: z7.number().int().nonnegative().optional()
|
|
9145
9255
|
}).optional(),
|
|
9146
9256
|
prePush: z7.object({
|
|
9147
|
-
alwaysRun: z7.array(z7.string()).optional()
|
|
9257
|
+
alwaysRun: z7.array(z7.string()).optional(),
|
|
9258
|
+
readyTests: z7.object({
|
|
9259
|
+
mode: z7.literal("ci"),
|
|
9260
|
+
workflow: z7.literal(".github/workflows/ci.yml"),
|
|
9261
|
+
check: z7.literal("Vinaya CI")
|
|
9262
|
+
}).strict().optional(),
|
|
9263
|
+
requiredCi: z7.object({
|
|
9264
|
+
workflow: z7.literal(".github/workflows/ci.yml"),
|
|
9265
|
+
check: z7.literal("Vinaya CI")
|
|
9266
|
+
}).strict().optional()
|
|
9148
9267
|
}).optional(),
|
|
9149
9268
|
report: z7.object({
|
|
9150
9269
|
commandTimeoutMs: z7.number().int().positive().optional()
|
|
@@ -9162,6 +9281,7 @@ var VinayaConfigObjectSchema = z7.object({
|
|
|
9162
9281
|
message: "logPublish is removed — telemetry is never posted to a tracker or a code host; configure `logs` instead (a folder or a server destination)"
|
|
9163
9282
|
}),
|
|
9164
9283
|
runtimeDir: z7.string().min(1).refine((v) => isAbsolute(v), { message: "runtimeDir: must be an absolute path" }).optional(),
|
|
9284
|
+
runner: z7.enum(["standalone", "atta-engine"]).optional(),
|
|
9165
9285
|
logs: z7.object({
|
|
9166
9286
|
folder: z7.string().min(1).refine((v) => isAbsolute(v), { message: "logs.folder: must be an absolute path" }).optional(),
|
|
9167
9287
|
url: z7.string().url().optional(),
|
|
@@ -9174,7 +9294,7 @@ var VinayaConfigObjectSchema = z7.object({
|
|
|
9174
9294
|
message: "logs: headers requires url"
|
|
9175
9295
|
}).refine((v) => v.readHeaders === undefined || v.url !== undefined, {
|
|
9176
9296
|
message: "logs: readHeaders requires url"
|
|
9177
|
-
}).optional(),
|
|
9297
|
+
}).or(z7.literal(false)).optional(),
|
|
9178
9298
|
decisionRecords: z7.object({
|
|
9179
9299
|
path: RepoRelativePathSchema
|
|
9180
9300
|
}).strict().optional()
|
|
@@ -9304,13 +9424,19 @@ function resolveReviewPolicy(config) {
|
|
|
9304
9424
|
if (!Number.isInteger(maxTaskMinutes) || maxTaskMinutes < 0) {
|
|
9305
9425
|
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.`);
|
|
9306
9426
|
}
|
|
9427
|
+
const readyPushTimeoutMinutes = raw.readyPushTimeoutMinutes ?? DEFAULT_READY_PUSH_TIMEOUT_MINUTES;
|
|
9428
|
+
if (!Number.isInteger(readyPushTimeoutMinutes) || readyPushTimeoutMinutes < 1) {
|
|
9429
|
+
throw new Error(`vinaya.config.json: reviewPolicy.readyPushTimeoutMinutes "${readyPushTimeoutMinutes}" is not a positive integer — fix the config, this never falls back to a default.`);
|
|
9430
|
+
}
|
|
9307
9431
|
return {
|
|
9308
9432
|
codeReviewThreshold,
|
|
9309
9433
|
securityThreshold,
|
|
9310
9434
|
maxRounds,
|
|
9311
|
-
maxTaskMinutes
|
|
9435
|
+
maxTaskMinutes,
|
|
9436
|
+
readyPushTimeoutMinutes
|
|
9312
9437
|
};
|
|
9313
9438
|
}
|
|
9439
|
+
var emittedLocalOverrideWarnings = new Set;
|
|
9314
9440
|
function resolveGateCutovers(config) {
|
|
9315
9441
|
const raw = config?.gateCutovers;
|
|
9316
9442
|
if (!raw)
|
|
@@ -9814,7 +9940,8 @@ function containedAbs(repoRoot, relPath) {
|
|
|
9814
9940
|
}
|
|
9815
9941
|
|
|
9816
9942
|
// src/checks/edge-resolve.ts
|
|
9817
|
-
import {
|
|
9943
|
+
import { execFile as execFile5 } from "node:child_process";
|
|
9944
|
+
import { promisify as promisify5 } from "node:util";
|
|
9818
9945
|
|
|
9819
9946
|
// src/lib/github-rate-limit.ts
|
|
9820
9947
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
@@ -9865,15 +9992,20 @@ ${message}` : message;
|
|
|
9865
9992
|
// src/checks/edge-resolve.ts
|
|
9866
9993
|
var DIRECT_ISSUE_REF = /#(\d+)/;
|
|
9867
9994
|
var issueCache = new Map;
|
|
9995
|
+
var execFileAsync5 = promisify5(execFile5);
|
|
9868
9996
|
var ISSUE_NOT_FOUND = /could not resolve to an issue/i;
|
|
9869
9997
|
function fetchIssueState(num, repo) {
|
|
9870
9998
|
const key = `${repo.owner}/${repo.repo}#${num}`;
|
|
9871
9999
|
const cached = issueCache.get(key);
|
|
9872
10000
|
if (cached)
|
|
9873
10001
|
return cached;
|
|
9874
|
-
|
|
10002
|
+
const out = readIssueOnce(num, repo).then((first) => first.readFailed ? readIssueOnce(num, repo) : first);
|
|
10003
|
+
issueCache.set(key, out);
|
|
10004
|
+
return out;
|
|
10005
|
+
}
|
|
10006
|
+
async function readIssueOnce(num, repo) {
|
|
9875
10007
|
try {
|
|
9876
|
-
const
|
|
10008
|
+
const { stdout } = await execFileAsync5("gh", [
|
|
9877
10009
|
"issue",
|
|
9878
10010
|
"view",
|
|
9879
10011
|
String(num),
|
|
@@ -9881,13 +10013,11 @@ function fetchIssueState(num, repo) {
|
|
|
9881
10013
|
`${repo.owner}/${repo.repo}`,
|
|
9882
10014
|
"--json",
|
|
9883
10015
|
"state,stateReason,closedByPullRequestsReferences"
|
|
9884
|
-
], { encoding: "utf8"
|
|
9885
|
-
|
|
10016
|
+
], { encoding: "utf8" });
|
|
10017
|
+
return { json: JSON.parse(stdout), readFailed: false };
|
|
9886
10018
|
} catch (err) {
|
|
9887
|
-
|
|
10019
|
+
return { json: null, readFailed: !ISSUE_NOT_FOUND.test(execErrorText(err)) };
|
|
9888
10020
|
}
|
|
9889
|
-
issueCache.set(key, out);
|
|
9890
|
-
return out;
|
|
9891
10021
|
}
|
|
9892
10022
|
var defaultResolveSiblingTranche = async (slug, repo) => {
|
|
9893
10023
|
let tranche;
|
|
@@ -9947,7 +10077,7 @@ async function resolveEdge(id, taskById, factsByTaskId, repo, resolveSibling = d
|
|
|
9947
10077
|
const direct = id.match(DIRECT_ISSUE_REF);
|
|
9948
10078
|
if (direct) {
|
|
9949
10079
|
const num = Number(direct[1]);
|
|
9950
|
-
const read = fetchIssueState(num, repo);
|
|
10080
|
+
const read = await fetchIssueState(num, repo);
|
|
9951
10081
|
return edgeFromIssueJson(num, read.json, read.readFailed);
|
|
9952
10082
|
}
|
|
9953
10083
|
const qualified = splitSlugQualifiedEdge(id);
|
|
@@ -10085,10 +10215,10 @@ function warnOnUnreadPrincipals(check, err) {
|
|
|
10085
10215
|
|
|
10086
10216
|
// src/checks/bin/check-dispatch-readiness.ts
|
|
10087
10217
|
var CHECK_NAME = "dispatch-readiness";
|
|
10088
|
-
var
|
|
10218
|
+
var execFileAsync6 = promisify6(execFile6);
|
|
10089
10219
|
function git(args) {
|
|
10090
10220
|
try {
|
|
10091
|
-
return
|
|
10221
|
+
return execFileSync5("git", args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
|
|
10092
10222
|
} catch {
|
|
10093
10223
|
return "";
|
|
10094
10224
|
}
|
|
@@ -10115,7 +10245,7 @@ async function resolveToken() {
|
|
|
10115
10245
|
if (process.env.GH_TOKEN)
|
|
10116
10246
|
return process.env.GH_TOKEN;
|
|
10117
10247
|
try {
|
|
10118
|
-
const { stdout } = await
|
|
10248
|
+
const { stdout } = await execFileAsync6("gh", ["auth", "token"]);
|
|
10119
10249
|
const token = stdout.trim();
|
|
10120
10250
|
return token.length > 0 ? token : null;
|
|
10121
10251
|
} catch {
|
|
@@ -10177,7 +10307,7 @@ function fetchIssueJson(issueNumber) {
|
|
|
10177
10307
|
labels: fromSnapshot.labels
|
|
10178
10308
|
};
|
|
10179
10309
|
}
|
|
10180
|
-
const out =
|
|
10310
|
+
const out = execFileSync5("gh", ["issue", "view", String(issueNumber), "--json", "number,state,body,labels"], {
|
|
10181
10311
|
encoding: "utf8",
|
|
10182
10312
|
stdio: ["ignore", "pipe", "pipe"]
|
|
10183
10313
|
});
|