Skip to content

Commit 5f6cc09

Browse files
Pigbibicodex
andauthored
ci: publish weekly M0 research source snapshot (#67)
Co-authored-by: Codex <noreply@openai.com>
1 parent 9e06f24 commit 5f6cc09

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/weekly_advisory_review.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ jobs:
123123
ARGS+=(--market-proxy-pool-url "${MARKET_DATA_PROXY_POOL_URL}")
124124
fi
125125
python scripts/build_advisory_artifacts.py "${ARGS[@]}"
126+
echo "ADVISORY_REPORT_PATH=data/output/weekly_advisory_review/advisory_report_${AS_OF}.json" >> "$GITHUB_ENV"
127+
echo "M0_RESEARCH_SOURCE_SNAPSHOT_PATH=data/output/weekly_advisory_review/m0_research_source_snapshot_${AS_OF}.json" >> "$GITHUB_ENV"
128+
- name: Build offline M0 research source snapshot
129+
working-directory: advisor
130+
run: |
131+
set -euo pipefail
132+
test -f "${ADVISORY_REPORT_PATH}"
133+
python -m quant_advisor_research.m0_research_source_snapshot \
134+
--report "${ADVISORY_REPORT_PATH}" \
135+
--output-json "${M0_RESEARCH_SOURCE_SNAPSHOT_PATH}"
136+
test -f "${M0_RESEARCH_SOURCE_SNAPSHOT_PATH}"
126137
- name: Save market data cache
127138
if: ${{ success() }}
128139
uses: actions/cache/save@v5

docs/m0_research_hypothesis_contract.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,14 @@ platform, change a runtime target, or submit an order.
4949
The next repository-owned stage may map a valid M0 hypothesis to a bounded
5050
research task. Only later P1--P3 data, backtest, and audit evidence can create
5151
an immutable strategy candidate for P0 Shadow selection.
52+
53+
## Weekly artifact snapshot
54+
55+
The weekly advisory workflow first writes the explicit local report path
56+
`data/output/weekly_advisory_review/advisory_report_<as_of>.json`. Once that
57+
file exists, the same job invokes the offline
58+
`quant_advisor_research.m0_research_source_snapshot` CLI and writes
59+
`m0_research_source_snapshot_<as_of>.json` beside it. Both files remain in the
60+
existing `weekly-model-recommendations` artifact. This producer performs no
61+
external synchronization and does not change the weekly report inputs,
62+
schedule, publication site, runtime, platform, or execution state.

tests/test_workflow_defaults.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ def test_public_workflows_default_to_live_event_inputs() -> None:
2525
assert "--market-cache-dir .cache/market-data" in text
2626
assert "--recommendation-review" in text
2727

28+
weekly = (ROOT / ".github" / "workflows" / "weekly_advisory_review.yml").read_text(encoding="utf-8")
29+
assert "ADVISORY_REPORT_PATH=data/output/weekly_advisory_review/advisory_report_${AS_OF}.json" in weekly
30+
assert "M0_RESEARCH_SOURCE_SNAPSHOT_PATH=data/output/weekly_advisory_review/m0_research_source_snapshot_${AS_OF}.json" in weekly
31+
assert "python -m quant_advisor_research.m0_research_source_snapshot" in weekly
32+
assert "--report \"${ADVISORY_REPORT_PATH}\"" in weekly
33+
assert "--output-json \"${M0_RESEARCH_SOURCE_SNAPSHOT_PATH}\"" in weekly
34+
2835

2936
def test_cross_repo_smoke_workflow_uses_live_artifacts_and_no_network_market_fallback() -> None:
3037
text = (ROOT / ".github" / "workflows" / "cross_repo_smoke.yml").read_text(encoding="utf-8")

0 commit comments

Comments
 (0)