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:
+7
-29
@@ -421,40 +421,18 @@ class GitSourceList(BaseModel):
|
||||
from_env: bool
|
||||
|
||||
|
||||
class UploadOut(BaseModel):
|
||||
"""The upload run's result fields (phase 49, task 02; phase 64, task 03).
|
||||
|
||||
Phase 64 (task 03): ``POST /api/git-sources/upload`` answers 202 the
|
||||
moment the archive is on disk; these fields become the shape of
|
||||
``GET /api/git-sources/upload/status`` ``detail`` on ``success`` —
|
||||
the uploaded source's name (filename minus the archive suffix) plus
|
||||
the SAME count keys as the admin sync's success ``detail``
|
||||
(``files``, ``added``, ``updated``, ``unchanged``, ``pruned``,
|
||||
``errors``, ``chunks`` — ``app.api.sync._run_sync``) and the
|
||||
``overview`` flag: the Sources page renders the same
|
||||
"N added · N pruned" result line for both.
|
||||
"""
|
||||
|
||||
source: str
|
||||
files: int
|
||||
added: int
|
||||
updated: int
|
||||
unchanged: int
|
||||
pruned: int
|
||||
errors: int
|
||||
chunks: int
|
||||
overview: bool
|
||||
|
||||
|
||||
class UploadAccepted(BaseModel):
|
||||
"""``POST /api/git-sources/upload`` 202 response (phase 64, task 03).
|
||||
|
||||
The archive is **safely on disk** — this is the "successfully
|
||||
uploaded" moment the Sources page toasts on (owner-locked A2). The
|
||||
scan itself (unpack → swap → row upsert → model check → import →
|
||||
overview) runs in a background task behind
|
||||
uploaded" moment the Sources page toasts on (phase 64 A2). The rest
|
||||
(unpack → swap → row upsert — and nothing else: no model check, no
|
||||
import, no overview refresh, phase 90 A1 — the scan is the RAG
|
||||
page's "Sync sources" button's job) runs in a background task behind
|
||||
``GET /api/git-sources/upload/status``, whose ``success`` ``detail``
|
||||
carries the :class:`UploadOut` fields.
|
||||
carries the no-count ``{"message": "uploaded"}`` payload (phase 90
|
||||
A2 — the status key set is unchanged; the UI composes the user
|
||||
copy).
|
||||
"""
|
||||
|
||||
detail: str = "upload received"
|
||||
|
||||
Reference in New Issue
Block a user