Skip to content

v0.8.4

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 08:21

Release v0.8.4

Fix editing-status drift after batched phases finish.

Two related bugs kept the phase-completion state out of sync with
actual progress, causing files to appear 'Pending' after the harness
had already finished them:

  1. The batching harness never set the phase-complete flag on the
    final batch (except for prose_polish which had its own fallback).
    Small files that fit in one batch were even worse — they skipped
    the batch machinery entirely and had no completion writer at all.
    The system relied on the coordinator to notice a tool-result string
    and issue update_file_status by hand; when the coordinator forgot,
    the file stayed stuck at 'proofreading pending' with all batches
    complete.

  2. Proofreading completion used two field names. The reader path
    (readEditingStatus, get_next_editing_step, aggregate stats, and
    the Zod schema itself) checked 'proofread_complete'. The writer
    path since v0.8.2 wrote 'proofreading_complete' to a different
    field the reader never looked at. Result: harness set the flag,
    reader reported 'Pending', coordinator issued a redundant
    update_file_status that happened to write the correct field —
    masking the bug most of the time and making it look like a
    coordinator memory issue.

Same class of bug hit 'last_edited_phase': only ever updated by
update_file_status, so files completed by the harness alone kept
the previous phase's value (e.g. showing 'readability' after a
successful proofread).

Fix:

  • New phaseCompleteField(phase) helper maps 'proofreading' to the
    canonical 'proofread_complete'; other phases pass through. Every
    writer routes through this helper so future name drift can only
    happen in one place.
  • New markPhaseComplete helper called from the non-batched path of
    all four batched specialists (dialog, style, readability,
    proofreading). Idempotent — only no-ops when both the completion
    flag AND last_edited_phase are correct, so stale values from
    previous versions get repaired on the next specialist run.
  • Both completeBatch and setupBatching now set last_edited_phase
    when marking a phase complete.
  • Reset map in index-tools switched to the canonical field name.

Tests: 6 new tests covering markPhaseComplete acceptance, name
mapping for proofreading, idempotency, stale-last_edited_phase
repair, and a completeBatch case locking in the field name. Total:
921 tests, all passing.

Full Changelog: v0.8.3...v0.8.4