chore: pre-existing in-tree work (event-study/research/vintages/prices + migration script + integrity docs)
Committing the prior uncommitted working-tree state that predates this session's data-source work (was already modified/untracked at session start) so the tree is clean before push. Includes: event-study + research report integrity/forward observation work, prices tests, research hash migration script, and the 2026-08-23/24 engineering-log + test-evidence notes. Verified green as part of the full 362-test suite.
This commit is contained in:
27
backend/scripts/migrate_research_report_hashes.py
Normal file
27
backend/scripts/migrate_research_report_hashes.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Migrate legacy research reports into the fail-closed hashed format."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from app.research import ResearchRunStore
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument(
|
||||
"--root",
|
||||
type=Path,
|
||||
default=Path(__file__).resolve().parents[1] / "data" / "research",
|
||||
help="research store root containing manifest.json and reports/",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
migrated = ResearchRunStore(args.root).migrate_legacy()
|
||||
print(json.dumps({"migrated_reports": migrated}, sort_keys=True))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user