@attalabs/vinaya 0.33.0 → 0.35.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/LICENSE +104 -201
- package/README.md +1 -1
- package/aeg-root/enforcement.md +1 -1
- package/aeg-root/glossary.md +4 -0
- package/aeg-root/roles/developer.md +3 -0
- package/aeg-root/roles/operator.md +30 -10
- package/aeg-root/roles/planner/reference.md +3 -2
- package/aeg-root/roles/planner.md +3 -1
- package/aeg-root/templates/brief-template.md +9 -7
- package/aeg-root/templates/pr-report-template.md +3 -1
- package/dist/checks/bin/check-body-bare-digits.js +107 -28
- package/dist/checks/bin/check-branch-topology.js +94 -25
- package/dist/checks/bin/check-brief-shape.js +113 -33
- package/dist/checks/bin/check-changeset-coverage.js +369 -92
- package/dist/checks/bin/check-closes-n.js +94 -25
- package/dist/checks/bin/check-coherence.js +124 -29
- package/dist/checks/bin/check-dead-branch-push.js +79 -25
- package/dist/checks/bin/check-dispatch-readiness.js +122 -28
- package/dist/checks/bin/check-doc-coverage-push.js +365 -88
- package/dist/checks/bin/check-doc-coverage.js +367 -90
- package/dist/checks/bin/check-doctrine-no-procedures.js +107 -28
- package/dist/checks/bin/check-doctrine-portability.js +366 -89
- package/dist/checks/bin/check-evidence-fresh.js +338 -61
- package/dist/checks/bin/check-exec-bits.js +363 -86
- package/dist/checks/bin/check-first-push-dispatch.js +122 -28
- package/dist/checks/bin/check-issue-assignment.js +94 -25
- package/dist/checks/bin/check-issue-milestone-attach.js +79 -25
- package/dist/checks/bin/check-issue-objectives-numbering.js +606 -26
- package/dist/checks/bin/check-issue-parts-coverage.js +79 -25
- package/dist/checks/bin/check-issue-surface-globs.js +162 -34
- package/dist/checks/bin/check-issue-title-grammar.js +79 -25
- package/dist/checks/bin/check-issue-tranche-label.js +79 -25
- package/dist/checks/bin/check-main-branch-refusal.js +79 -25
- package/dist/checks/bin/check-no-disk-state.js +79 -25
- package/dist/checks/bin/check-pr-premise-reassert.js +107 -28
- package/dist/checks/bin/check-pr-report-density.js +79 -25
- package/dist/checks/bin/check-principal-test-plan-wait.js +79 -25
- package/dist/checks/bin/check-quoted-command.js +282 -39
- package/dist/checks/bin/check-reader-resolvable-prose.js +333 -47
- package/dist/checks/bin/check-registry-gates.js +79 -25
- package/dist/checks/bin/check-retired-vocabulary.js +282 -39
- package/dist/checks/bin/check-review-gate.js +111 -31
- package/dist/checks/bin/check-single-plan-pr.js +79 -25
- package/dist/checks/bin/check-surface-scope.js +94 -25
- package/dist/checks/bin/check-test-plan.js +79 -25
- package/dist/checks/bin/check-token-collection-wired.js +79 -25
- package/dist/checks/bin/check-token-report.js +79 -25
- package/dist/checks/bin/check-workspace-escape.js +364 -87
- package/dist/index.js +2713 -1609
- package/dist/lib/pre-push-cache-test-run.js +226 -16
- package/dist/lib/pre-push-select-tests.js +48 -5
- package/package.json +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +153 -37
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +87 -24
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +9 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +13 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +7 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +5 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +116 -20
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +100 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-cutovers.ts +49 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +60 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +138 -54
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +26 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives-cutover-config.ts +31 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +15 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +122 -23
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +18 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +24 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +15 -10
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +16 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-phase-history.ts +194 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +312 -53
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +62 -8
- 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/api/coherence/route.js.nft.json +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/[root-of-the-server]__02a-3g8._.js +4 -4
- 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]__074w9nf._.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]__18paley._.js → [root-of-the-server]__0zc_0gx._.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]__1wc4-ip._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_15gdg48._.js +2 -2
- 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/0ko698wh8xx2g.css +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{22s44f5k3ecmj.js → 3goaig_rysc6p.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1ce2dj27_cgbj.js → 3ip5z3cf43bgo.js} +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{34hhdtbp20krb.js → 3u9emqjwpd0t9.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bm4nrrzwc7zi.css +0 -1
- /package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/{aeg-core → vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/aeg-core}/bin/verify-coherence.ts +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_ssgManifest.js +0 -0
|
@@ -196,8 +196,8 @@ function maskIndentedCode(body, fill) {
|
|
|
196
196
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
197
197
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
198
198
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
199
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
200
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
199
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
200
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
201
201
|
function splitSlugQualifiedEdge(edge) {
|
|
202
202
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
203
203
|
if (!m)
|
|
@@ -2618,7 +2618,7 @@ function isIssueNotFoundError(err) {
|
|
|
2618
2618
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2619
2619
|
}
|
|
2620
2620
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2621
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2621
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2622
2622
|
return { kind: "none" };
|
|
2623
2623
|
if (issue !== null)
|
|
2624
2624
|
return { kind: "issue", issue };
|
|
@@ -2894,9 +2894,18 @@ var COMMIT_TYPES = [
|
|
|
2894
2894
|
];
|
|
2895
2895
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2896
2896
|
function checkForgeTitle(title) {
|
|
2897
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2897
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2898
2898
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2899
2899
|
return { status: "pass", errors: [] };
|
|
2900
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2901
|
+
if (letteredTaskId) {
|
|
2902
|
+
return {
|
|
2903
|
+
status: "fail",
|
|
2904
|
+
errors: [
|
|
2905
|
+
`brief-validation title: "${title}" names task id \`${letteredTaskId[1]}\` — task ids are whole numbers (\`1\`, \`2\`), never lettered (\`2a\`). \`vinaya task run\` and \`task dispatch\` refuse a non-numeric id, so a plan titled this way names a task that cannot be started.`
|
|
2906
|
+
]
|
|
2907
|
+
};
|
|
2908
|
+
}
|
|
2900
2909
|
return {
|
|
2901
2910
|
status: "fail",
|
|
2902
2911
|
errors: [
|
|
@@ -2929,19 +2938,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2929
2938
|
]
|
|
2930
2939
|
};
|
|
2931
2940
|
}
|
|
2932
|
-
function
|
|
2941
|
+
function rolloutRuleFor(message) {
|
|
2933
2942
|
if (message.startsWith("brief-validation unpinned code claim:") || message.startsWith("brief-validation commands carry output:") || message.startsWith("brief-validation consumer tests:") || message.startsWith("brief-validation defeat cases:")) {
|
|
2934
|
-
return
|
|
2943
|
+
return "briefRules";
|
|
2935
2944
|
}
|
|
2936
2945
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2937
|
-
return
|
|
2946
|
+
return "agentBoxes";
|
|
2938
2947
|
return null;
|
|
2939
2948
|
}
|
|
2940
|
-
|
|
2949
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2950
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2951
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2952
|
+
};
|
|
2953
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2954
|
+
const rule = rolloutRuleFor(message);
|
|
2955
|
+
if (rule === "briefRules")
|
|
2956
|
+
return cutovers.briefRulesSincePr;
|
|
2957
|
+
if (rule === "agentBoxes")
|
|
2958
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2959
|
+
return null;
|
|
2960
|
+
}
|
|
2961
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2941
2962
|
const blocking = [];
|
|
2942
2963
|
const info = [];
|
|
2943
2964
|
for (const e of errors) {
|
|
2944
|
-
const threshold = rolloutThresholdFor(e);
|
|
2965
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2945
2966
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2946
2967
|
(grandfathered ? info : blocking).push(e);
|
|
2947
2968
|
}
|
|
@@ -3409,8 +3430,8 @@ function checkIssueRationale(body) {
|
|
|
3409
3430
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3410
3431
|
}
|
|
3411
3432
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3412
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3413
|
-
if (issueNumber !== null && issueNumber <
|
|
3433
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3434
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3414
3435
|
return { status: "pass", errors: [] };
|
|
3415
3436
|
const result = objectivesOf(body);
|
|
3416
3437
|
if (result.ok)
|
|
@@ -3486,6 +3507,8 @@ function parseIssueSurface(body) {
|
|
|
3486
3507
|
function globCoversPath(glob, path) {
|
|
3487
3508
|
const g = glob.replace(/\/\*\*?$/, "").replace(/\/+$/, "");
|
|
3488
3509
|
const p = path.replace(/\/+$/, "");
|
|
3510
|
+
if (g === "*")
|
|
3511
|
+
return !p.includes("/");
|
|
3489
3512
|
return g === p || g.startsWith(`${p}/`) || p.startsWith(`${g}/`);
|
|
3490
3513
|
}
|
|
3491
3514
|
function checkSurfaceGlobsResolve(body, resolvesToFile) {
|
|
@@ -3855,7 +3878,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3855
3878
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3856
3879
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3857
3880
|
}
|
|
3858
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3881
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3859
3882
|
const failures = [];
|
|
3860
3883
|
for (const [slug, issues] of issuesBySlug) {
|
|
3861
3884
|
for (const issue of issues) {
|
|
@@ -3864,7 +3887,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3864
3887
|
const errors = [
|
|
3865
3888
|
...checkIssueRationale(issue.body).errors,
|
|
3866
3889
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3867
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3890
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3868
3891
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3869
3892
|
];
|
|
3870
3893
|
if (errors.length === 0)
|
|
@@ -4487,13 +4510,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4487
4510
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4488
4511
|
return `${shipsPrefix}tranches/completed/`;
|
|
4489
4512
|
}
|
|
4490
|
-
|
|
4491
|
-
|
|
4513
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4514
|
+
function normalizeSpecPath(entry) {
|
|
4515
|
+
let out = entry.replace(/\\/g, "/");
|
|
4516
|
+
while (out.startsWith("./"))
|
|
4517
|
+
out = out.slice(2);
|
|
4518
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4519
|
+
while (out.endsWith("/"))
|
|
4520
|
+
out = out.slice(0, -1);
|
|
4521
|
+
return out;
|
|
4522
|
+
}
|
|
4523
|
+
function isSpecFile2(path, specPaths) {
|
|
4524
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4525
|
+
return true;
|
|
4526
|
+
if (!path.endsWith(".md"))
|
|
4527
|
+
return false;
|
|
4528
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4492
4529
|
}
|
|
4493
4530
|
function isClaudeMdFile(path) {
|
|
4494
4531
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4495
4532
|
}
|
|
4496
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4533
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4497
4534
|
if (path.startsWith(shipsPrefix)) {
|
|
4498
4535
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4499
4536
|
}
|
|
@@ -4502,7 +4539,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4502
4539
|
}
|
|
4503
4540
|
if (isClaudeMdFile(path))
|
|
4504
4541
|
return "internal";
|
|
4505
|
-
if (isSpecFile2(path))
|
|
4542
|
+
if (isSpecFile2(path, specPaths))
|
|
4506
4543
|
return "spec";
|
|
4507
4544
|
if (isProductScopeFile(path))
|
|
4508
4545
|
return "product";
|
|
@@ -4531,13 +4568,14 @@ function lineAt(content, index) {
|
|
|
4531
4568
|
}
|
|
4532
4569
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4533
4570
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4571
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4534
4572
|
function legacySlugPattern(legacySlugs) {
|
|
4535
4573
|
if (legacySlugs.length === 0)
|
|
4536
4574
|
return null;
|
|
4537
4575
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4538
4576
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4539
4577
|
}
|
|
4540
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4578
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4541
4579
|
const findings = [];
|
|
4542
4580
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4543
4581
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4549,8 +4587,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4549
4587
|
const productPatterns = [
|
|
4550
4588
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4551
4589
|
];
|
|
4590
|
+
const specPatterns = [
|
|
4591
|
+
...patterns,
|
|
4592
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4593
|
+
];
|
|
4552
4594
|
for (const file of files) {
|
|
4553
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4595
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4554
4596
|
if (!cls || cls === "internal")
|
|
4555
4597
|
continue;
|
|
4556
4598
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4559,15 +4601,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4559
4601
|
continue;
|
|
4560
4602
|
const blocking = cls === "product" || cls === "spec";
|
|
4561
4603
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4562
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4604
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4563
4605
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4564
4606
|
pattern.lastIndex = 0;
|
|
4565
4607
|
let match = pattern.exec(scrubbed);
|
|
4566
4608
|
while (match !== null) {
|
|
4567
4609
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4610
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4568
4611
|
findings.push({
|
|
4569
4612
|
file: file.path,
|
|
4570
|
-
line: lineAt(scrubbed,
|
|
4613
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4571
4614
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4572
4615
|
blocking
|
|
4573
4616
|
});
|
|
@@ -4753,9 +4796,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4753
4796
|
}
|
|
4754
4797
|
return findings;
|
|
4755
4798
|
}
|
|
4756
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4799
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4757
4800
|
return [
|
|
4758
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4801
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4759
4802
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4760
4803
|
];
|
|
4761
4804
|
}
|
|
@@ -5220,7 +5263,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5220
5263
|
}).merge(ObservedSchema);
|
|
5221
5264
|
var TaskStatusResultSchema = z.object({
|
|
5222
5265
|
items: z.array(TaskStatusItemSchema),
|
|
5223
|
-
nextCursor: z.string().nullable()
|
|
5266
|
+
nextCursor: z.string().nullable(),
|
|
5267
|
+
table: z.string()
|
|
5224
5268
|
});
|
|
5225
5269
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5226
5270
|
var EscalationInputsSchema = z.object({
|
|
@@ -5564,6 +5608,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5564
5608
|
}
|
|
5565
5609
|
return findings;
|
|
5566
5610
|
}
|
|
5611
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5612
|
+
var NO_GATE_CUTOVERS = {
|
|
5613
|
+
objectivesSinceIssue: null,
|
|
5614
|
+
briefSectionsSinceIssue: null,
|
|
5615
|
+
documentationSinceIssue: null,
|
|
5616
|
+
briefRulesSincePr: null,
|
|
5617
|
+
agentBoxesRefusedSincePr: null
|
|
5618
|
+
};
|
|
5567
5619
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5568
5620
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5569
5621
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6013,6 +6065,8 @@ function attemptFromEnv(value) {
|
|
|
6013
6065
|
function provenanceFor(input) {
|
|
6014
6066
|
if (input.provenance)
|
|
6015
6067
|
return input.provenance;
|
|
6068
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6069
|
+
return "unavailable";
|
|
6016
6070
|
if (input.env.role || input.env.task)
|
|
6017
6071
|
return "env_correlated";
|
|
6018
6072
|
return "unavailable";
|
|
@@ -6033,7 +6087,7 @@ function buildHeader(input) {
|
|
|
6033
6087
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6034
6088
|
const round = roundFromEnv(input.env.round);
|
|
6035
6089
|
const subject = {
|
|
6036
|
-
issue: issueFromTask(input.env.task),
|
|
6090
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6037
6091
|
role,
|
|
6038
6092
|
...round !== undefined ? { round } : {},
|
|
6039
6093
|
...input.subject ?? {}
|
|
@@ -6817,6 +6871,10 @@ var COMMANDS = [
|
|
|
6817
6871
|
flag: "--role <name>",
|
|
6818
6872
|
description: "Resolve to a specific role file (roles/<name>.md) instead of the front door"
|
|
6819
6873
|
},
|
|
6874
|
+
{
|
|
6875
|
+
flag: "--template <name>",
|
|
6876
|
+
description: "Print a template the package ships (templates/<name>-template.md) instead of the front door"
|
|
6877
|
+
},
|
|
6820
6878
|
{
|
|
6821
6879
|
flag: "--print",
|
|
6822
6880
|
description: "Emit the resolved file's body (frontmatter stripped) instead of its path — the one-hop mode every generated skill and slash command invokes. A role file whose frontmatter carries an `ack-token` emits that token as the output's own first line."
|
|
@@ -7001,6 +7059,17 @@ var COMMANDS = [
|
|
|
7001
7059
|
"issue-711 O4: this command — `--task <n>`, `--resume <pr>`, `--cancel <pr>` alike — stays `task run`'s own one-shot debug/direct entry; the watching driver that survives a pause and continues on its own is `task run`'s (see that command's own entry)."
|
|
7002
7060
|
],
|
|
7003
7061
|
status: "shipped"
|
|
7062
|
+
},
|
|
7063
|
+
{
|
|
7064
|
+
name: "log send",
|
|
7065
|
+
description: "Deliver this repository's locally-held log events to the configured `logs.url` server, once",
|
|
7066
|
+
flags: [{ flag: "--json", description: "Enveloped JSON output (schema: 1)" }],
|
|
7067
|
+
details: [
|
|
7068
|
+
"For a run whose events ended up on local disk instead of the configured server — an unattended run that fell back to the local folder because the trust-anchor read could not confirm its `logs.url` (a developer machine slower than the read deadline, or genuinely offline), or a retry queue holding a backlog or a `.draining.ndjson` a dead drain left behind. It moves the local folder's events into the retry queue and drains every queue for this repository through the SAME webhook delivery a live event uses.",
|
|
7069
|
+
"It resolves the destination exactly the way a normal event does — the sink's own decision over `vinaya.config.json`'s `logs` setting, trust-anchor-gated for an unattended caller — never a URL passed on the command line. A repository whose destination is a folder (or none) has nothing to send to a server and the command says so.",
|
|
7070
|
+
"Safe to run more than once: the server stores events by `event_id` and ignores one it already holds, so a re-sent chunk creates no duplicate, and a second run finds the folder emptied and the queue drained."
|
|
7071
|
+
],
|
|
7072
|
+
status: "shipped"
|
|
7004
7073
|
}
|
|
7005
7074
|
];
|
|
7006
7075
|
// ../../packages/sources/src/forge-adapter.ts
|
|
@@ -201,8 +201,8 @@ function maskIndentedCode(body, fill) {
|
|
|
201
201
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
202
202
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
203
203
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
204
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
205
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
204
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
205
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
206
206
|
function splitSlugQualifiedEdge(edge) {
|
|
207
207
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
208
208
|
if (!m)
|
|
@@ -2623,7 +2623,7 @@ function isIssueNotFoundError(err) {
|
|
|
2623
2623
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2624
2624
|
}
|
|
2625
2625
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2626
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2626
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2627
2627
|
return { kind: "none" };
|
|
2628
2628
|
if (issue !== null)
|
|
2629
2629
|
return { kind: "issue", issue };
|
|
@@ -2899,9 +2899,18 @@ var COMMIT_TYPES = [
|
|
|
2899
2899
|
];
|
|
2900
2900
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2901
2901
|
function checkForgeTitle(title) {
|
|
2902
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2902
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2903
2903
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2904
2904
|
return { status: "pass", errors: [] };
|
|
2905
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2906
|
+
if (letteredTaskId) {
|
|
2907
|
+
return {
|
|
2908
|
+
status: "fail",
|
|
2909
|
+
errors: [
|
|
2910
|
+
`brief-validation title: "${title}" names task id \`${letteredTaskId[1]}\` — task ids are whole numbers (\`1\`, \`2\`), never lettered (\`2a\`). \`vinaya task run\` and \`task dispatch\` refuse a non-numeric id, so a plan titled this way names a task that cannot be started.`
|
|
2911
|
+
]
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2905
2914
|
return {
|
|
2906
2915
|
status: "fail",
|
|
2907
2916
|
errors: [
|
|
@@ -2934,19 +2943,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2934
2943
|
]
|
|
2935
2944
|
};
|
|
2936
2945
|
}
|
|
2937
|
-
function
|
|
2946
|
+
function rolloutRuleFor(message) {
|
|
2938
2947
|
if (message.startsWith("brief-validation unpinned code claim:") || message.startsWith("brief-validation commands carry output:") || message.startsWith("brief-validation consumer tests:") || message.startsWith("brief-validation defeat cases:")) {
|
|
2939
|
-
return
|
|
2948
|
+
return "briefRules";
|
|
2940
2949
|
}
|
|
2941
2950
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2942
|
-
return
|
|
2951
|
+
return "agentBoxes";
|
|
2952
|
+
return null;
|
|
2953
|
+
}
|
|
2954
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2955
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2956
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2957
|
+
};
|
|
2958
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2959
|
+
const rule = rolloutRuleFor(message);
|
|
2960
|
+
if (rule === "briefRules")
|
|
2961
|
+
return cutovers.briefRulesSincePr;
|
|
2962
|
+
if (rule === "agentBoxes")
|
|
2963
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2943
2964
|
return null;
|
|
2944
2965
|
}
|
|
2945
|
-
function partitionBriefErrorsByRollout(errors, prNumber) {
|
|
2966
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2946
2967
|
const blocking = [];
|
|
2947
2968
|
const info = [];
|
|
2948
2969
|
for (const e of errors) {
|
|
2949
|
-
const threshold = rolloutThresholdFor(e);
|
|
2970
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2950
2971
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2951
2972
|
(grandfathered ? info : blocking).push(e);
|
|
2952
2973
|
}
|
|
@@ -3414,8 +3435,8 @@ function checkIssueRationale(body) {
|
|
|
3414
3435
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3415
3436
|
}
|
|
3416
3437
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3417
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3418
|
-
if (issueNumber !== null && issueNumber <
|
|
3438
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3439
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3419
3440
|
return { status: "pass", errors: [] };
|
|
3420
3441
|
const result = objectivesOf(body);
|
|
3421
3442
|
if (result.ok)
|
|
@@ -3491,6 +3512,8 @@ function parseIssueSurface(body) {
|
|
|
3491
3512
|
function globCoversPath(glob, path) {
|
|
3492
3513
|
const g = glob.replace(/\/\*\*?$/, "").replace(/\/+$/, "");
|
|
3493
3514
|
const p = path.replace(/\/+$/, "");
|
|
3515
|
+
if (g === "*")
|
|
3516
|
+
return !p.includes("/");
|
|
3494
3517
|
return g === p || g.startsWith(`${p}/`) || p.startsWith(`${g}/`);
|
|
3495
3518
|
}
|
|
3496
3519
|
function checkSurfaceGlobsResolve(body, resolvesToFile) {
|
|
@@ -3860,7 +3883,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3860
3883
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3861
3884
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3862
3885
|
}
|
|
3863
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3886
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3864
3887
|
const failures = [];
|
|
3865
3888
|
for (const [slug, issues] of issuesBySlug) {
|
|
3866
3889
|
for (const issue of issues) {
|
|
@@ -3869,7 +3892,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3869
3892
|
const errors = [
|
|
3870
3893
|
...checkIssueRationale(issue.body).errors,
|
|
3871
3894
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3872
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3895
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3873
3896
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3874
3897
|
];
|
|
3875
3898
|
if (errors.length === 0)
|
|
@@ -4492,13 +4515,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4492
4515
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4493
4516
|
return `${shipsPrefix}tranches/completed/`;
|
|
4494
4517
|
}
|
|
4495
|
-
|
|
4496
|
-
|
|
4518
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4519
|
+
function normalizeSpecPath(entry) {
|
|
4520
|
+
let out = entry.replace(/\\/g, "/");
|
|
4521
|
+
while (out.startsWith("./"))
|
|
4522
|
+
out = out.slice(2);
|
|
4523
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4524
|
+
while (out.endsWith("/"))
|
|
4525
|
+
out = out.slice(0, -1);
|
|
4526
|
+
return out;
|
|
4527
|
+
}
|
|
4528
|
+
function isSpecFile2(path, specPaths) {
|
|
4529
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4530
|
+
return true;
|
|
4531
|
+
if (!path.endsWith(".md"))
|
|
4532
|
+
return false;
|
|
4533
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4497
4534
|
}
|
|
4498
4535
|
function isClaudeMdFile(path) {
|
|
4499
4536
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4500
4537
|
}
|
|
4501
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4538
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4502
4539
|
if (path.startsWith(shipsPrefix)) {
|
|
4503
4540
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4504
4541
|
}
|
|
@@ -4507,7 +4544,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4507
4544
|
}
|
|
4508
4545
|
if (isClaudeMdFile(path))
|
|
4509
4546
|
return "internal";
|
|
4510
|
-
if (isSpecFile2(path))
|
|
4547
|
+
if (isSpecFile2(path, specPaths))
|
|
4511
4548
|
return "spec";
|
|
4512
4549
|
if (isProductScopeFile(path))
|
|
4513
4550
|
return "product";
|
|
@@ -4536,13 +4573,14 @@ function lineAt(content, index) {
|
|
|
4536
4573
|
}
|
|
4537
4574
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4538
4575
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4576
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4539
4577
|
function legacySlugPattern(legacySlugs) {
|
|
4540
4578
|
if (legacySlugs.length === 0)
|
|
4541
4579
|
return null;
|
|
4542
4580
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4543
4581
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4544
4582
|
}
|
|
4545
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4583
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4546
4584
|
const findings = [];
|
|
4547
4585
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4548
4586
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4554,8 +4592,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4554
4592
|
const productPatterns = [
|
|
4555
4593
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4556
4594
|
];
|
|
4595
|
+
const specPatterns = [
|
|
4596
|
+
...patterns,
|
|
4597
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4598
|
+
];
|
|
4557
4599
|
for (const file of files) {
|
|
4558
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4600
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4559
4601
|
if (!cls || cls === "internal")
|
|
4560
4602
|
continue;
|
|
4561
4603
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4564,15 +4606,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4564
4606
|
continue;
|
|
4565
4607
|
const blocking = cls === "product" || cls === "spec";
|
|
4566
4608
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4567
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4609
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4568
4610
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4569
4611
|
pattern.lastIndex = 0;
|
|
4570
4612
|
let match = pattern.exec(scrubbed);
|
|
4571
4613
|
while (match !== null) {
|
|
4572
4614
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4615
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4573
4616
|
findings.push({
|
|
4574
4617
|
file: file.path,
|
|
4575
|
-
line: lineAt(scrubbed,
|
|
4618
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4576
4619
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4577
4620
|
blocking
|
|
4578
4621
|
});
|
|
@@ -4758,9 +4801,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4758
4801
|
}
|
|
4759
4802
|
return findings;
|
|
4760
4803
|
}
|
|
4761
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4804
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4762
4805
|
return [
|
|
4763
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4806
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4764
4807
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4765
4808
|
];
|
|
4766
4809
|
}
|
|
@@ -5225,7 +5268,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5225
5268
|
}).merge(ObservedSchema);
|
|
5226
5269
|
var TaskStatusResultSchema = z.object({
|
|
5227
5270
|
items: z.array(TaskStatusItemSchema),
|
|
5228
|
-
nextCursor: z.string().nullable()
|
|
5271
|
+
nextCursor: z.string().nullable(),
|
|
5272
|
+
table: z.string()
|
|
5229
5273
|
});
|
|
5230
5274
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5231
5275
|
var EscalationInputsSchema = z.object({
|
|
@@ -5569,6 +5613,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5569
5613
|
}
|
|
5570
5614
|
return findings;
|
|
5571
5615
|
}
|
|
5616
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5617
|
+
var NO_GATE_CUTOVERS = {
|
|
5618
|
+
objectivesSinceIssue: null,
|
|
5619
|
+
briefSectionsSinceIssue: null,
|
|
5620
|
+
documentationSinceIssue: null,
|
|
5621
|
+
briefRulesSincePr: null,
|
|
5622
|
+
agentBoxesRefusedSincePr: null
|
|
5623
|
+
};
|
|
5572
5624
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5573
5625
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5574
5626
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6018,6 +6070,8 @@ function attemptFromEnv(value) {
|
|
|
6018
6070
|
function provenanceFor(input) {
|
|
6019
6071
|
if (input.provenance)
|
|
6020
6072
|
return input.provenance;
|
|
6073
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6074
|
+
return "unavailable";
|
|
6021
6075
|
if (input.env.role || input.env.task)
|
|
6022
6076
|
return "env_correlated";
|
|
6023
6077
|
return "unavailable";
|
|
@@ -6038,7 +6092,7 @@ function buildHeader(input) {
|
|
|
6038
6092
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6039
6093
|
const round = roundFromEnv(input.env.round);
|
|
6040
6094
|
const subject = {
|
|
6041
|
-
issue: issueFromTask(input.env.task),
|
|
6095
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6042
6096
|
role,
|
|
6043
6097
|
...round !== undefined ? { round } : {},
|
|
6044
6098
|
...input.subject ?? {}
|
|
@@ -6822,6 +6876,10 @@ var COMMANDS = [
|
|
|
6822
6876
|
flag: "--role <name>",
|
|
6823
6877
|
description: "Resolve to a specific role file (roles/<name>.md) instead of the front door"
|
|
6824
6878
|
},
|
|
6879
|
+
{
|
|
6880
|
+
flag: "--template <name>",
|
|
6881
|
+
description: "Print a template the package ships (templates/<name>-template.md) instead of the front door"
|
|
6882
|
+
},
|
|
6825
6883
|
{
|
|
6826
6884
|
flag: "--print",
|
|
6827
6885
|
description: "Emit the resolved file's body (frontmatter stripped) instead of its path — the one-hop mode every generated skill and slash command invokes. A role file whose frontmatter carries an `ack-token` emits that token as the output's own first line."
|
|
@@ -7006,6 +7064,17 @@ var COMMANDS = [
|
|
|
7006
7064
|
"issue-711 O4: this command — `--task <n>`, `--resume <pr>`, `--cancel <pr>` alike — stays `task run`'s own one-shot debug/direct entry; the watching driver that survives a pause and continues on its own is `task run`'s (see that command's own entry)."
|
|
7007
7065
|
],
|
|
7008
7066
|
status: "shipped"
|
|
7067
|
+
},
|
|
7068
|
+
{
|
|
7069
|
+
name: "log send",
|
|
7070
|
+
description: "Deliver this repository's locally-held log events to the configured `logs.url` server, once",
|
|
7071
|
+
flags: [{ flag: "--json", description: "Enveloped JSON output (schema: 1)" }],
|
|
7072
|
+
details: [
|
|
7073
|
+
"For a run whose events ended up on local disk instead of the configured server — an unattended run that fell back to the local folder because the trust-anchor read could not confirm its `logs.url` (a developer machine slower than the read deadline, or genuinely offline), or a retry queue holding a backlog or a `.draining.ndjson` a dead drain left behind. It moves the local folder's events into the retry queue and drains every queue for this repository through the SAME webhook delivery a live event uses.",
|
|
7074
|
+
"It resolves the destination exactly the way a normal event does — the sink's own decision over `vinaya.config.json`'s `logs` setting, trust-anchor-gated for an unattended caller — never a URL passed on the command line. A repository whose destination is a folder (or none) has nothing to send to a server and the command says so.",
|
|
7075
|
+
"Safe to run more than once: the server stores events by `event_id` and ignores one it already holds, so a re-sent chunk creates no duplicate, and a second run finds the folder emptied and the queue drained."
|
|
7076
|
+
],
|
|
7077
|
+
status: "shipped"
|
|
7009
7078
|
}
|
|
7010
7079
|
];
|
|
7011
7080
|
// ../../packages/sources/src/forge-adapter.ts
|
|
@@ -7189,7 +7258,12 @@ var VinayaConfigSchema = z5.object({
|
|
|
7189
7258
|
allowlist: z5.array(z5.string().min(1)).optional(),
|
|
7190
7259
|
severity: z5.enum(["warning", "error"]).optional()
|
|
7191
7260
|
}).optional(),
|
|
7192
|
-
specGrandfather: z5.array(z5.string().min(1)).optional()
|
|
7261
|
+
specGrandfather: z5.array(z5.string().min(1)).optional(),
|
|
7262
|
+
specPaths: z5.array(z5.string().min(1).refine((entry) => !entry.startsWith("/") && !/^[A-Za-z]:/.test(entry), {
|
|
7263
|
+
message: "must be a repository-relative path, not an absolute one"
|
|
7264
|
+
}).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
|
|
7265
|
+
message: "must stay inside the repository — no `..` segment"
|
|
7266
|
+
})).optional()
|
|
7193
7267
|
}).optional(),
|
|
7194
7268
|
projects: z5.array(ProjectEntrySchema).optional(),
|
|
7195
7269
|
dispatch: z5.object({
|
|
@@ -7203,6 +7277,13 @@ var VinayaConfigSchema = z5.object({
|
|
|
7203
7277
|
securityThreshold: z5.string().min(1).optional(),
|
|
7204
7278
|
maxRounds: z5.number().optional()
|
|
7205
7279
|
}).optional(),
|
|
7280
|
+
gateCutovers: z5.object({
|
|
7281
|
+
objectivesSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7282
|
+
briefSectionsSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7283
|
+
documentationSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7284
|
+
briefRulesSincePr: z5.number().int().nonnegative().optional(),
|
|
7285
|
+
agentBoxesRefusedSincePr: z5.number().int().nonnegative().optional()
|
|
7286
|
+
}).optional(),
|
|
7206
7287
|
prePush: z5.object({
|
|
7207
7288
|
alwaysRun: z5.array(z5.string()).optional()
|
|
7208
7289
|
}).optional(),
|
|
@@ -7340,6 +7421,18 @@ function resolveReviewPolicy(config) {
|
|
|
7340
7421
|
maxRounds
|
|
7341
7422
|
};
|
|
7342
7423
|
}
|
|
7424
|
+
function resolveGateCutovers(config) {
|
|
7425
|
+
const raw = config?.gateCutovers;
|
|
7426
|
+
if (!raw)
|
|
7427
|
+
return NO_GATE_CUTOVERS;
|
|
7428
|
+
return {
|
|
7429
|
+
objectivesSinceIssue: raw.objectivesSinceIssue ?? null,
|
|
7430
|
+
briefSectionsSinceIssue: raw.briefSectionsSinceIssue ?? null,
|
|
7431
|
+
documentationSinceIssue: raw.documentationSinceIssue ?? null,
|
|
7432
|
+
briefRulesSincePr: raw.briefRulesSincePr ?? null,
|
|
7433
|
+
agentBoxesRefusedSincePr: raw.agentBoxesRefusedSincePr ?? null
|
|
7434
|
+
};
|
|
7435
|
+
}
|
|
7343
7436
|
function resolveRuntimeDirSetting(config) {
|
|
7344
7437
|
return config?.runtimeDir ?? null;
|
|
7345
7438
|
}
|
|
@@ -7395,7 +7488,8 @@ async function trustAnchorRepoAsync() {
|
|
|
7395
7488
|
try {
|
|
7396
7489
|
const { stdout } = await execFileAsync4("git", ["remote", "get-url", "origin"], {
|
|
7397
7490
|
encoding: "utf-8",
|
|
7398
|
-
timeout: 1e4
|
|
7491
|
+
timeout: 1e4,
|
|
7492
|
+
killSignal: "SIGKILL"
|
|
7399
7493
|
});
|
|
7400
7494
|
return trustAnchorRepoFromRemoteUrl(stdout);
|
|
7401
7495
|
} catch {
|
|
@@ -7456,7 +7550,7 @@ async function ghFetchTrustAnchorConfigAsync() {
|
|
|
7456
7550
|
const repo = await trustAnchorRepoAsync();
|
|
7457
7551
|
if (!repo)
|
|
7458
7552
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
7459
|
-
const { stdout } = await execFileAsync4("gh", ["api", `repos/${repo}/contents/${LOCAL_CONFIG_FILENAME}`, "--jq", ".content"], { encoding: "utf-8", timeout: 1e4 });
|
|
7553
|
+
const { stdout } = await execFileAsync4("gh", ["api", `repos/${repo}/contents/${LOCAL_CONFIG_FILENAME}`, "--jq", ".content"], { encoding: "utf-8", timeout: 1e4, killSignal: "SIGKILL" });
|
|
7460
7554
|
return stdout;
|
|
7461
7555
|
}
|
|
7462
7556
|
function firstLine(err) {
|
|
@@ -7726,7 +7820,8 @@ async function main() {
|
|
|
7726
7820
|
agent_recovery_prompt: "If this repo has more than one project, register them with `vinaya init product <name> --path <folder>` so R1 can resolve each task's `Project:` field. A single-project repo has no registry by design — no action needed."
|
|
7727
7821
|
});
|
|
7728
7822
|
}
|
|
7729
|
-
|
|
7823
|
+
const { objectivesSinceIssue } = resolveGateCutovers(loadConfig());
|
|
7824
|
+
results.push(checkR1(openIssuesBySlug, R1_GRANDFATHERED_ISSUES, registeredNames, objectivesSinceIssue));
|
|
7730
7825
|
const failed = results.filter((r) => r.status === "fail");
|
|
7731
7826
|
if (failed.length > 0) {
|
|
7732
7827
|
for (const r of failed)
|