-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathchanged-scope-quality-nightly.yml
More file actions
132 lines (123 loc) · 4.89 KB
/
changed-scope-quality-nightly.yml
File metadata and controls
132 lines (123 loc) · 4.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: changed-scope-quality-nightly
on:
schedule:
- cron: '45 3 * * *'
workflow_dispatch:
inputs:
feedback_jsonl_path:
description: 'Custom feedback JSONL path (optional)'
required: false
type: string
default: ''
pull_request:
branches:
- main
paths:
- 'scripts/report_changed_scope_quality.py'
- 'configs/changed_scope/rule_tuning.json'
- 'tests/fixtures/changed_scope/changed-scope-feedback.schema.json'
- 'tests/fixtures/changed_scope/changed-scope-feedback.sample.jsonl'
- '.github/workflows/changed-scope-quality-nightly.yml'
permissions:
contents: read
jobs:
changed-scope-quality:
runs-on: ubuntu-24.04
permissions:
contents: read
actions: write
steps:
- name: Initialize Runner Tool Cache Env
run: |
echo "AGENT_TOOLSDIRECTORY=${RUNNER_TEMP}/hostedtoolcache-${GITHUB_JOB}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> "${GITHUB_ENV}"
echo "RUNNER_TOOL_CACHE=${RUNNER_TEMP}/hostedtoolcache-${GITHUB_JOB}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> "${GITHUB_ENV}"
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
with:
fetch-depth: 0
persist-credentials: false
clean: true
- name: Prepare input
id: prep
env:
CUSTOM_INPUT: ${{ github.event.inputs.feedback_jsonl_path || '' }}
run: |
set -euo pipefail
mkdir -p .runtime-cache/test_output/changed_scope_quality/input
custom_input="${CUSTOM_INPUT}"
default_input=".runtime-cache/test_output/changed_scope/feedback.jsonl"
input_path="${default_input}"
if [[ -n "${custom_input}" ]]; then
input_path="${custom_input}"
fi
if [[ ! -f "${input_path}" ]]; then
input_path=".runtime-cache/test_output/changed_scope_quality/input/feedback.sample.jsonl"
cp tests/fixtures/changed_scope/changed-scope-feedback.sample.jsonl "${input_path}"
echo "[changed-scope-quality] feedback input missing, fallback to sample dataset"
sample_fallback_used="1"
else
sample_fallback_used="0"
fi
{
echo "sample_fallback_used=${sample_fallback_used}"
echo "input_path=${input_path}"
} >> "${GITHUB_OUTPUT}"
- name: Generate changed-scope quality report via docker_ci lane
env:
INPUT_PATH: ${{ steps.prep.outputs.input_path }}
run: |
set -euo pipefail
bash scripts/docker_ci.sh lane changed-scope-quality \
--input-jsonl "${INPUT_PATH}" \
--output-dir ".runtime-cache/test_output/changed_scope_quality" \
--base-config "configs/changed_scope/rule_tuning.json"
- name: Publish summary
if: always()
env:
RUN_ID: ${{ github.run_id }}
INPUT_PATH: ${{ steps.prep.outputs.input_path }}
SAMPLE_FALLBACK_USED: ${{ steps.prep.outputs.sample_fallback_used }}
run: |
set -euo pipefail
latest_week="$(find .runtime-cache/test_output/changed_scope_quality -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort | tail -n 1)"
summary_md=".runtime-cache/test_output/changed_scope_quality/${latest_week}/changed_scope_quality.summary.md"
if [[ -f "${summary_md}" ]]; then
{
echo "## changed-scope-quality-nightly"
echo "- run_id: ${RUN_ID}"
echo "- input: \`${INPUT_PATH}\`"
echo "- sample_fallback_used: \`${SAMPLE_FALLBACK_USED}\`"
echo ""
cat "${summary_md}"
} >> "${GITHUB_STEP_SUMMARY}"
fi
- name: Emit truth-mode marker
if: always()
env:
SAMPLE_FALLBACK_USED: ${{ steps.prep.outputs.sample_fallback_used }}
run: |
set -euo pipefail
mkdir -p .runtime-cache/test_output/changed_scope_quality/meta
if [[ "${SAMPLE_FALLBACK_USED}" == "1" ]]; then
sample_fallback_used=true
else
sample_fallback_used=false
fi
cat > .runtime-cache/test_output/changed_scope_quality/meta/truth_status.json <<EOF
{
"report_type": "openvibecoding_changed_scope_truth_status",
"sample_fallback_used": ${sample_fallback_used},
"analytics_only": true,
"blocking_quality_gate": false,
"release_truth_eligible": false
}
EOF
- name: Upload changed-scope quality artifacts
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: changed-scope-quality-nightly-${{ github.run_id }}
retention-days: 14
if-no-files-found: warn
path: |
.runtime-cache/test_output/changed_scope_quality/**