Files
brain-of-reese/.agents/phases/todo/193_sync_remaining_count/03_e2e.md
T
ducoterra 47456a44df chore(agent): phase roadmap from TODO.md, 4 phases (190-193)
Convert the four open TODO items into executable phases (append mode,
starting at 190 after the completed 189):

  190_app_name_settings_fix  - the Settings-panel app name wins over the
      Theme tab; the three brand strings stripped from the Theme tab
      (colors-only); live brand re-apply on save, no reload
  191_source_name_labels_tags - source_labels table + admin API + Sources
      page editor; the separate bounded source_name_hit_bonus retrieval
      boost; label surfacing in the <document> blocks and KB overview
  192_verbatim_inline_midturn - an additive verbatim_block SSE frame at
      the show_text success moment; in-place mid-turn fence hydration;
      the done/restore per-locator dedupe; the done frame, record key,
      restore and shared page stay byte-identical
  193_sync_remaining_count - the running sync/upload label counts down:
      "N remaining" (N = total - done), hidden at the final file; the
      chunk/image/summaries/terminal parts untouched

TODO.md is cleared (its items now live in .agents/phases/todo/).

LLM-Generated: true
2026-10-17 19:35:55 -04:00

4.3 KiB
Raw Blame History

Task 03 — The phase E2E suite, the full gates, the docs pass, the commit

Phase: 193_sync_remaining_count · Source: TODO.md:7 Story: n/a

Objective

The dedicated Playwright suite proves the owner-visible contract — the label counts DOWN as the run progresses and goes quiet at the final file — run in isolation per AGENTS rule 4; the full gates pass; the docs are consistent; one atomic commit.

Work

  1. tests/e2e/test_sync_remaining_count.py (NEW — the module docstring names the TODO item, the A1/A2 assumptions and the "server untouched" clause) — the module-app fixture pattern (the phase-64/98 E2E convention — verify in tests/e2e/conftest.py / the sibling sync suites):
    • the fixture: a small git source with N files (N ≥ 4, the phase-98 fixture convention — the N_FILES shape of test_sync_upload_progress.py).
    • (a) the count-down arm: start the sync through the RAG page's sync flow; capture #sync-progress (and the button title — the A4 full-label placement) across the run: while files are in flight the label matches ^Syncing… <file> [1-N] remaining and the displayed N is NON-INCREASING across polls (the total − done shape — a strict count-down; the pin: the sequence of captured Ns, when a new value appears, is smaller); the · chunk n/m part coexists when a batch is in flight (the phase-129 part, unbroken); when the walk reaches the final file the part is ABSENT (the main part names the file — ^Syncing… <last-file>$, no count part — the A1 hidden edge); the run's terminal result line is the phase-64 shape (the counts_line helper — byte-identical, the terminal-line pin).
    • (b) the upload arm (A2): the upload job (the same fixture as an archive, the test_sync_upload_progress.py convention) → the label shows Importing <file> [1-N] remaining (the shared builder, the shared shape — the pin) and the chunk part coexists (the pin).
    • (c) the pre-walk edge: the first poll before the walk knows the total → NO count part (^Syncing…$, the phase-64 contract — the total === 0 guard, owner-visible).
  2. Regression, run in isolation: tests/e2e/test_sync_label_mobile.py, tests/e2e/test_sync_upload_progress.py (the task-02 retargets), tests/e2e/test_sync_chunk_progress.py, tests/e2e/test_sync_summary_visibility.py (the chunk/image/summaries pins) — green.
  3. The full gates, in order:
    • uv run pytest (unit + integration) — 100% passing;
    • uv run pytest --cov=app --cov-report=term-missing — >90% on app/;
    • uv run pytest tests/e2e/test_sync_remaining_count.py -v --no-cov — green in isolation;
    • uv run ruff check . && uv run pyright — clean.
  4. Documentation pass (the phase file's Documentation section): README.md + AGENTS.md reviewed in their entirety against the post-phase app; the sync section's running-label example (the (done/total) shape, if present in README.md) becomes the N remaining one; AGENTS.md corrected only where a phase-64/98 clause names the running count part.
  5. Commit: one atomic, professional commit (Conventional Commits, --no-gpg-sign), e.g. feat(sync): the running label counts down — "N remaining" (phase 193) — the body names the one-line fmtSyncLabel change (sync + upload through the shared builder), the hidden-at-final-file edge, and the untouched chunk/image/summaries/terminal parts. .agents/phases/todo/193_sync_remaining_count/ moves to .agents/phases/complete/ in the SAME commit (AGENTS rule 8).

Testing & Quality

  • E2E: the suite above, isolated; the regression suites green.
  • Coverage: >90% on app/.
  • Lint/types: clean.

Completion Criteria

  • tests/e2e/test_sync_remaining_count.py green in isolation — (a) the count-down (non-increasing N across polls, the chunk part coexisting, the part absent at the final file, the terminal line byte-identical); (b) the upload arm (Importing <file> N remaining); (c) the pre-walk edge (no count part before the total is known).
  • uv run pytest 100% passing; uv run pytest --cov=app --cov-report=term-missing >90%; uv run ruff check . && uv run pyright clean.
  • README.md / AGENTS.md consistent (the running-label shape).
  • the phase directory is in .agents/phases/complete/; one atomic commit with --no-gpg-sign.