• 郭阔's avatar
    fix(harvest/modify-source): correct retry criterion + guard schedule reload during runs · f3100907
    郭阔 authored
    - attempt_needs_retry checked .result type, but the envelope's result is a
      plain text message even on success — the structured business result lives
      in .structured_output. Every healthy run was therefore misjudged and
      silently re-run (attempt2 all_seen fast-exits made it cheap and invisible;
      reuters-technology went to attempt3 and was then killed by a schedule
      reload). Criterion now: rc!=0 / empty / invalid JSON / structured_output
      not an object / is_error.
    - modify-source.sh refuses to reload a schedule while the source (site)
      has a live harvest runlock — launchctl bootout terminates the running
      job (exactly what killed reuters-technology attempt3); --force overrides.
      Panel schedule-time route already had this guard; CLI is now covered.
    - reuters-technology record rebuilt from its valid attempt1 envelope
      (SUCCESS, 10 articles, matching push syncstate).
    f3100907
harvest.sh 13.7 KB