phase: 173_docs_push_creds_split
All gates green. Final report: **Phase 173 — final verification pass (all tasks already complete in `complete/`)** - Verified the full implementation is in the working tree: `docs_user`/`docs_token` settings + catalogue rows (task 01), `docs_repo` PUT 422 guard + `docs_token` write-only pin (task 02), `run_git(env)` + `push_document(user, token)` credential env (task 03), `settings_migrate.py` wired into `create_app()` (task 04), E2E suite (task 05). - **Completion criteria:** 1. GET `/api/admin/settings` lists `docs_user` (plain) + `docs_token` (secret, `value=null`), token never in any body — ✅ `test_docs_token_is_write_only_masked_end_to_end` + E2E sentinel-absent-from-DOM 2. PUT `docs_repo` with `://user:pass@` → 422 naming the fields; clean URL passes — ✅ integration + E2E UI-side 3. Token set → `GIT_CURL_USERNAME`/`GIT_CURL_PASSWORD`/`GIT_TERMINAL_PROMPT=0` on every git step; empty → `env=None` — ✅ mocked-git unit tests 4. Legacy env split once at startup, idempotent, one INFO line, `.env` untouched — ✅ `test_settings_migrate.py` (4 shapes) + `test_docs_push_migrate.py` 5. Full suite green, coverage >90%, lint clean — ✅ 6. E2E isolated: `test_docs_push_creds.py` 4/4; regression set (panel + layout + response_to_docs) 21/21 — ✅ 7. Commit + phase move — harness's job (per instructions, not mine). 8. README/AGENTS consistent — ✅ (below) - Tests/lint: `uv run pytest` exit 0 (4112 passed) · `uv run pytest --cov=app --cov-report=term-missing` TOTAL 99% · `uv run ruff check .` clean · `uv run pyright` 0 errors - Docs: README.md (incl. Docs-push config section, guard/migration paragraph, `.env.example` block) and AGENTS.md verified consistent in full; fixed two stale docstrings in `app/config.py` + `app/core/settings_catalog.py` (`is_set` → the API's actual `has_value` field). - No live-infrastructure changes (no live step in this phase). No next pending phase — `todo/` held only 173.
This commit is contained in:
@@ -553,7 +553,7 @@ def test_admin_sees_groups_and_source_badges(page: Page, app_url: str, db_ready:
|
||||
return el.scrollHeight > el.clientHeight;
|
||||
}"""
|
||||
)
|
||||
assert scrolls, "75 rows must overflow the bounded card (the scroll must bite)"
|
||||
assert scrolls, "78 rows must overflow the bounded card (the scroll must bite)"
|
||||
|
||||
# The groups render in the server's order (the pinned display
|
||||
# groups — at least these two).
|
||||
@@ -981,7 +981,12 @@ def test_clear_all_overrides(page: Page, app_url: str, db_ready: None) -> None:
|
||||
expect(page.locator("#settings-status")).to_contain_text(
|
||||
"Cleared 3 overrides.", timeout=30_000
|
||||
)
|
||||
assert page.locator(".settings-src.is-db").count() == 0
|
||||
# The re-GET settles the badges (the status line lands BEFORE the
|
||||
# re-render — the §7.4 lifecycle); wait for the settled state
|
||||
# rather than snapshotting a mid-flight render (the combined-run
|
||||
# race — the 78-item catalog's re-GET can outlast the status
|
||||
# poll's gap under a three-suite run, phase-173 regression pass).
|
||||
expect(page.locator(".settings-src.is-db")).to_have_count(0, timeout=30_000)
|
||||
expect(page.locator('tr[data-key="app_name"] .settings-src')).to_have_text("env")
|
||||
expect(page.locator('tr[data-key="input_placeholder"] .settings-src')).to_have_text("env")
|
||||
expect(page.locator('tr[data-key="top_n_docs"] .settings-src')).to_have_text("default")
|
||||
|
||||
Reference in New Issue
Block a user