mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 02:11:28 +00:00
hotfix(ci): clean up ai review reruns and logging
This commit is contained in:
@@ -178,8 +178,6 @@ jobs:
|
||||
echo "review_mode=$REVIEW_MODE"
|
||||
echo "review_scope=$REVIEW_SCOPE"
|
||||
echo "review_mode_reason=$REVIEW_MODE_REASON"
|
||||
echo "max_turns=$MAX_TURNS"
|
||||
echo "max_thinking_tokens=$MAX_THINKING_TOKENS"
|
||||
echo "claude_timeout_minutes=$CLAUDE_TIMEOUT_MINUTES"
|
||||
echo "runs_on=$RUNS_ON"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
@@ -543,8 +541,6 @@ jobs:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
REVIEW_MARKER: >-
|
||||
<!-- ccs-ai-review
|
||||
run:${{ github.run_id }}
|
||||
attempt:${{ github.run_attempt }}
|
||||
pr:${{ needs.prepare.outputs.pr_number }}
|
||||
sha:${{ needs.prepare.outputs.head_sha }} -->
|
||||
run: |
|
||||
|
||||
@@ -271,7 +271,7 @@ export async function writeDirectReviewFromEnv(env = process.env, fetchImpl = gl
|
||||
attempt === 1
|
||||
? buildPrimaryPrompt({ meta, packet })
|
||||
: `${buildPrimaryPrompt({ meta, packet })}\n\n${buildRepairPrompt({ validationReason: lastReason, previousCandidate })}`;
|
||||
const startedAt = new Date().toISOString();
|
||||
const attemptStartedAt = new Date().toISOString();
|
||||
const responseJson = await postReviewRequest({
|
||||
apiUrl: cleanText(env.ANTHROPIC_BASE_URL),
|
||||
apiKey: cleanText(env.ANTHROPIC_AUTH_TOKEN),
|
||||
@@ -286,7 +286,7 @@ export async function writeDirectReviewFromEnv(env = process.env, fetchImpl = gl
|
||||
const validation = normalizeStructuredOutput(previousCandidate);
|
||||
attempts.push({
|
||||
attempt,
|
||||
startedAt,
|
||||
startedAt: attemptStartedAt,
|
||||
status: validation.ok ? 'validated' : 'invalid',
|
||||
timeoutMs: attemptWindow.timeoutMs,
|
||||
validationReason: validation.ok ? null : validation.reason,
|
||||
|
||||
@@ -52,5 +52,11 @@ describe('ai-review workflow', () => {
|
||||
'${{ steps.review-packet.outputs.packet_included_files }}'
|
||||
);
|
||||
expect(directReviewStep?.env?.AI_REVIEW_REQUEST_BUFFER_MS).toBe(45000);
|
||||
|
||||
const publishStep = steps.find((step) => step.name === 'Publish review comment');
|
||||
expect(publishStep).toBeDefined();
|
||||
expect(String(publishStep?.env?.REVIEW_MARKER)).toContain('pr:${{ needs.prepare.outputs.pr_number }}');
|
||||
expect(String(publishStep?.env?.REVIEW_MARKER)).toContain('sha:${{ needs.prepare.outputs.head_sha }}');
|
||||
expect(String(publishStep?.env?.REVIEW_MARKER)).not.toContain('run:${{ github.run_id }}');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user