feat(collectors): report_collector_errors helper for Flow Doctor visibility (v0.6.2)#34
Merged
Merged
Conversation
…bility (v0.6.2)
Surfaces collector-style {"status": "error", "error": "..."} return-dicts
to Flow Doctor's ERROR-level logging handler. Orchestrators that catch
exceptions into per-collector status entries (alpha-engine-data
weekly_collector, predictor training stages, research per-team
collectors) currently report errors only via a generic summary line at
the end of run, which dedups all partial runs into one signature and
contains no specific error text for LLM diagnosis.
The new helper walks the collectors dict and emits one logger.error per
error entry with the collector name + original message. Each emitted
record carries a distinct dedup signature, restoring the per-failure
alert granularity that Flow Doctor's pipeline expects.
Bumps version 0.6.1 → 0.6.2 in lockstep (pyproject + __init__).
First consumer: alpha-engine-data weekly_collector (separate PR).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
alpha_engine_lib.collector_results.report_collector_errors()— a thin helper that surfaces collector-style return-dicts ({"status": "error", "error": "..."}) to Flow Doctor's ERROR-level logging handler.Why
Surfaced 2026-05-09 from the Saturday SF DataPhase1 PARTIAL run. The
arcticdbcollector hit a backfill regression preflight failure and stored the error in its result dict, but the onlylogger.error()in the pipeline is a generic summary line at the end ofweekly_collector.main():Two problems with that:
"Backfill regression preflight failed: 38 symbols would regress...") lives only in the result dict. Flow Doctor's LLM diagnosis pipeline + GitHub-issue body has nothing specific to work with.This pattern recurs across orchestrators (data weekly_collector, predictor training stages, research per-team collectors) — every case where a
try/exceptwrites{"status": "error", "error": str(e)}and continues.Approach
Single helper in the lib (canonical-home pattern) so any orchestrator using the results-dict shape gets per-collector ERROR visibility with one line. Output: one
logger.error("collector %s failed: %s", name, err)per error entry → distinct dedup signatures, real error text routed through the existingsetup_logging()Flow Doctor handler.Test plan
tests/test_collector_results.pycovering: distinct error logs per collector, no-op on all-ok, missing error-field placeholder, malformed entries skipped, custom logger support, empty dict__init__.py) verified by existingtest_version_pin.pyFollow-up
weekly_collector._finalize. Will land separately referencing this PR.🤖 Generated with Claude Code