fix: bind preview evidence to frozen producer clock #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: QAR vNext D3 Frozen Clock Preview Evidence | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/qar_vnext_d3_daily_preview_clock_binding.yml" | |
| - "scripts/d3_clock_bound_build.py" | |
| - "scripts/d3_clock_bound_verify.py" | |
| - "src/quant_advisor_research/**" | |
| - "examples/political_events.example.csv" | |
| - "examples/political_watchlist.example.csv" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - "tests/test_d3_clock_binding.py" | |
| - "tests/test_preview_bundle.py" | |
| workflow_dispatch: | |
| inputs: | |
| as_of: | |
| description: "Representative daily report date" | |
| required: true | |
| default: "2026-06-20" | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-verify: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install advisor package | |
| run: python -m pip install -e . | |
| - name: Build with exact frozen clock binding | |
| env: | |
| AS_OF: ${{ inputs.as_of || '2026-06-20' }} | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.sha }} | |
| run: | | |
| set -euo pipefail | |
| python scripts/d3_clock_bound_build.py \ | |
| --as-of "${AS_OF}" \ | |
| --political-events examples/political_events.example.csv \ | |
| --political-watchlist examples/political_watchlist.example.csv \ | |
| --artifact-dir "${RUNNER_TEMP}/qar-daily-preview" \ | |
| --evidence-path "${RUNNER_TEMP}/qar-daily-preview-build-evidence.json" \ | |
| --base-sha "${BASE_SHA}" \ | |
| --frozen-generated-at "2026-07-15T00:00:00Z" | |
| - name: Upload daily preview artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: qar-daily-preview-clock-binding | |
| path: ${{ runner.temp }}/qar-daily-preview | |
| if-no-files-found: error | |
| - name: Download daily preview artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: qar-daily-preview-clock-binding | |
| path: ${{ runner.temp }}/qar-daily-preview-downloaded | |
| - name: Verify exact frozen clock binding | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.sha }} | |
| run: | | |
| set -euo pipefail | |
| python scripts/d3_clock_bound_verify.py \ | |
| --artifact-dir "${RUNNER_TEMP}/qar-daily-preview-downloaded" \ | |
| --build-evidence-path "${RUNNER_TEMP}/qar-daily-preview-build-evidence.json" \ | |
| --evidence-path "${RUNNER_TEMP}/qar-daily-preview-download-evidence.json" \ | |
| --base-sha "${BASE_SHA}" \ | |
| --frozen-generated-at "2026-07-15T00:00:00Z" |