[spark-compete] fix(observer): log seen-trace state-load failure before falling back to empty dedup set - #131
Conversation
TL;DR
Why this mattersThe observer feeds
FixNarrow the except to Sister precedent
Pairs with
Smoke
|
…re falling back to empty dedup set
fecaff0 to
4c21064
Compare
TL;DR[spark-compete] fix(observer): log seen-trace state-load failure before falling back to empty dedup set What changesNarrow the bare except in _load_seen to (OSError, json.JSONDecodeError, ValueError) and print a one-line warning naming the path, exception type, and the cost-side consequence (re-processing previously-observed trace_refs) before returning empty. Files touched: Why this mattersCloses a silent-failure surface that pairs with the atomic-write fix in PR #129. Even after writes are atomic, a hand-corrupted seen file or a permission flip should announce itself, not pretend dedup state is fresh. Sister-precedent: PR #116 added a log-before-pass to lowest_tier_watch._write_heartbeat for the same trigger-loop-liveness reason, PR #117 did the same for observer._write_heartbeat. This patches the matching state-load surface in the same file. Reproduction (operator-side)
VerificationReview |
{
"schema": "spark-compete-hotfix-v1",
"event": "spark-compete-first-event",
"submission_mode": "public_repo_pr",
"submission_target_url": "#131",
"team": {
"name": "SparkThisUp",
"members": [
"ValHallaBuilder",
"Baz707",
"DanFireDash"
],
"github_accounts": [
"4gjnbzb4zf-sudo"
],
"llm_device_holder": "ValHallaBuilder",
"device_holder_github": "4gjnbzb4zf-sudo"
},
"target_repo": {
"id": "vibeforge1111/spark-character",
"source": "https://github.com/vibeforge1111/spark-character",
"owner_surface": "spark-character"
},
"issue": {
"type": "usage_friction",
"severity": "low",
"title": "fix(observer): log seen-trace state-load failure before falling back to empty dedup set",
"actual_behavior": "[spark-compete] fix(observer): log seen-trace state-load failure before falling back to empty dedup set",
"expected_behavior": "see fix",
"repro_steps": [],
"affected_workflow": "Operator-facing flow in spark-character."
},
"evidence": {
"safe_links_only": true,
"before_after_proof": "Before: [spark-compete] fix(observer): log seen-trace state-load failure before falling back to empty dedup set\nAfter: see fix",
"links": [
"https://github.com//pull/131",
"https://github.com//pull/131/files"
],
"forbidden": [
"raw secrets",
"raw logs",
"raw conversations",
"private chat IDs",
"session tokens",
"cookies",
"private repo maps",
"raw memory dumps",
"full compile JSON",
"scoring details"
]
},
"proposed_fix": {
"approach": "[spark-compete] fix(observer): log seen-trace state-load failure before falling back to empty dedup set",
"files_expected": [],
"tests_or_smoke": "Smoke: exercise the affected code path; build-clean on the changed file."
},
"pr": {
"url": "#131",
"branch": "spark-compete/pr131",
"title_prefix": "[spark-compete]",
"author_github": "4gjnbzb4zf-sudo",
"body_must_include": [
"packet",
"team",
"pr_author",
"repo",
"actual_behavior",
"expected_behavior",
"repro_steps",
"before_after_proof",
"tests_or_smoke",
"duplicate_notes",
"risk_notes",
"review_claim"
]
},
"review_claim": {
"impact_claim": "low",
"evidence_types": [
"redacted_terminal_excerpt"
],
"duplicate_notes": "Searched open PRs and issues for the same defect; this fix is targeted to the affected file.",
"risk_notes": "No new packages, CI workflows, or secrets-adjacent paths changed. Diff is bounded to a single file. Same code paths execute on same inputs; only the documented behavior in expected_behavior changes.",
"review_state_requested": "pr_review"
}
}