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:
@@ -537,6 +537,19 @@ class Settings(BaseSettings):
|
||||
#: hidden and the push endpoint 409s (the optional-feature pattern of
|
||||
#: the git-sources env fallback).
|
||||
docs_repo: str = ""
|
||||
#: Docs-push remote username (phase 173, ``BOR_DOCS_USER``) — paired
|
||||
#: with ``docs_token``; travels to git as the ``GIT_CURL_USERNAME``
|
||||
#: environment variable (``app/core/docs_push.py``, task 03) — never
|
||||
#: in the command line. Empty (default) = no credentials: the push
|
||||
#: is anonymous/URL-credential-free, exactly as before this phase.
|
||||
docs_user: str = ""
|
||||
#: Docs-push remote token (phase 173, ``BOR_DOCS_TOKEN``) — write-only
|
||||
#: (catalogue ``secret=True``): the API reports ``has_value`` and never
|
||||
#: the value (``value=None`` while masked); the admin panel renders
|
||||
#: it masked. Travels to git as
|
||||
#: ``GIT_CURL_PASSWORD`` (``app/core/docs_push.py``, task 03).
|
||||
#: Empty (default) = the credential env is not set at all.
|
||||
docs_token: str = ""
|
||||
#: The branch pushes land on (phase 59): each push cuts it fresh from
|
||||
#: ``docs_base_branch`` and ``git push --ff-only``s it — the owner
|
||||
#: opens the PR themselves (D3: no PR tooling). A git branch token,
|
||||
|
||||
Reference in New Issue
Block a user