{"record":{"id":"c183667312b83594","repo":"HKUDS/Vibe-Trading","slug":"alpha-id-panel-missing-extras-missing-extra","errorCode":null,"errorMessage":"{alpha_id}: panel missing extras {missing_extra}","messagePattern":"(.+?): panel missing extras (.+?)","errorType":"validation","errorClass":"SkipAlpha","httpStatus":null,"severity":"warning","filePath":"agent/src/factors/registry.py","lineNumber":337,"sourceCode":"        }\n\n    def compute(self, alpha_id: str, panel: dict[str, pd.DataFrame]) -> pd.DataFrame:\n        \"\"\"Lazy-import the alpha module and run its ``compute(panel)``.\n\n        Raises:\n            KeyError: alpha_id unknown.\n            SkipAlpha: required column / sector tag absent in panel.\n            RegistryError: import/compute failed or output failed sanity checks.\n        \"\"\"\n        alpha = self.get(alpha_id)\n        meta = alpha.meta\n\n        missing = [c for c in meta.get(\"columns_required\", []) if c not in panel]\n        if missing:\n            raise SkipAlpha(f\"{alpha_id}: panel missing required columns {missing}\")\n        missing_extra = [c for c in meta.get(\"extras_required\", []) if c not in panel]\n        if missing_extra:\n            raise SkipAlpha(f\"{alpha_id}: panel missing extras {missing_extra}\")\n        if meta.get(\"requires_sector\") and \"sector\" not in panel:\n            raise SkipAlpha(f\"{alpha_id}: panel missing sector tag\")\n\n        try:\n            module = self._load_module(alpha)\n        except Exception as exc:  # noqa: BLE001 — isolate import failure\n            raise RegistryError(f\"{alpha_id}: import failed: {exc}\") from exc\n\n        compute_fn = getattr(module, \"compute\", None)\n        if compute_fn is None:\n            raise RegistryError(f\"{alpha_id}: module has no compute() function\")\n\n        try:\n            result = compute_fn(panel)\n        except Exception as exc:  # noqa: BLE001 — isolate compute failure\n            raise RegistryError(f\"{alpha_id}: compute() raised: {exc}\") from exc\n\n        return self._validate_output(alpha_id, result, panel)","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/factors/registry.py#L319-L355","documentation":"Same pre-flight check as the columns check, but for meta['extras_required'] — additional panel keys an alpha needs beyond core OHLCV columns (e.g. benchmark returns, cap, dividends). Missing extras raise SkipAlpha.","triggerScenarios":"compute(alpha_id, panel) where the alpha declares extras_required (like 'benchmark') and the panel dict does not include that key.","commonSituations":"Running Alpha101 alphas that need 'benchmark' returns without supplying an index/benchmark series; panels built from a minimal loader without extra datasets.","solutions":["Supply the declared extra key(s) in the panel","Inspect registry.get(alpha_id).meta['extras_required'] to know what to build","Skip such alphas when the extra dataset is unavailable"],"exampleFix":"# before\npanel = {'close': close, 'open': open, ...}\n# after\npanel = {'close': close, 'open': open, ..., 'benchmark': benchmark_returns}","handlingStrategy":"validation","validationCode":"extras = registry.get(alpha_id).meta.get('extras_required', [])\nif not all(e in panel for e in extras): skip(alpha_id)","typeGuard":"def has_extras(panel: dict, meta: dict) -> bool:\n    return all(e in panel for e in meta.get('extras_required', []))","tryCatchPattern":"try:\n    out = registry.compute(aid, panel)\nexcept SkipAlpha:\n    continue","preventionTips":["Log extras_required at panel-build time","Pre-load benchmark/returns datasets your zoo family needs"],"tags":["data-validation","panel","registry"],"backgroundTag":"missing-required-column","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}