-
Notifications
You must be signed in to change notification settings - Fork 0
⚡ Bolt: [성능 개선] label_section 문자열 스캐닝 범위 최적화 #1522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d53b8a0
ca1aa76
045d9f9
3e0f5c5
a43dedc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ jobs: | |
| name: validate-pr-metadata | ||
| if: github.event_name == 'repository_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 8 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
@@ -224,6 +225,7 @@ jobs: | |
| needs.validate-pr-metadata.result == 'success' | ||
| && github.event_name == 'repository_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 12 | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
@@ -371,6 +373,7 @@ jobs: | |
| && needs.coverage-source-tree.result != 'cancelled' | ||
| && github.event_name == 'repository_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 300 | ||
| permissions: | ||
| # The PR tree arrives through a same-run artifact. No repository-content, | ||
| # identity, secret, or write token is available to untrusted tests. | ||
|
|
@@ -2309,9 +2312,9 @@ jobs: | |
| # 36-minute publication gate, the 18-minute Noema handoff, and setup/cleanup | ||
| # overhead without truncating a late current-head verdict, handoff, merge | ||
| # scheduler follow-up, or bounded failure reason. | ||
| timeout-minutes: 325 | ||
| timeout-minutes: 305 | ||
| permissions: | ||
| actions: read | ||
| actions: write | ||
| checks: read | ||
| id-token: write | ||
| contents: read | ||
|
|
@@ -4003,9 +4006,9 @@ jobs: | |
| OPENCODE_MODEL_ATTEMPTS: "1" | ||
| # Preserve reviews that legitimately need tens of minutes to inspect a | ||
| # large repository. Changed-file count is not a repository-complexity | ||
| # proxy, so every cadence class gets 90 minutes per candidate while the | ||
| # bounded provider-pool watchdog remains the outer guard. | ||
| OPENCODE_RUN_TIMEOUT_SECONDS: "5400" | ||
| # proxy. Let Contextual Orchestrator use the existing total review | ||
| # budget; the bounded provider-pool watchdog remains the outer guard. | ||
| OPENCODE_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_EXPORT_TIMEOUT_SECONDS: "180" | ||
| OPENCODE_TOTAL_RETRY_BUDGET_SECONDS: "11700" | ||
| OPENCODE_POOL_STEP_TIMEOUT_SECONDS: "12000" | ||
|
|
@@ -4017,22 +4020,22 @@ jobs: | |
| OPENCODE_DYNAMIC_REVIEW_CADENCE: "true" | ||
| OPENCODE_SMALL_CHANGE_FILE_THRESHOLD: "3" | ||
| OPENCODE_MEDIUM_CHANGE_FILE_THRESHOLD: "20" | ||
| OPENCODE_SMALL_CHANGE_RUN_TIMEOUT_SECONDS: "5400" | ||
| OPENCODE_SMALL_CHANGE_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_SMALL_CHANGE_TOTAL_BUDGET_SECONDS: "11700" | ||
| OPENCODE_MEDIUM_CHANGE_RUN_TIMEOUT_SECONDS: "5400" | ||
| OPENCODE_MEDIUM_CHANGE_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_MEDIUM_CHANGE_TOTAL_BUDGET_SECONDS: "11700" | ||
| OPENCODE_LARGE_CHANGE_RUN_TIMEOUT_SECONDS: "5400" | ||
| OPENCODE_LARGE_CHANGE_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_LARGE_CHANGE_TOTAL_BUDGET_SECONDS: "11700" | ||
| OPENCODE_UNKNOWN_CHANGE_RUN_TIMEOUT_SECONDS: "5400" | ||
| OPENCODE_UNKNOWN_CHANGE_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_UNKNOWN_CHANGE_TOTAL_BUDGET_SECONDS: "11700" | ||
| OPENCODE_DYNAMIC_RUN_TIMEOUT_CAP_SECONDS: "5400" | ||
| OPENCODE_DYNAMIC_RUN_TIMEOUT_CAP_SECONDS: "11700" | ||
| OPENCODE_DYNAMIC_TOTAL_BUDGET_CAP_SECONDS: "11700" | ||
| OPENCODE_DYNAMIC_MAX_CYCLES_CAP: "1" | ||
| OPENCODE_FREE_RUN_TIMEOUT_SECONDS: "3600" | ||
| OPENCODE_DYNAMIC_MAX_CYCLES: "1" | ||
| CENTRAL_REVIEW_PROCESS_FALLBACK_ELIGIBLE: ${{ steps.central_review_process_fallback_scope.outputs.eligible || 'false' }} | ||
| CENTRAL_REVIEW_PROCESS_FALLBACK_SCOPE_LABEL: ${{ steps.central_review_process_fallback_scope.outputs.scope_label || 'unsupported' }} | ||
| OPENCODE_CENTRAL_REVIEW_PROCESS_FALLBACK_RUN_TIMEOUT_SECONDS: "5400" | ||
| OPENCODE_CENTRAL_REVIEW_PROCESS_FALLBACK_RUN_TIMEOUT_SECONDS: "11700" | ||
| OPENCODE_CENTRAL_REVIEW_PROCESS_FALLBACK_TOTAL_BUDGET_SECONDS: "11700" | ||
| OPENCODE_CENTRAL_REVIEW_PROCESS_FALLBACK_MAX_CYCLES: "1" | ||
| OPENCODE_BACKOFF_INITIAL_SECONDS: "30" | ||
|
|
@@ -7545,6 +7548,7 @@ jobs: | |
| echo "::endgroup::" | ||
|
|
||
| - name: Enforce current-head formal OpenCode review receipt | ||
| id: formal_review_receipt | ||
| if: >- | ||
| always() | ||
| && needs.validate-pr-metadata.result == 'success' | ||
|
|
@@ -7568,6 +7572,61 @@ jobs: | |
| --head-sha "$PR_HEAD_SHA" \ | ||
| "${draft_args[@]}" | ||
|
|
||
| - name: Wake exact-head required OpenCode workflow | ||
| if: >- | ||
| always() | ||
| && github.event_name == 'repository_dispatch' | ||
| && steps.formal_review_receipt.outcome == 'success' | ||
| && needs.validate-pr-metadata.outputs.target_repository != '' | ||
| && needs.validate-pr-metadata.outputs.head_sha != '' | ||
| && github.event.client_payload.required_run_id != '' | ||
| env: | ||
| GH_TOKEN: ${{ needs.validate-pr-metadata.outputs.target_repository == github.repository && github.token || secrets.PR_REVIEW_MERGE_TOKEN || secrets.OPENCODE_APPROVE_TOKEN }} | ||
| GH_REPOSITORY: ${{ needs.validate-pr-metadata.outputs.target_repository }} | ||
| PR_HEAD_SHA: ${{ needs.validate-pr-metadata.outputs.head_sha }} | ||
| REQUIRED_RUN_ID: ${{ github.event.client_payload.required_run_id }} | ||
| WAKE_TOKEN_SOURCE: ${{ needs.validate-pr-metadata.outputs.target_repository == github.repository && 'github-token' || secrets.PR_REVIEW_MERGE_TOKEN != '' && 'PR_REVIEW_MERGE_TOKEN' || secrets.OPENCODE_APPROVE_TOKEN != '' && 'OPENCODE_APPROVE_TOKEN' || 'unavailable' }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ -z "${GH_TOKEN:-}" ] || [ "$WAKE_TOKEN_SOURCE" = "unavailable" ]; then | ||
| echo "::error::Actions-capable wake credential is unavailable. Native runs use github.token; sibling runs require PR_REVIEW_MERGE_TOKEN or OPENCODE_APPROVE_TOKEN." | ||
| exit 1 | ||
| fi | ||
| [[ "$REQUIRED_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { | ||
| echo "::error::Required OpenCode run id is missing or non-canonical." | ||
| exit 1 | ||
| } | ||
| # The immutable run id is scoped to GH_REPOSITORY. Revalidate its | ||
| # event, central workflow path, and live PR head before rerunning it; | ||
| # rendered titles and workflow_url differ between native and | ||
| # organization-required workflow contexts. | ||
| for attempt in $(seq 1 12); do | ||
| run="$(gh api "repos/${GH_REPOSITORY}/actions/runs/${REQUIRED_RUN_ID}")" | ||
| required_run="$(printf '%s\n' "$run" | jq -r --arg head "$PR_HEAD_SHA" --argjson run_id "$REQUIRED_RUN_ID" ' | ||
| select(.id == $run_id) | ||
| | select(.event == "pull_request_target") | ||
| | select(.path == ".github/workflows/opencode-review.yml") | ||
| | select(.head_sha == $head) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Completed reviews cannot wake checks
Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| | [(.id // ""), (.status // ""), (.conclusion // "")] | ||
| | @tsv | ||
| ')" | ||
| IFS=$'\t' read -r required_run_id required_status required_conclusion <<<"$required_run" | ||
| if [ "$required_status" = "completed" ] && [ "$required_conclusion" = "failure" ]; then | ||
| gh api -X POST "repos/${GH_REPOSITORY}/actions/runs/${required_run_id}/rerun-failed-jobs" >/dev/null | ||
| echo "Re-ran failed jobs for exact-head Required OpenCode Review run ${required_run_id}." | ||
| exit 0 | ||
| fi | ||
| if [ "$required_status" = "completed" ] && [ "$required_conclusion" = "success" ]; then | ||
| echo "Exact-head Required OpenCode Review run ${required_run_id} already succeeded." | ||
| exit 0 | ||
| fi | ||
| if [ "$attempt" -lt 12 ]; then | ||
| sleep 5 | ||
| fi | ||
| done | ||
| echo "::error::Formal OpenCode receipt exists, but the exact-head required workflow did not reach a rerunnable failed state." | ||
| exit 1 | ||
|
|
||
| - name: Publish repository_dispatch OpenCode status | ||
| if: >- | ||
| always() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Review timeout margins stay narrow
The model gets 195 minutes inside a 200-minute watchdog and 205-minute step. Future setup growth can exhaust the remaining publication margin.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.