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.
28 lines
735 B
Python
28 lines
735 B
Python
"""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())
|