fix(substantive_fixer): WARN on corrupt eval_issues JSON
Some checks are pending
CI / lint-and-test (push) Waiting to run
Some checks are pending
CI / lint-and-test (push) Waiting to run
Third silent return path in substantive_fix_cycle — JSON-decode except
at the eval_issues parse drops rows that don't reach skipped_no_tags
or substantive_rows. If all 3 LIMIT-3 candidates have corrupt JSON,
cycle returns 0,0 with no log entry.
WARN level (not INFO): corrupt JSON is abnormal (post-merge column
drift, hand-edited DB row, partial write during crash). If this fires,
ops want to chase the upstream column-write path. If it never fires,
baseline noise stays at zero.
Closes the visibility gap on ALL silent returns in this function, not
just the two patched in 3f8666e.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3f8666ee0c
commit
517e9884cc
1 changed files with 8 additions and 0 deletions
|
|
@ -544,6 +544,14 @@ async def substantive_fix_cycle(conn, max_workers=None) -> tuple[int, int]:
|
||||||
try:
|
try:
|
||||||
issues = json.loads(row["eval_issues"] or "[]")
|
issues = json.loads(row["eval_issues"] or "[]")
|
||||||
except (json.JSONDecodeError, TypeError):
|
except (json.JSONDecodeError, TypeError):
|
||||||
|
# Corrupt JSON in eval_issues is abnormal (post-merge column drift,
|
||||||
|
# hand-edited row, partial write during crash). WARN so ops can chase
|
||||||
|
# the upstream column-write path. Without this, the row drops out of
|
||||||
|
# both substantive_rows and skipped_no_tags — the third silent path.
|
||||||
|
logger.warning(
|
||||||
|
"PR #%d: corrupt eval_issues JSON — skipping in substantive fix cycle",
|
||||||
|
row["number"],
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
if set(issues) & (FIXABLE_TAGS | CONVERTIBLE_TAGS | UNFIXABLE_TAGS):
|
if set(issues) & (FIXABLE_TAGS | CONVERTIBLE_TAGS | UNFIXABLE_TAGS):
|
||||||
substantive_rows.append(row)
|
substantive_rows.append(row)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue