phase: 154_sync_status_freshness
All 4 task files exist in `complete/`, and only `00_phase.md` remains in `todo/`. This is the final verification pass. I'll read through the task files and check the current state of the code.
This commit is contained in:
@@ -16,8 +16,9 @@ unpack → swap → row upsert continues server-side behind
|
||||
pattern; the phase-64 key set with ``current_file``/``files_done``/
|
||||
``files_total`` null/0/0 for the whole run — phase 90 A2), and the
|
||||
upload's UI processing state is the BARE "Processing…" (no file, no
|
||||
"(n/m)") until the no-count "Uploaded <name> — press Sync sources to
|
||||
import it." result line lands (phase 90 A3). The scan — with its live
|
||||
"(n/m)") until the no-count "Uploaded <name> (<stamp>) — press Sync
|
||||
sources to import it." result line lands (phase 90 A3 — the phase-154
|
||||
completion stamp). The scan — with its live
|
||||
file label — is the RAG page's **Sync sources** button's job, and the
|
||||
suite proves the new loop: upload → nothing indexed → **the sync that
|
||||
follows the upload shows its live file label and lands the counts**.
|
||||
@@ -159,6 +160,31 @@ SLOW_DELAY_S = "0.15"
|
||||
|
||||
#: The uploaded archive: 25 small docs under ``docs/``.
|
||||
UPLOAD_NAME = "e2e-prog"
|
||||
|
||||
|
||||
def _ready_for_sync_line(name: str) -> re.Pattern[str]:
|
||||
"""Phase 154 (task 02): the ready-for-sync line carrying the
|
||||
completion stamp — "Uploaded <name> (<stamp>) — press Sync sources
|
||||
to import it." (the fresh 202 settle, the page-local name). In
|
||||
E2E the stamp is ALWAYS the same-day ``HH:MM`` form — the run
|
||||
settles within seconds (the date-qualified forms are unit-pinned
|
||||
on a fixed clock — E2E never depends on the wall clock)."""
|
||||
return re.compile(
|
||||
rf"^Uploaded {re.escape(name)} \(\d{{1,2}}:\d{{2}}\)"
|
||||
r" — press Sync sources to import it\.$"
|
||||
)
|
||||
|
||||
|
||||
def _nameless_ready_for_sync_line() -> re.Pattern[str]:
|
||||
"""Phase 154 (task 02): the boot re-render line — nameless (the
|
||||
safe name was page-local — ``lastUploadName`` is null after a
|
||||
reload, phase 90) but SELF-DATING through the completion stamp
|
||||
(``fmtUploadStamp`` from the server payload): "Uploaded <stamp> —
|
||||
press Sync sources to import it." (the same-day ``HH:MM`` form in
|
||||
E2E)."""
|
||||
return re.compile(
|
||||
r"^Uploaded \d{1,2}:\d{2} — press Sync sources to import it\.$"
|
||||
)
|
||||
UPLOAD_ARCHIVE = f"{UPLOAD_NAME}.tar.gz"
|
||||
N_FILES = 25
|
||||
UPLOAD_FILES: dict[str, str] = {
|
||||
@@ -747,7 +773,7 @@ def test_upload_progress_is_bare(
|
||||
# the archive — and the KB empty (no scan, phase 90 A1).
|
||||
result = page.locator("#archive-upload-result")
|
||||
expect(result).to_have_text(
|
||||
f"Uploaded {UPLOAD_NAME} — press Sync sources to import it.",
|
||||
_ready_for_sync_line(UPLOAD_NAME),
|
||||
timeout=30_000,
|
||||
)
|
||||
expect(btn).to_be_enabled()
|
||||
@@ -915,9 +941,12 @@ def test_upload_reattach_after_reload(
|
||||
expect(page.locator("#archive-upload-error")).to_be_hidden()
|
||||
expect(page.locator(".toast")).to_have_count(0)
|
||||
# …and the settled result line: the nameless variant (the safe
|
||||
# name was page-local — lastUploadName is null after a reload).
|
||||
# name was page-local — lastUploadName is null after a reload),
|
||||
# self-dating through the completion stamp (phase 154 — the stamp
|
||||
# comes from the server payload, so the line is still self-dating
|
||||
# with the name unknown).
|
||||
expect(page.locator("#archive-upload-result")).to_have_text(
|
||||
"Uploaded — press Sync sources to import it.",
|
||||
_nameless_ready_for_sync_line(),
|
||||
timeout=SETTLE_TIMEOUT_MS,
|
||||
)
|
||||
expect(page.locator("#archive-upload-btn")).to_be_enabled()
|
||||
|
||||
Reference in New Issue
Block a user