codex-orchestrator 0.1.38 → 0.1.40
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/CHANGELOG.md +24 -0
- package/README.md +17 -0
- package/dist/src/codex/command-adapter.d.ts +6 -0
- package/dist/src/codex/command-adapter.d.ts.map +1 -1
- package/dist/src/codex/command-adapter.js +79 -2
- package/dist/src/codex/command-adapter.js.map +1 -1
- package/dist/src/config/schema.d.ts +16 -1
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +67 -1
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/git/worktree.d.ts.map +1 -1
- package/dist/src/git/worktree.js +0 -1
- package/dist/src/git/worktree.js.map +1 -1
- package/dist/src/runner/acceptance-proof-runner.d.ts +2 -15
- package/dist/src/runner/acceptance-proof-runner.d.ts.map +1 -1
- package/dist/src/runner/acceptance-proof-runner.js +40 -72
- package/dist/src/runner/acceptance-proof-runner.js.map +1 -1
- package/dist/src/runner/acceptance-proof.d.ts +60 -0
- package/dist/src/runner/acceptance-proof.d.ts.map +1 -1
- package/dist/src/runner/acceptance-proof.js +113 -0
- package/dist/src/runner/acceptance-proof.js.map +1 -1
- package/dist/src/runner/android-visual-proof-command.d.ts.map +1 -1
- package/dist/src/runner/android-visual-proof-command.js +2 -8
- package/dist/src/runner/android-visual-proof-command.js.map +1 -1
- package/dist/src/runner/auto-visual-proof-command.d.ts.map +1 -1
- package/dist/src/runner/auto-visual-proof-command.js +11 -1
- package/dist/src/runner/auto-visual-proof-command.js.map +1 -1
- package/dist/src/runner/command-utils.d.ts.map +1 -1
- package/dist/src/runner/command-utils.js +17 -11
- package/dist/src/runner/command-utils.js.map +1 -1
- package/dist/src/runner/completion-report.d.ts +21 -5
- package/dist/src/runner/completion-report.d.ts.map +1 -1
- package/dist/src/runner/completion-report.js +29 -0
- package/dist/src/runner/completion-report.js.map +1 -1
- package/dist/src/runner/daemon-command.js +2 -35
- package/dist/src/runner/daemon-command.js.map +1 -1
- package/dist/src/runner/durable-run-summary.d.ts +12 -0
- package/dist/src/runner/durable-run-summary.d.ts.map +1 -1
- package/dist/src/runner/durable-run-summary.js +2 -0
- package/dist/src/runner/durable-run-summary.js.map +1 -1
- package/dist/src/runner/flutter-sdk-discovery.d.ts +5 -0
- package/dist/src/runner/flutter-sdk-discovery.d.ts.map +1 -0
- package/dist/src/runner/flutter-sdk-discovery.js +103 -0
- package/dist/src/runner/flutter-sdk-discovery.js.map +1 -0
- package/dist/src/runner/handoff-evidence.d.ts +5 -7
- package/dist/src/runner/handoff-evidence.d.ts.map +1 -1
- package/dist/src/runner/handoff-evidence.js +22 -1
- package/dist/src/runner/handoff-evidence.js.map +1 -1
- package/dist/src/runner/ios-visual-proof-command.d.ts.map +1 -1
- package/dist/src/runner/ios-visual-proof-command.js +2 -4
- package/dist/src/runner/ios-visual-proof-command.js.map +1 -1
- package/dist/src/runner/issue-tree.d.ts.map +1 -1
- package/dist/src/runner/issue-tree.js +28 -2
- package/dist/src/runner/issue-tree.js.map +1 -1
- package/dist/src/runner/local-execution-session.d.ts +1 -5
- package/dist/src/runner/local-execution-session.d.ts.map +1 -1
- package/dist/src/runner/local-execution-session.js +83 -5
- package/dist/src/runner/local-execution-session.js.map +1 -1
- package/dist/src/runner/plan-auto-command.d.ts.map +1 -1
- package/dist/src/runner/plan-auto-command.js +180 -96
- package/dist/src/runner/plan-auto-command.js.map +1 -1
- package/dist/src/runner/prompt.d.ts +1 -0
- package/dist/src/runner/prompt.d.ts.map +1 -1
- package/dist/src/runner/prompt.js +9 -4
- package/dist/src/runner/prompt.js.map +1 -1
- package/dist/src/runner/proof-strategy.d.ts +12 -0
- package/dist/src/runner/proof-strategy.d.ts.map +1 -0
- package/dist/src/runner/proof-strategy.js +19 -0
- package/dist/src/runner/proof-strategy.js.map +1 -0
- package/dist/src/runner/review-gate-policy.d.ts +1 -1
- package/dist/src/runner/review-gate-policy.d.ts.map +1 -1
- package/dist/src/runner/review-gate-policy.js +88 -3
- package/dist/src/runner/review-gate-policy.js.map +1 -1
- package/dist/src/runner/rework-policy.d.ts +34 -2
- package/dist/src/runner/rework-policy.d.ts.map +1 -1
- package/dist/src/runner/rework-policy.js +89 -14
- package/dist/src/runner/rework-policy.js.map +1 -1
- package/dist/src/runner/runner-handoff-decision.d.ts +47 -0
- package/dist/src/runner/runner-handoff-decision.d.ts.map +1 -0
- package/dist/src/runner/runner-handoff-decision.js +66 -0
- package/dist/src/runner/runner-handoff-decision.js.map +1 -0
- package/dist/src/runner/scope-isolation-policy.d.ts +17 -0
- package/dist/src/runner/scope-isolation-policy.d.ts.map +1 -0
- package/dist/src/runner/scope-isolation-policy.js +82 -0
- package/dist/src/runner/scope-isolation-policy.js.map +1 -0
- package/dist/src/runner/scoped-auto-command.d.ts +13 -2
- package/dist/src/runner/scoped-auto-command.d.ts.map +1 -1
- package/dist/src/runner/scoped-auto-command.js +138 -63
- package/dist/src/runner/scoped-auto-command.js.map +1 -1
- package/dist/src/runner/scoped-recovery.d.ts.map +1 -1
- package/dist/src/runner/scoped-recovery.js +123 -23
- package/dist/src/runner/scoped-recovery.js.map +1 -1
- package/dist/src/runner/visual-proof-runner.d.ts +4 -0
- package/dist/src/runner/visual-proof-runner.d.ts.map +1 -1
- package/dist/src/runner/visual-proof-runner.js +85 -39
- package/dist/src/runner/visual-proof-runner.js.map +1 -1
- package/dist/src/setup/project-config.d.ts +2 -1
- package/dist/src/setup/project-config.d.ts.map +1 -1
- package/dist/src/setup/project-config.js +61 -14
- package/dist/src/setup/project-config.js.map +1 -1
- package/docs/deep-dive.md +34 -4
- package/package.json +1 -1
- package/prompts/workflows/issue-breakdown.md +10 -0
- package/prompts/workflows/triage.md +11 -0
|
@@ -1,28 +1,103 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
1
|
+
export const MISSING_COMPLETION_REPORT_REASON = 'Codex did not write CODEX_ORCHESTRATOR_REPORT_FILE; runner cannot prove safety contract.';
|
|
2
|
+
export const OPTIONAL_FIGMA_MCP_FAILURE_REASON = 'Optional Figma MCP failed before completion; retry without optional Figma MCP.';
|
|
3
|
+
export const REQUIRED_FIGMA_MCP_FAILURE_REASON = 'Required Figma MCP failed; required design access is unavailable.';
|
|
4
|
+
const missingCompletionReportPattern = new RegExp(escapeRegex(MISSING_COMPLETION_REPORT_REASON), 'iu');
|
|
5
|
+
const optionalFigmaPattern = new RegExp(escapeRegex(OPTIONAL_FIGMA_MCP_FAILURE_REASON), 'iu');
|
|
6
|
+
const requiredFigmaPattern = new RegExp(escapeRegex(REQUIRED_FIGMA_MCP_FAILURE_REASON), 'iu');
|
|
7
|
+
const blockerPatterns = [
|
|
8
|
+
['denied-path', /matches denied pattern/iu],
|
|
9
|
+
['publication-violation', /runner-owned publication was violated/iu],
|
|
10
|
+
['destructive-or-production-action', /destructive-db-or-cache|production-deploy-or-release/iu],
|
|
11
|
+
['required-figma-mcp-failure', requiredFigmaPattern],
|
|
12
|
+
['optional-figma-mcp-failure', optionalFigmaPattern],
|
|
7
13
|
['missing-quality-gate-evidence', /Quality gate requires/iu],
|
|
8
14
|
['failed-configured-checks', /One or more configured checks failed/iu],
|
|
9
15
|
['failed-acceptance-proof', /Acceptance proof/iu],
|
|
10
16
|
['risk-routing-policy', /Risk routing gate requires/iu],
|
|
11
17
|
['invalid-completion-report', /Invalid scoped completion report/iu],
|
|
12
|
-
['missing-completion-report',
|
|
18
|
+
['missing-completion-report', missingCompletionReportPattern],
|
|
13
19
|
['no-changed-files', /Codex completed without file changes/iu],
|
|
14
20
|
];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
const hardBlockerKeys = new Set([
|
|
22
|
+
'denied-path',
|
|
23
|
+
'publication-violation',
|
|
24
|
+
'destructive-or-production-action',
|
|
25
|
+
'required-figma-mcp-failure',
|
|
26
|
+
'unknown',
|
|
27
|
+
]);
|
|
28
|
+
export function decideImplementationRework(input) {
|
|
29
|
+
const blockerKeys = classifyBlockerKeys(input.reasons);
|
|
30
|
+
const hardBlockers = blockerKeys.filter((key) => hardBlockerKeys.has(key));
|
|
31
|
+
if (hardBlockers.length > 0) {
|
|
32
|
+
return {
|
|
33
|
+
kind: 'hard-block',
|
|
34
|
+
attempt: input.attempt,
|
|
35
|
+
blockerKeys,
|
|
36
|
+
reasons: input.reasons,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const retryable = new Set(input.config.loopPolicy.rework.retryableBlockers);
|
|
40
|
+
const retryableBlockerKeys = blockerKeys.filter((key) => retryable.has(key));
|
|
41
|
+
if (retryableBlockerKeys.length === 0) {
|
|
42
|
+
return {
|
|
43
|
+
kind: 'hard-block',
|
|
44
|
+
attempt: input.attempt,
|
|
45
|
+
blockerKeys,
|
|
46
|
+
reasons: input.reasons,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const maxAttempts = maxAttemptsForBlockerKeys(blockerKeys, input.config);
|
|
50
|
+
if (input.attempt >= maxAttempts) {
|
|
51
|
+
return {
|
|
52
|
+
kind: 'exhausted',
|
|
53
|
+
attempt: input.attempt,
|
|
54
|
+
maxAttempts,
|
|
55
|
+
blockerKeys,
|
|
56
|
+
reasons: input.reasons,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
kind: 'retry',
|
|
61
|
+
attempt: input.attempt,
|
|
62
|
+
nextAttempt: input.attempt + 1,
|
|
63
|
+
maxAttempts,
|
|
64
|
+
blockerKeys,
|
|
65
|
+
reasons: input.reasons,
|
|
66
|
+
rework: {
|
|
67
|
+
attempt: input.attempt + 1,
|
|
68
|
+
blockedReasons: input.reasons,
|
|
69
|
+
disableOptionalFigmaMcp: blockerKeys.includes('optional-figma-mcp-failure'),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function classifyBlockerKeys(reasons) {
|
|
74
|
+
const keys = [];
|
|
75
|
+
for (const reason of reasons) {
|
|
76
|
+
const matched = blockerPatterns
|
|
77
|
+
.filter(([, pattern]) => pattern.test(reason))
|
|
78
|
+
.map(([key]) => key);
|
|
79
|
+
if (matched.length === 0) {
|
|
80
|
+
pushUnique(keys, 'unknown');
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
for (const key of matched) {
|
|
84
|
+
pushUnique(keys, key);
|
|
85
|
+
}
|
|
18
86
|
}
|
|
19
|
-
|
|
20
|
-
return reasons.some((reason) => retryableBlockerPatterns.some(([blocker, pattern]) => retryable.has(blocker) && pattern.test(reason)));
|
|
87
|
+
return keys;
|
|
21
88
|
}
|
|
22
|
-
|
|
23
|
-
if (
|
|
89
|
+
function maxAttemptsForBlockerKeys(blockerKeys, config) {
|
|
90
|
+
if (blockerKeys.includes('failed-acceptance-proof')) {
|
|
24
91
|
return Math.max(0, config.reviewGates.acceptanceProof.maxIterations - 1);
|
|
25
92
|
}
|
|
26
93
|
return config.loopPolicy.rework.maxAttempts;
|
|
27
94
|
}
|
|
95
|
+
function pushUnique(items, item) {
|
|
96
|
+
if (!items.includes(item)) {
|
|
97
|
+
items.push(item);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function escapeRegex(value) {
|
|
101
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
102
|
+
}
|
|
28
103
|
//# sourceMappingURL=rework-policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rework-policy.js","sourceRoot":"","sources":["../../../src/runner/rework-policy.ts"],"names":[],"mappings":"AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"rework-policy.js","sourceRoot":"","sources":["../../../src/runner/rework-policy.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gCAAgC,GAC3C,0FAA0F,CAAC;AAE7F,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gFAAgF,CAAC;AAEnF,MAAM,CAAC,MAAM,iCAAiC,GAC5C,mEAAmE,CAAC;AAmD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@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AcceptanceProofAttemptEvidence } from './acceptance-proof-runner.js';
|
|
2
|
+
import type { FreshContextReviewEvidence, RunnerValidationLine } from './handoff-evidence.js';
|
|
3
|
+
import type { ImplementationPublishabilityResult } from './local-execution-session.js';
|
|
4
|
+
export interface RunnerHandoffEvidence {
|
|
5
|
+
outcome: 'review-ready' | 'blocked' | 'promotion-requested';
|
|
6
|
+
changedFiles: string[];
|
|
7
|
+
validation: RunnerValidationLine[];
|
|
8
|
+
skippedChecks: string[];
|
|
9
|
+
residualRisks: string[];
|
|
10
|
+
blockers: string[];
|
|
11
|
+
nextAction: string;
|
|
12
|
+
suggestionEvidence?: string[];
|
|
13
|
+
acceptanceProof?: AcceptanceProofAttemptEvidence;
|
|
14
|
+
}
|
|
15
|
+
type BlockablePublishability = Extract<ImplementationPublishabilityResult, {
|
|
16
|
+
status: 'blocked';
|
|
17
|
+
}> | Extract<ImplementationPublishabilityResult, {
|
|
18
|
+
status: 'publish-ready';
|
|
19
|
+
}>;
|
|
20
|
+
export declare function buildBlockedHandoffEvidence(input: {
|
|
21
|
+
publishability: BlockablePublishability;
|
|
22
|
+
freshContextReview?: FreshContextReviewEvidence;
|
|
23
|
+
nextAction: string;
|
|
24
|
+
}): RunnerHandoffEvidence;
|
|
25
|
+
export declare function buildPromotionRequestedHandoffEvidence(input: {
|
|
26
|
+
publishability: Extract<ImplementationPublishabilityResult, {
|
|
27
|
+
status: 'promotion-requested';
|
|
28
|
+
}>;
|
|
29
|
+
nextAction: string;
|
|
30
|
+
fallbackReason?: string;
|
|
31
|
+
}): RunnerHandoffEvidence;
|
|
32
|
+
export declare function buildPromotionAsBlockedHandoffEvidence(input: {
|
|
33
|
+
publishability: Extract<ImplementationPublishabilityResult, {
|
|
34
|
+
status: 'promotion-requested';
|
|
35
|
+
}>;
|
|
36
|
+
nextAction: string;
|
|
37
|
+
fallbackReason: string;
|
|
38
|
+
}): RunnerHandoffEvidence;
|
|
39
|
+
export declare function buildReviewReadyHandoffEvidence(input: {
|
|
40
|
+
publishability: Extract<ImplementationPublishabilityResult, {
|
|
41
|
+
status: 'publish-ready';
|
|
42
|
+
}>;
|
|
43
|
+
freshContextReview?: FreshContextReviewEvidence;
|
|
44
|
+
nextAction: string;
|
|
45
|
+
}): RunnerHandoffEvidence;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=runner-handoff-decision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-handoff-decision.d.ts","sourceRoot":"","sources":["../../../src/runner/runner-handoff-decision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,qBAAqB,CAAC;IAC5D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,8BAA8B,CAAC;CAClD;AAED,KAAK,uBAAuB,GACxB,OAAO,CAAC,kCAAkC,EAAE;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC,GAClE,OAAO,CAAC,kCAAkC,EAAE;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAAC;AAE7E,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,cAAc,EAAE,uBAAuB,CAAC;IACxC,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAoBxB;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE;IAC5D,cAAc,EAAE,OAAO,CAAC,kCAAkC,EAAE;QAAE,MAAM,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAAC;IAC/F,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,qBAAqB,CAOxB;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE;IAC5D,cAAc,EAAE,OAAO,CAAC,kCAAkC,EAAE;QAAE,MAAM,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAAC;IAC/F,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,qBAAqB,CAOxB;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC,kCAAkC,EAAE;QAAE,MAAM,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;IACzF,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAexB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function buildBlockedHandoffEvidence(input) {
|
|
2
|
+
const blockers = input.freshContextReview?.status === 'blocked'
|
|
3
|
+
? ['Fresh-Context Review blocked publication', ...input.freshContextReview.findings]
|
|
4
|
+
: input.publishability.status === 'blocked'
|
|
5
|
+
? input.publishability.reasons
|
|
6
|
+
: [];
|
|
7
|
+
return {
|
|
8
|
+
outcome: 'blocked',
|
|
9
|
+
changedFiles: input.publishability.changedFiles,
|
|
10
|
+
validation: input.publishability.validation ?? [],
|
|
11
|
+
skippedChecks: input.publishability.skippedChecks,
|
|
12
|
+
residualRisks: [
|
|
13
|
+
...input.publishability.residualRisks,
|
|
14
|
+
...(input.freshContextReview?.residualRisks ?? []),
|
|
15
|
+
],
|
|
16
|
+
blockers,
|
|
17
|
+
nextAction: input.nextAction,
|
|
18
|
+
suggestionEvidence: input.freshContextReview?.findings,
|
|
19
|
+
acceptanceProof: input.publishability.acceptanceProofAttempt,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function buildPromotionRequestedHandoffEvidence(input) {
|
|
23
|
+
return promotionHandoffEvidence({
|
|
24
|
+
outcome: 'promotion-requested',
|
|
25
|
+
publishability: input.publishability,
|
|
26
|
+
nextAction: input.nextAction,
|
|
27
|
+
fallbackReason: input.fallbackReason ?? 'Promotion requested',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function buildPromotionAsBlockedHandoffEvidence(input) {
|
|
31
|
+
return promotionHandoffEvidence({
|
|
32
|
+
outcome: 'blocked',
|
|
33
|
+
publishability: input.publishability,
|
|
34
|
+
nextAction: input.nextAction,
|
|
35
|
+
fallbackReason: input.fallbackReason,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export function buildReviewReadyHandoffEvidence(input) {
|
|
39
|
+
return {
|
|
40
|
+
outcome: 'review-ready',
|
|
41
|
+
changedFiles: input.publishability.changedFiles,
|
|
42
|
+
validation: input.publishability.validation,
|
|
43
|
+
skippedChecks: input.publishability.skippedChecks,
|
|
44
|
+
residualRisks: [
|
|
45
|
+
...input.publishability.residualRisks,
|
|
46
|
+
...(input.freshContextReview?.residualRisks ?? []),
|
|
47
|
+
],
|
|
48
|
+
blockers: [],
|
|
49
|
+
nextAction: input.nextAction,
|
|
50
|
+
suggestionEvidence: input.freshContextReview?.findings,
|
|
51
|
+
acceptanceProof: input.publishability.acceptanceProofAttempt,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function promotionHandoffEvidence(input) {
|
|
55
|
+
const promotion = input.publishability.report.promotion;
|
|
56
|
+
return {
|
|
57
|
+
outcome: input.outcome,
|
|
58
|
+
changedFiles: [],
|
|
59
|
+
validation: input.publishability.report.validation,
|
|
60
|
+
skippedChecks: input.publishability.report.skippedChecks,
|
|
61
|
+
residualRisks: input.publishability.report.residualRisks,
|
|
62
|
+
blockers: [promotion?.reason ?? input.fallbackReason],
|
|
63
|
+
nextAction: input.nextAction,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=runner-handoff-decision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-handoff-decision.js","sourceRoot":"","sources":["../../../src/runner/runner-handoff-decision.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,2BAA2B,CAAC,KAI3C;IACC,MAAM,QAAQ,GAAG,KAAK,CAAC,kBAAkB,EAAE,MAAM,KAAK,SAAS;QAC7D,CAAC,CAAC,CAAC,0CAA0C,EAAE,GAAG,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC;QACpF,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,SAAS;YACzC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO;YAC9B,CAAC,CAAC,EAAE,CAAC;IACT,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY;QAC/C,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,IAAI,EAAE;QACjD,aAAa,EAAE,KAAK,CAAC,cAAc,CAAC,aAAa;QACjD,aAAa,EAAE;YACb,GAAG,KAAK,CAAC,cAAc,CAAC,aAAa;YACrC,GAAG,CAAC,KAAK,CAAC,kBAAkB,EAAE,aAAa,IAAI,EAAE,CAAC;SACnD;QACD,QAAQ;QACR,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,QAAQ;QACtD,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,sBAAsB;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sCAAsC,CAAC,KAItD;IACC,OAAO,wBAAwB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AAC,MAAM,CAAC,aAAa;QACxD,aAAa,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,aAAa;QACxD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC;QACrD,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CodexOrchestratorConfig } from '../config/schema.js';
|
|
2
|
+
import type { GitHubIssue } from '../github/issues.js';
|
|
3
|
+
export interface ScopeIsolationResult {
|
|
4
|
+
ownershipScopes: string[];
|
|
5
|
+
owned: string[];
|
|
6
|
+
runnerOwned: string[];
|
|
7
|
+
outOfScope: string[];
|
|
8
|
+
blockers: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function issueOwnershipScopes(issue: GitHubIssue): string[];
|
|
11
|
+
export declare function scopesOverlap(left: string[], right: string[]): boolean;
|
|
12
|
+
export declare function evaluateScopeIsolation(input: {
|
|
13
|
+
config: CodexOrchestratorConfig;
|
|
14
|
+
issue: GitHubIssue;
|
|
15
|
+
changedFiles: string[];
|
|
16
|
+
}): ScopeIsolationResult;
|
|
17
|
+
//# sourceMappingURL=scope-isolation-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-isolation-policy.d.ts","sourceRoot":"","sources":["../../../src/runner/scope-isolation-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAMjE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAMtE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,WAAW,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,GAAG,oBAAoB,CA8BvB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { globMatches, normalizePath } from '../path-policy.js';
|
|
2
|
+
export function issueOwnershipScopes(issue) {
|
|
3
|
+
return readMetadataBulletBlock(issue.body, 'Ownership')
|
|
4
|
+
.map((scope) => normalizePath(scope.trim()))
|
|
5
|
+
.filter(Boolean)
|
|
6
|
+
.filter(unique)
|
|
7
|
+
.sort((left, right) => left.localeCompare(right));
|
|
8
|
+
}
|
|
9
|
+
export function scopesOverlap(left, right) {
|
|
10
|
+
return left.some((leftScope) => right.some((rightScope) => leftScope === rightScope || globMatches(leftScope, rightScope) || globMatches(rightScope, leftScope)));
|
|
11
|
+
}
|
|
12
|
+
export function evaluateScopeIsolation(input) {
|
|
13
|
+
const ownershipScopes = issueOwnershipScopes(input.issue);
|
|
14
|
+
const normalizedFiles = input.changedFiles.map(normalizePath).filter(unique);
|
|
15
|
+
const owned = [];
|
|
16
|
+
const runnerOwned = [];
|
|
17
|
+
const outOfScope = [];
|
|
18
|
+
if (ownershipScopes.length === 0) {
|
|
19
|
+
return { ownershipScopes, owned: normalizedFiles, runnerOwned, outOfScope, blockers: [] };
|
|
20
|
+
}
|
|
21
|
+
for (const file of normalizedFiles) {
|
|
22
|
+
if (isRunnerOwnedPath(input.config, file)) {
|
|
23
|
+
runnerOwned.push(file);
|
|
24
|
+
}
|
|
25
|
+
else if (ownershipScopes.some((scope) => pathMatchesOwnershipScope(file, scope))) {
|
|
26
|
+
owned.push(file);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
outOfScope.push(file);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
ownershipScopes,
|
|
34
|
+
owned,
|
|
35
|
+
runnerOwned,
|
|
36
|
+
outOfScope,
|
|
37
|
+
blockers: outOfScope.length === 0
|
|
38
|
+
? []
|
|
39
|
+
: [`Changed files outside issue ownership scope: ${outOfScope.join(', ')}. Ownership scope: ${ownershipScopes.join(', ')}.`],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function isRunnerOwnedPath(config, path) {
|
|
43
|
+
return config.reviewGates.acceptanceProof.proofOwnedPathGlobs.some((pattern) => globMatches(pattern, path));
|
|
44
|
+
}
|
|
45
|
+
function pathMatchesOwnershipScope(path, scope) {
|
|
46
|
+
const normalizedScope = normalizePath(scope).replace(/\/+$/u, '');
|
|
47
|
+
return globMatches(normalizedScope, path) || path.startsWith(`${normalizedScope}/`);
|
|
48
|
+
}
|
|
49
|
+
function readMetadataBulletBlock(body, heading) {
|
|
50
|
+
const lines = body.split(/\r?\n/);
|
|
51
|
+
const metadataStart = lines.findIndex((line) => line.trim() === '## codex-orchestrator metadata');
|
|
52
|
+
if (metadataStart < 0) {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
const block = [];
|
|
56
|
+
let inBlock = false;
|
|
57
|
+
for (const line of lines.slice(metadataStart + 1)) {
|
|
58
|
+
if (line.startsWith('## ')) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
if (line.trim() === `${heading}:`) {
|
|
62
|
+
inBlock = true;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (!inBlock) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const item = /^[-*]\s+(.+)$/u.exec(line.trim());
|
|
69
|
+
if (item) {
|
|
70
|
+
block.push(item[1]?.trim() ?? '');
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (line.trim().length > 0) {
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return block.filter((item) => item.length > 0);
|
|
78
|
+
}
|
|
79
|
+
function unique(value, index, values) {
|
|
80
|
+
return values.indexOf(value) === index;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=scope-isolation-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-isolation-policy.js","sourceRoot":"","sources":["../../../src/runner/scope-isolation-policy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAU/D,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO,uBAAuB,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC;SACpD,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;SAC3C,MAAM,CAAC,OAAO,CAAC;SACf,MAAM,CAAC,MAAM,CAAC;SACd,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAc,EAAE,KAAe;IAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CACxB,SAAS,KAAK,UAAU,IAAI,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,CACrG,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,MAAM,eAAe,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,KA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AC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAClC,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM;QACR,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,KAAa,EAAE,MAAgB;IAC5D,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AACzC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type CodexCommandRunInput, type CodexCommandRunResult } from '../codex/command-adapter.js';
|
|
2
2
|
import type { CodexOrchestratorConfig } from '../config/schema.js';
|
|
3
|
-
import type { GitHubIssueAdapter } from '../github/issues.js';
|
|
3
|
+
import type { GitHubIssue, GitHubIssueAdapter } from '../github/issues.js';
|
|
4
4
|
import type { GitHubPullRequest, GitHubPullRequestAdapter } from '../github/pull-requests.js';
|
|
5
5
|
import { GitWorktreeManager } from '../git/worktree.js';
|
|
6
6
|
import { type ShellCommandExecutor } from '../process/command.js';
|
|
7
7
|
import { type FreshContextReviewEvidence } from './handoff-evidence.js';
|
|
8
|
-
import { writeDurableRunSummary } from './durable-run-summary.js';
|
|
8
|
+
import { writeDurableRunSummary, type ReworkAttemptEvidence } from './durable-run-summary.js';
|
|
9
9
|
import { type ImplementationPublishabilityResult, type LocalExecutionPhaseExecutor } from './local-execution-session.js';
|
|
10
10
|
import type { AcceptanceProofAttemptEvidence } from './acceptance-proof-runner.js';
|
|
11
11
|
export interface ScopedAutoCommandOptions {
|
|
@@ -22,6 +22,15 @@ export interface ScopedAutoCommandOptions {
|
|
|
22
22
|
shellExecutor?: ShellCommandExecutor;
|
|
23
23
|
now?: Date;
|
|
24
24
|
}
|
|
25
|
+
export interface ScopedRecoveryRetryOptions extends ScopedAutoCommandOptions {
|
|
26
|
+
issue: GitHubIssue;
|
|
27
|
+
startAttempt: number;
|
|
28
|
+
initialRework: {
|
|
29
|
+
attempt: number;
|
|
30
|
+
blockedReasons: string[];
|
|
31
|
+
disableOptionalFigmaMcp?: boolean;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
25
34
|
export interface ScopedAutoCommandResult {
|
|
26
35
|
issueNumber: number;
|
|
27
36
|
branchName: string;
|
|
@@ -34,6 +43,7 @@ export interface ScopedAutoCommandResult {
|
|
|
34
43
|
reportComment: string;
|
|
35
44
|
}
|
|
36
45
|
export declare function runScopedAutoCommand(options: ScopedAutoCommandOptions): Promise<ScopedAutoCommandResult>;
|
|
46
|
+
export declare function runScopedRecoveryRetry(options: ScopedRecoveryRetryOptions): Promise<ScopedAutoCommandResult>;
|
|
37
47
|
export interface FinishScopedReviewReadyHandoffInput {
|
|
38
48
|
issueNumber: number;
|
|
39
49
|
branchName: string;
|
|
@@ -67,6 +77,7 @@ export interface FinishScopedBlockedHandoffInput {
|
|
|
67
77
|
residualRisks: string[];
|
|
68
78
|
freshContextReview?: FreshContextReviewEvidence;
|
|
69
79
|
durableRunSummary?: Awaited<ReturnType<typeof writeDurableRunSummary>>;
|
|
80
|
+
reworkAttempts?: ReworkAttemptEvidence[];
|
|
70
81
|
acceptanceProof?: AcceptanceProofAttemptEvidence;
|
|
71
82
|
commentPrefix?: string;
|
|
72
83
|
skipCommentIfIncludes?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scoped-auto-command.d.ts","sourceRoot":"","sources":["../../../src/runner/scoped-auto-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,OAAO,KAAK,
|
|
1
|
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