phase: 90_upload_no_scan
All verification is complete and green. Final report:
**Phase 90 (upload_no_scan) — final verification pass: all criteria verified, no fixes needed**
- Verified (not re-implemented): all 3 tasks already complete; working tree carries the phase's uncommitted changes
- Upload pipeline: `_run_upload` stops after row upsert; success = `{"message": "uploaded"}`, null/0/0 progress; `UploadOut` removed from `app/schemas.py`; gates/unpack/swap/failed states intact
- Copy: button "Upload", bare "Processing…", result line "Uploaded \<name\> — press Sync sources to import it."; hint + caption re-pointed at Sync; no "Upload &" remnants in `frontend/`
- Tests: `pytest tests/unit/test_git_sources.py tests/integration/test_git_sources_upload.py tests/unit/test_frontend_sync_upload.py` → 56 passed; E2E phase suite `tests/e2e/test_upload_no_scan.py` → 3 passed (zero docs after upload; ignore edit honored by Sync — 2 added, `notes/skipme.md` excluded; re-upload in-place, still zero docs); affected suites `test_archive_upload_sources.py` + `test_sync_upload_progress.py` + `test_source_removal_cleanup.py` → 15 passed
- Full suite: `uv run pytest --cov=app --cov-report=term-missing` → **1808 passed, 99% coverage** (>90%); `uv run ruff check . && uv run pyright` → clean, 0 errors
**Completion criteria:**
1. Upload settles "ready for sync", zero docs, row + ignore editor — ✅ (E2E test 1)
2. Button "Upload", no "Upload &" copy — ✅ (`rg` empty in frontend/, app/, tests/)
3. RAG-page "Sync sources" imports upload honoring edited ignores — ✅ (isolated E2E test 2)
4. Suite green, >90% coverage, lint clean — ✅ (99%, ruff+pyright clean)
5. Atomic commit — ✅ left to harness per executor rules (no git add/commit run; tree staged-ready)
**Deviations:** `regenerate_overview` still appears once in `git_sources.py` — inside `delete_git_source` (phase-69 locked total-removal behavior, not the upload leg; upload leg is scan-free). `.agents/PLAN.md` does not exist in this repo; locked decisions A1–A4 were enforced from the phase files.
**Next pending phase:** `91_admin_theme_tab` (in `todo/`).
This commit is contained in:
+40
-27
@@ -372,12 +372,15 @@
|
||||
</div>
|
||||
<!-- #sync-result is the aria-live announcer: the last sync
|
||||
result ("N added · …") when a sync settles, and — phase 64 —
|
||||
the LIVE file label while either job runs ("Syncing… <file>
|
||||
(n/m)" / "Importing <file> (n/m)"), UNTRUNCATED (the button's
|
||||
label span ellipsizes; screen readers hear the full
|
||||
source/relative path, which also rides the button title).
|
||||
After an upload settles it stays empty — the upload's counts
|
||||
live on the Sources page (A3). -->
|
||||
the LIVE file label while a sync runs ("Syncing… <file>
|
||||
(n/m)"), UNTRUNCATED (the button's label span ellipsizes;
|
||||
screen readers hear the full source/relative path, which
|
||||
also rides the button title). Phase 90: an in-flight upload
|
||||
run adopts the button with the BARE "Importing…" label (the
|
||||
run is unpack + register only — no scan, so its status
|
||||
never carries a file or counts). After an upload settles it
|
||||
stays empty — the upload's result line lives on the Sources
|
||||
page (A3). -->
|
||||
<span class="sync-result" id="sync-result" role="status" aria-live="polite"></span>
|
||||
<!-- Sync failure banner — role="alert" so a failed sync is announced. -->
|
||||
<div class="kb-banner is-error" id="sync-error-banner" role="alert" hidden>
|
||||
@@ -539,29 +542,35 @@
|
||||
<!-- Phase 49 (owner permission 2026-08-28): the archive upload
|
||||
form replaces the phase-38 local-directory form — an
|
||||
uploaded .tar/.tar.gz/.tgz/.zip is unpacked under
|
||||
BOR_UPLOAD_DIR and scanned; the same filename replaces the
|
||||
source in place (no new folder, no duplicate row). The file
|
||||
control is labeled (visible <label for=…> — WCAG
|
||||
input-label rule); the button runs the §7.4 never-stale
|
||||
BOR_UPLOAD_DIR; the same filename replaces the source in
|
||||
place (no new folder, no duplicate row). The file control
|
||||
is labeled (visible <label for=…> — WCAG input-label
|
||||
rule); the button ("Upload") runs the §7.4 never-stale
|
||||
lifecycle ("Uploading…" while the POST is out). Phase 64
|
||||
(task 05) reworks the rest to the 202 contract (the
|
||||
phase-49 synchronous 200 paragraph is superseded): the 202
|
||||
arrives the moment the archive is safely on disk (A1) — a
|
||||
JS-created "Successfully uploaded — <file>" toast fires
|
||||
then (A2 — the phase-55 .toast node, no markup here; safe
|
||||
to navigate away) and the button settles into the live
|
||||
"Processing… <file> (n/m)" label (A4 — the full path rides
|
||||
the button title) driven by the 2 s poll of
|
||||
(task 05) reworked the rest to the 202 contract (the
|
||||
phase-49 synchronous 200 paragraph is superseded): the
|
||||
202 arrives the moment the archive is safely on disk (A1)
|
||||
— a JS-created "Successfully uploaded — <file>" toast
|
||||
fires then (A2 — the phase-55 .toast node, no markup
|
||||
here; safe to navigate away) and the button settles into
|
||||
the bare "Processing…" label driven by the 2 s poll of
|
||||
GET /api/git-sources/upload/status, until the success line
|
||||
(role=status) or the sanitized error banner (role=alert)
|
||||
lands; 409 re-attaches to the in-flight run — no error
|
||||
banner; the other non-2xx still show the server detail
|
||||
inline. -->
|
||||
inline. Phase 90 (owner-locked A1/A2/A3): the background
|
||||
run is UNPACK + REGISTER ONLY — no model check, no import,
|
||||
no overview refresh — so the processing state covers
|
||||
unpack only (no file, no "(n/m)" counts, no title) and
|
||||
the success line points at the next step: "Uploaded
|
||||
<name> — press Sync sources to import it." The scan is
|
||||
the RAG page's Sync button's job (edit the source's
|
||||
ignore paths first, if you want files excluded). -->
|
||||
<form id="archive-upload-form">
|
||||
<label for="archive-upload-file">Upload a source archive (.tar, .tar.gz, .tgz, .zip)</label>
|
||||
<input id="archive-upload-file" name="file" type="file"
|
||||
accept=".tar,.tar.gz,.tgz,.zip" required>
|
||||
<button type="submit" id="archive-upload-btn">Upload & scan</button>
|
||||
<button type="submit" id="archive-upload-btn">Upload</button>
|
||||
<p class="git-source-error" id="archive-upload-error" role="alert" hidden></p>
|
||||
<p class="git-source-result" id="archive-upload-result" role="status"
|
||||
aria-live="polite" hidden></p>
|
||||
@@ -569,7 +578,7 @@
|
||||
|
||||
<div class="table-wrap" id="git-sources-table-wrap" role="region" aria-label="Sources" tabindex="0">
|
||||
<table class="git-sources-table" id="git-sources-table">
|
||||
<caption class="visually-hidden">Sources the Sync button imports — git repositories it clones, local directories it walks, and uploaded archives (unpacked under the upload directory)</caption>
|
||||
<caption class="visually-hidden">Sources the Sync button imports — git repositories it clones, local directories it walks, and uploaded archives (uploads unpack and register in place here; the Sync button scans them)</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Source</th>
|
||||
@@ -594,18 +603,22 @@
|
||||
touched). Adding still does not clone — the Sync button
|
||||
mirrors the remaining sources (upstream file churn is
|
||||
pruned on that run); the phase-49 upload is the
|
||||
in-place exception (it unpacks and scans, and a
|
||||
same-name re-upload replaces the source in place). -->
|
||||
in-place exception (it unpacks and registers — the scan
|
||||
is the Sync button's job, phase 90 — and a same-name
|
||||
re-upload replaces the source in place). -->
|
||||
<p class="git-source-hint" id="git-sources-hint" role="note">
|
||||
Removing a source is a total removal, done immediately: its
|
||||
entry, its indexed documents, and — for git clones and
|
||||
uploaded archives — its files on the server's disk (the
|
||||
confirmation modal spells out exactly what will be deleted;
|
||||
files in your own local directories are never touched).
|
||||
Uploads unpack and scan immediately — re-uploading the same
|
||||
filename replaces that source in place (no new folder, no
|
||||
duplicate row). The Sync button still mirrors the remaining
|
||||
sources (files removed upstream are pruned on that run).
|
||||
Uploads unpack and register the source only — re-uploading
|
||||
the same filename replaces that source in place (no new
|
||||
folder, no duplicate row). Press <strong>Sync sources</strong>
|
||||
on the RAG page to scan it; edit the source's ignore paths
|
||||
first if you want files excluded. The Sync button still
|
||||
mirrors the remaining sources (files removed upstream are
|
||||
pruned on that run).
|
||||
</p>
|
||||
|
||||
<!-- Phase 69 (owner request 2026-09-02): the remove
|
||||
|
||||
Reference in New Issue
Block a user