yf176 commited on
Commit ·
4a6d6b6
1
Parent(s): 3a0cf8c
fix: remove @human routing from DataFetcher failure paths
Browse files
src/polyhedra/agents/quant/datafetcher.py
CHANGED
|
@@ -94,7 +94,7 @@ class DataFetcherAgent(Agent):
|
|
| 94 |
"Add tickers with `/poly watchlist add AAPL MSFT NVDA` "
|
| 95 |
"then re-run `/poly quant`."
|
| 96 |
),
|
| 97 |
-
mentions=[
|
| 98 |
)
|
| 99 |
|
| 100 |
fetched, failed, cap_hit, cap_hit_ticker, all_ohlcv_failed = await self._fetch_all(
|
|
@@ -110,7 +110,7 @@ class DataFetcherAgent(Agent):
|
|
| 110 |
"Finnhub is unreachable and the yfinance fallback also failed. "
|
| 111 |
"Manual data paste-in or a retry is required."
|
| 112 |
),
|
| 113 |
-
mentions=[
|
| 114 |
updates_state=True,
|
| 115 |
state_patch={"yfinance_alert": True}, # FR-5.4: recorded in QuantState.alerts
|
| 116 |
)
|
|
@@ -137,7 +137,7 @@ class DataFetcherAgent(Agent):
|
|
| 137 |
# (e.g. by TrendAnalyst requesting more data). Skip straight to sentimentanalyst.
|
| 138 |
trend_exists = bool(self.files.read(f"quant/trend_analysis_{date.today().isoformat()}.md"))
|
| 139 |
if not fetched and cap_hit:
|
| 140 |
-
next_mentions = [
|
| 141 |
elif trend_exists:
|
| 142 |
next_mentions = ["sentimentanalyst"]
|
| 143 |
else:
|
|
|
|
| 94 |
"Add tickers with `/poly watchlist add AAPL MSFT NVDA` "
|
| 95 |
"then re-run `/poly quant`."
|
| 96 |
),
|
| 97 |
+
mentions=[],
|
| 98 |
)
|
| 99 |
|
| 100 |
fetched, failed, cap_hit, cap_hit_ticker, all_ohlcv_failed = await self._fetch_all(
|
|
|
|
| 110 |
"Finnhub is unreachable and the yfinance fallback also failed. "
|
| 111 |
"Manual data paste-in or a retry is required."
|
| 112 |
),
|
| 113 |
+
mentions=[],
|
| 114 |
updates_state=True,
|
| 115 |
state_patch={"yfinance_alert": True}, # FR-5.4: recorded in QuantState.alerts
|
| 116 |
)
|
|
|
|
| 137 |
# (e.g. by TrendAnalyst requesting more data). Skip straight to sentimentanalyst.
|
| 138 |
trend_exists = bool(self.files.read(f"quant/trend_analysis_{date.today().isoformat()}.md"))
|
| 139 |
if not fetched and cap_hit:
|
| 140 |
+
next_mentions = []
|
| 141 |
elif trend_exists:
|
| 142 |
next_mentions = ["sentimentanalyst"]
|
| 143 |
else:
|