chore(salvage): preserve uncommitted WIP from /opt/vehiq-work/0pt-p060-p068_0pt before machine cleanup (2026-09-27)
CI (SIAX Cloud) / quality (push) Successful in 49s
CI (SIAX Cloud) / security (push) Successful in 7m5s
Security Scan (SIAX Cloud) / security (push) Successful in 7m5s
CI (SIAX Cloud) / integration (push) Successful in 18m53s
CI (SIAX Cloud) / security (pull_request) Successful in 46s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 58s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m38s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m45s
CI (SIAX Cloud) / quality (push) Successful in 49s
CI (SIAX Cloud) / security (push) Successful in 7m5s
Security Scan (SIAX Cloud) / security (push) Successful in 7m5s
CI (SIAX Cloud) / integration (push) Successful in 18m53s
CI (SIAX Cloud) / security (pull_request) Successful in 46s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 58s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m38s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m45s
This snapshot was found sitting uncommitted in a stale /opt/vehiq-work lane clone dated ~2026-09-09..18, base branch: feat/p060-p068-ingestion-plane. Not reviewed, not verified against current main. Pushed only so the directory could be deleted without losing the diff.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# 02 · Architecture
|
||||
|
||||
> **Capability/egress decision 2026-09-16:**
|
||||
> `docs/architecture/1P_PROXY_PLATFORM_INTEGRATION.md` supersedes older blanket
|
||||
> prohibitions. Technical functions are optional and execution-gated; proxy,
|
||||
> rotation, stealth and managed unblock are owned by 1p rather than rebuilt in
|
||||
> 0pt. Current-code observations below remain valid historical facts.
|
||||
|
||||
> **Known issues affecting this doc, in brief** — full detail + evidence in [`README.md`](../README.md)'s
|
||||
> "Known issues" section: (1) no auth/session system exists yet, so several newer routes trust
|
||||
> client-supplied `tenant_id` (see "Known gaps" below); (2) the CL0UD/N0D/AUD0/ST0RE platform clients are
|
||||
@@ -35,7 +41,7 @@ This principle describes — and is largely realized by — the **original edge
|
||||
|
||||
- **Next.js (Vercel)** — all customer/admin UI: marketing site, catalog, configurator, checkout, production tracker, validation, portal, admin. It also hosts **two distinct families** of API route handlers under `app/api/`: the original order/catalog/estimate surface (some of which defer to the FastAPI engine), and the newer P0 data-platform surface under `app/api/0pt/*` (does not defer to the engine at all — see below).
|
||||
- **FastAPI orchestrator** (`services/api/orchestrator/main.py`) — REST contract in `docs/04-api.md`: estimates, orders, sources, vehicle lookup, sanctions screening, job run/status. **Not on Vercel** (serverless timeouts kill long jobs). *Correction: earlier drafts of this doc pointed at `src/orchestrator`; that was the pre-migration location. `docs/09-build-plan.md` Phase 0 called for moving it into `services/api`, and that move has happened — the code lives at `services/api/orchestrator` today.*
|
||||
- **Workers** (`services/api/workers/`) — adaptive router (`adaptive_router.py`, verified: chooses only among compliant methods — official API → bulk → authorized web → licensed, no bypass/stealth/proxy-rotation tier exists in it, by design) + pipeline stages (`pipeline.py`, `queue.py`, `resolve.py`, `run.py`). See `docs/06-data-engine.md`.
|
||||
- **Workers** (`services/api/workers/`) — adaptive router (`adaptive_router.py`, verified: currently chooses official API → bulk → authorized web → licensed). Optional bypass/stealth/proxy-rotation transport is delegated to b0ts + 1p rather than duplicated here. Pipeline stages: `pipeline.py`, `queue.py`, `resolve.py`, `run.py`. See `docs/06-data-engine.md`.
|
||||
- **Postgres** — backbone (`docs/03-data-model.md`) incl. `pgvector` for matching/embeddings, for the original edge + engine plane. Wired via `lib/db.ts` (env-guarded: `DATABASE_URL`/`POSTGRES_URL`; falls back to an in-memory, non-durable store when unset, e.g. `lib/orders-store.ts`).
|
||||
- **NocoDB / Metabase** — both are defined as services in `infra/docker-compose.yml`; embedding them into the portal as "Min data" / customer dashboards is the target, not yet confirmed wired into a portal page in this pass.
|
||||
- **Cloudflare R2** — file storage (uploads + deliverables) via presigned URLs. Env-guarded (`app/api/uploads/route.ts` checks `R2_ACCESS_KEY_ID`/`R2_BUCKET`/`R2_ENDPOINT` and returns `501` until set); the presign call itself is still a stub (`put_url: null`) even when the env vars are present — not wired end-to-end yet.
|
||||
@@ -147,7 +153,7 @@ Flagged so it is not repeated: `src/services/quality-check-service.ts`, `src/ser
|
||||
|
||||
### Two diverged git remotes
|
||||
|
||||
`origin` in local checkouts of this repo is `github.com/sax3l/0pt`. A separate Gitea remote, `git.siax.io/sax3l/0pt`, shares at least part of the same history (`services/api/workers/adaptive_router.py` is byte-for-byte identical between GitHub's current `main` and a Gitea post-fix PR branch) but independently accumulated commits GitHub's `main` never received — including, at one point, a WAF-bypass/proxy-rotation/fake-identity scraper stack that directly violated the CLAUDE.md §1 sourcing rule (since removed on Gitea via a separate PR). **Which remote is authoritative, which is actually deployed to `0pt.app`, and whether the two should be kept in sync is unresolved and is Simon's decision** — do not assume `origin`/GitHub is the sole copy of this codebase, here or in any other doc.
|
||||
`origin` in local checkouts of this repo is `github.com/sax3l/0pt`. A separate Gitea remote, `git.siax.io/sax3l/0pt`, shares at least part of the same history (`services/api/workers/adaptive_router.py` is byte-for-byte identical between GitHub's current `main` and a Gitea post-fix PR branch) but independently accumulated commits GitHub's `main` never received — including, at one point, a local WAF-bypass/proxy-rotation/identity-profile scraper stack that now overlaps b0ts + 1p ownership (since removed on Gitea via a separate PR). **Which remote is authoritative, which is actually deployed to `0pt.app`, and whether the two should be kept in sync is unresolved and is Simon's decision** — do not assume `origin`/GitHub is the sole copy of this codebase, here or in any other doc.
|
||||
|
||||
## Stack decisions — IN
|
||||
|
||||
@@ -174,7 +180,7 @@ Flagged so it is not repeated: `src/services/quality-check-service.ts`, `src/ser
|
||||
| Meilisearch (v1) | Postgres full-text suffices to a few thousand rows; add later |
|
||||
| Delta Sharing (v1) | unnecessary; customer pull via scoped role + exports |
|
||||
| Trigger.dev | the existing queue already schedules jobs; Resend covers mail |
|
||||
| FlareSolverr / stealth browsers / undetected-* / proxy-fingerprint rotation / fake-account creation | **prohibited** — see CLAUDE.md §1. Replace with compliant fetching. (The Gitea-only scraper stack described under "Two diverged git remotes" above is exactly this — removed there, never present on GitHub `main`.) |
|
||||
| Proxy rotation / stealth browser / managed unblock / account automation | Optional high-risk capabilities. Route-level ownership belongs to 1p; activate through explicit scope, entitlement, isolation, budget and audit rather than a blanket ban or local duplicate implementation. |
|
||||
|
||||
## Hosting (cheapest coherent) — **SUPERSEDED** (BACKLOG P2-5)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user