Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/weekly_advisory_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ jobs:
ARGS+=(--market-proxy-pool-url "${MARKET_DATA_PROXY_POOL_URL}")
fi
python scripts/build_advisory_artifacts.py "${ARGS[@]}"
echo "ADVISORY_REPORT_PATH=data/output/weekly_advisory_review/advisory_report_${AS_OF}.json" >> "$GITHUB_ENV"
echo "M0_RESEARCH_SOURCE_SNAPSHOT_PATH=data/output/weekly_advisory_review/m0_research_source_snapshot_${AS_OF}.json" >> "$GITHUB_ENV"
- name: Build offline M0 research source snapshot
working-directory: advisor
run: |
set -euo pipefail
test -f "${ADVISORY_REPORT_PATH}"
python -m quant_advisor_research.m0_research_source_snapshot \
--report "${ADVISORY_REPORT_PATH}" \
--output-json "${M0_RESEARCH_SOURCE_SNAPSHOT_PATH}"
test -f "${M0_RESEARCH_SOURCE_SNAPSHOT_PATH}"
- name: Save market data cache
if: ${{ success() }}
uses: actions/cache/save@v5
Expand Down
11 changes: 11 additions & 0 deletions docs/m0_research_hypothesis_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ platform, change a runtime target, or submit an order.
The next repository-owned stage may map a valid M0 hypothesis to a bounded
research task. Only later P1--P3 data, backtest, and audit evidence can create
an immutable strategy candidate for P0 Shadow selection.

## Weekly artifact snapshot

The weekly advisory workflow first writes the explicit local report path
`data/output/weekly_advisory_review/advisory_report_<as_of>.json`. Once that
file exists, the same job invokes the offline
`quant_advisor_research.m0_research_source_snapshot` CLI and writes
`m0_research_source_snapshot_<as_of>.json` beside it. Both files remain in the
existing `weekly-model-recommendations` artifact. This producer performs no
external synchronization and does not change the weekly report inputs,
schedule, publication site, runtime, platform, or execution state.
7 changes: 7 additions & 0 deletions tests/test_workflow_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ def test_public_workflows_default_to_live_event_inputs() -> None:
assert "--market-cache-dir .cache/market-data" in text
assert "--recommendation-review" in text

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


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