KarlQuant commited on
Commit
346309c
·
verified ·
1 Parent(s): 67e8cc2

Upload Quasar_axrvi_ranker.py

Browse files
Files changed (1) hide show
  1. Quasar_axrvi_ranker.py +26 -3
Quasar_axrvi_ranker.py CHANGED
@@ -5059,7 +5059,21 @@ class ShreveRankingEngine:
5059
 
5060
  results: List[RankedAsset] = []
5061
 
5062
- for space_name, snap in snapshots.items():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5063
  acc = snap.avn_accuracy
5064
  # Raw neural significance — no hub_confidence multiplier, no Gaussian
5065
  # lower-bound. Cross-asset competition is handled by low-τ softmax
@@ -8279,11 +8293,20 @@ class QuasarAXRVIBridge:
8279
  try:
8280
  import urllib.request as _urlreq
8281
 
8282
- # Build payload with flip_direction from each asset's snapshot
 
 
 
 
8283
  rankings_payload = []
8284
  for r in ranked:
8285
  snap = self.hub_subscriber.get_snapshot(r.space_name)
8286
- flip_dir = snap.dominant_signal if snap else "NEUTRAL"
 
 
 
 
 
8287
  rankings_payload.append({
8288
  "space_name": r.space_name,
8289
  "score": r.score,
 
5059
 
5060
  results: List[RankedAsset] = []
5061
 
5062
+ # FIX: iterate over ALL configured asset symbols, not just hub snapshots.
5063
+ # hub_snapshots only contains assets whose publisher has connected — if any
5064
+ # space has not yet sent a metrics_update the snapshot is missing and that
5065
+ # asset is silently dropped from the ranking, causing the executor to see
5066
+ # only the one asset whose space happens to be the active publisher.
5067
+ _all_asset_ids = (
5068
+ list(self.asset_buffers.keys()) if self.asset_buffers
5069
+ else list(snapshots.keys())
5070
+ )
5071
+ for space_name in _all_asset_ids:
5072
+ snap = snapshots.get(space_name)
5073
+ if snap is None:
5074
+ # Asset has no hub snapshot yet — create a neutral default so it
5075
+ # participates in ranking with zero significance weight.
5076
+ snap = AssetSnapshot(space_name=space_name)
5077
  acc = snap.avn_accuracy
5078
  # Raw neural significance — no hub_confidence multiplier, no Gaussian
5079
  # lower-bound. Cross-asset competition is handled by low-τ softmax
 
8293
  try:
8294
  import urllib.request as _urlreq
8295
 
8296
+ # Build payload with flip_direction from each asset's snapshot.
8297
+ # FIX: fall back to r.dominant_signal (from rank_risk_neutral, which
8298
+ # reads snap.dominant_signal at ranking time) when the snapshot is
8299
+ # missing or still NEUTRAL — prevents all non-publishing assets from
8300
+ # being broadcast with flip_direction="NEUTRAL" which blocks Gate A.
8301
  rankings_payload = []
8302
  for r in ranked:
8303
  snap = self.hub_subscriber.get_snapshot(r.space_name)
8304
+ snap_signal = snap.dominant_signal if snap else "NEUTRAL"
8305
+ flip_dir = (
8306
+ snap_signal
8307
+ if snap_signal not in ("NEUTRAL", "NONE", None, "")
8308
+ else r.dominant_signal # set from snap at rank_risk_neutral time
8309
+ )
8310
  rankings_payload.append({
8311
  "space_name": r.space_name,
8312
  "score": r.score,