Connect to server2 and capture host passport
Prove actual host/runtime instead of trusting old notes.
hostnamectl || true uname -a cat /etc/os-release date -Is uptime nproc free -h df -hT lsblk -f
docs/discovery/server2_host_passport.txtЭтот документ задаёт точный read-only маршрут, по которому coding-AI должна восстановить фактическое состояние Work перед заморозкой архитектуры. Он не выдумывает project_root, Redis, базу, worker или deploy — всё это должно быть доказано на реальном сервере.
Попытка получить work.mathchast.com из текущей среды планирования упёрлась в DNS/fetch failure. Это классифицируется как NOT_PROVEN_FROM_THIS_RUNTIME, а не как «сайт не работает». Реальную доступность обязана проверить coding-AI с implementation host.
До идентификации правильного repo/project_root и deploy path запрещено менять файлы, контейнеры, systemd/nginx или устанавливать crawler dependencies.
| ID | Факт | Значение | Status/source | Комментарий |
|---|---|---|---|---|
FACT-01 | Project site/domain | work.mathchast.com | OWNER-PROVIDED | Public project domain used for Work and future service/datasets. |
FACT-02 | Service entry concept | Work → Services → Autonomous Site Research Pipeline | OWNER-PROVIDED | New service should be reachable from Work's services area. |
FACT-03 | Server2 declared role | Text AI orchestrator, bots, automation | SOURCE-INSTRUCTION | Declared in project super-instruction; runtime verification still required. |
FACT-04 | Server2 SSH | ssh server2@192.168.0.116 | SOURCE-INSTRUCTION | SSH key; sudo NOPASSWD declared. Do not copy secrets into reports. |
FACT-05 | srv1 declared role | ComfyUI / visual AI tasks | SOURCE-INSTRUCTION | Likely irrelevant to this service unless discovery proves otherwise. |
FACT-06 | srv1 SSH | ssh aiadmin@192.168.0.114 | SOURCE-INSTRUCTION | Read-only discovery only unless a later task explicitly needs it. |
FACT-07 | Planning/runtime rule | Live runtime facts outrank old documentation | SOURCE-INSTRUCTION | Conflicts must be recorded, not silently resolved. |
FACT-08 | Current external verification | Public Work URLs were not reachable from the present planning runtime | OBSERVED-HERE | This is an environment limitation, not evidence that Work is down. Coding AI must verify from the real project runtime. |
| ID | Неизвестное |
|---|---|
U-01 | Actual project_root/repository for Work |
U-02 | Git remote, active branch, clean/dirty status, current commit |
U-03 | OS/kernel/resources of server2 at implementation time |
U-04 | Python/Node/runtime versions available |
U-05 | Existing web framework / backend architecture |
U-06 | Existing queue/worker mechanism |
U-07 | Redis/Valkey present? version? ownership? |
U-08 | Database present? PostgreSQL/SQLite/other? |
U-09 | Existing logging format and live-log transport |
U-10 | Nginx/reverse proxy config for work.mathchast.com |
U-11 | TLS/DNS status and deploy path for Work |
U-12 | Existing services page source file/route |
U-13 | Existing work-ai-index source/generation mechanism |
U-14 | Current static asset/public directory conventions |
U-15 | Existing deploy script/systemd/docker/compose/CI |
U-16 | Backup/rollback mechanism |
U-17 | How current generated HTML artifacts are published |
U-18 | Whether any crawler/scraper dependencies already exist |
U-19 | Available disk space for crawl state / temp HTML |
U-20 | Ports/listeners and resource conflicts with other projects |
Prove actual host/runtime instead of trusting old notes.
hostnamectl || true uname -a cat /etc/os-release date -Is uptime nproc free -h df -hT lsblk -f
docs/discovery/server2_host_passport.txtDetermine viable implementation languages/versions.
python3 --version || true python --version || true node --version || true npm --version || true pnpm --version || true uv --version || true pip3 --version || true docker --version || true docker compose version || true
docs/discovery/runtime_inventory.txtFind authoritative code/config for work.mathchast.com.
find /mnt /opt /srv /var/www /home -maxdepth 4 -type d -name .git 2>/dev/null | sed 's#/.git$##' | sort find /mnt /opt /srv /var/www /home -maxdepth 5 -type f \( -name 'work-ai-index.html' -o -name 'services.html' \) 2>/dev/null find /mnt /opt /srv /var/www /home -maxdepth 4 -type f \( -name 'compose.yml' -o -name 'docker-compose.yml' -o -name 'pyproject.toml' -o -name 'package.json' \) 2>/dev/null
docs/discovery/work_location_candidates.txtConfirm repo, branch, commit, framework, dependencies and deployment hints.
git status --short --branch git remote -v git rev-parse HEAD git log -5 --oneline --decorate find . -maxdepth 2 -type f | sort | sed -n '1,240p' test -f pyproject.toml && sed -n '1,220p' pyproject.toml || true test -f requirements.txt && sed -n '1,220p' requirements.txt || true test -f package.json && cat package.json || true test -f compose.yml && sed -n '1,260p' compose.yml || true test -f docker-compose.yml && sed -n '1,260p' docker-compose.yml || true
docs/discovery/work_repo_inventory.txtKnow what is already deployed and what can be reused safely.
ss -lntup || true
systemctl --type=service --state=running --no-pager || true
docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}' || true
docker compose ls || true
docs/discovery/service_inventory.txtDecide whether RQ/queue persistence can reuse existing infrastructure.
command -v redis-cli >/dev/null && redis-cli --version || true
command -v valkey-cli >/dev/null && valkey-cli --version || true
command -v psql >/dev/null && psql --version || true
command -v sqlite3 >/dev/null && sqlite3 --version || true
docker ps --format '{{.Names}} {{.Image}}' | grep -Ei 'redis|valkey|postgres|sqlite|mysql|mariadb' || true
docs/discovery/stateful_services_inventory.txtFind actual live document root/proxy target and route conventions.
nginx -T 2>/dev/null | sed -n '1,320p' || true find /etc/nginx -maxdepth 3 -type f -print 2>/dev/null | sort grep -RniE 'work\.mathchast\.com|server_name|root |proxy_pass|location ' /etc/nginx 2>/dev/null | head -n 400
docs/discovery/nginx_work_routes.txtReuse actual structure rather than inventing a second catalog.
grep -RniE 'work-ai-index|services|Сервисы|service' . --exclude-dir=.git | head -n 400 find . -maxdepth 4 -type f \( -name '*.html' -o -name '*.py' -o -name '*.js' -o -name '*.ts' \) | sort | sed -n '1,500p'
docs/discovery/work_catalog_routes.txtAvoid adding a parallel log stack.
grep -RniE 'logging|structlog|loguru|winston|pino|sse|websocket|EventSource' . --exclude-dir=.git | head -n 400
journalctl --disk-usage || true
docker ps --format '{{.Names}}' | while read n; do echo '###' $n; docker inspect "$n" --format '{{json .HostConfig.LogConfig}}' 2>/dev/null; done || true
docs/discovery/logging_inventory.txtKnow exactly how final dataset pages become live on Work.
find . -maxdepth 4 -type f \( -iname '*deploy*' -o -iname '*publish*' -o -name '*.service' -o -name '*.sh' \) | sort grep -RniE 'rsync|scp|nginx|systemctl|docker compose|deploy|publish' . --exclude-dir=.git | head -n 500
docs/discovery/deploy_inventory.txtSeparate DNS/network/runtime failures from app failures.
getent hosts work.mathchast.com || true curl -sSIL --max-time 20 https://work.mathchast.com/ || true curl -sSIL --max-time 20 https://work.mathchast.com/work-ai-index.html || true curl -sSIL --max-time 20 https://work.mathchast.com/services.html || true
docs/discovery/live_work_http.txt| ID | Decision | Rule | Required evidence |
|---|---|---|---|
DEC-01 | Implementation runtime | Use existing Work runtime if viable. Do not introduce a second language/runtime only because a crawler library looks attractive. | SP-03 evidence |
DEC-02 | Crawler core | Crawlee vs Scrapy remains OPEN until runtime + equal benchmark spike. | SP-02 + SP-03 + later spike |
DEC-03 | Job queue | Reuse existing worker/queue first. RQ only if compatible Redis/Valkey already exists or is separately approved. Celery only if already present/needed. | SP-03 |
DEC-04 | Logging | Reuse existing logging transport/format first; add structlog only if it solves a demonstrated gap. | SP-03 |
DEC-05 | Dataset storage during run | Prefer simple persistent job state compatible with one-source-at-a-time MVP; exact DB/storage follows live discovery. | SP-03 |
DEC-06 | Deploy | Must reuse Work's real deployment path and verify live URLs. No separate hosting platform by default. | SP-03 |
DEC-07 | Public path | Provisional: /services/... for operator entry and /datasets/<source-slug>/ for completed public dataset; final route must match Work's actual conventions. | SP-03 |
| ID | Criterion |
|---|---|
A-03-01 | A verified project_root/repo for Work is identified with evidence. |
A-03-02 | Active branch, commit and remote are recorded. |
A-03-03 | Actual runtime versions are recorded; unsupported assumptions are removed. |
A-03-04 | Existing worker/queue/Redis/DB/logging stack is either identified or explicitly proven absent. |
A-03-05 | Nginx/reverse proxy or equivalent live route for work.mathchast.com is identified. |
A-03-06 | Current Services page and work-ai-index implementation/source are located. |
A-03-07 | Current deploy mechanism and rollback path are identified. |
A-03-08 | Live Work URLs are checked from the real implementation host. |
A-03-09 | No secret values are copied into the discovery artifact; only names/references are recorded. |
A-03-10 | SP-02 candidate statuses are updated based on runtime facts before any production install. |
| ID | Risk | Impact | Mitigation |
|---|---|---|---|
R-03-01 | Wrong repo/project root | Could mutate unrelated project. | Require path + Git evidence + matching Work files/domain config before write permission. |
R-03-02 | Assuming Redis/DB exists | Would overcomplicate architecture or break deploy. | Verify service/port/container/config before queue decision. |
R-03-03 | Reading secrets into docs | Security incident. | Record env variable names only; redact values; never cat secret stores into report. |
R-03-04 | Public URL inaccessible from planner runtime | Could be mistaken for outage. | Classify as ACCESS_RUNTIME_FAILURE/NOT_PROVEN and verify from real implementation host. |
R-03-05 | Choosing crawler before infra discovery | Could force incompatible runtime. | Keep Crawlee/Scrapy status OPEN until evidence. |
R-03-06 | Writing new deploy stack | Creates duplicate operational path. | Reuse verified Work deployment unless a separate ADR proves need. |
Можно фиксировать имена env-переменных, secret-store references, paths к config и факт наличия credentials. Нельзя сохранять токены, пароли, private keys, cookies или полный вывод команд, если он раскрывает секреты.
LIVE FACT RECORD fact_id value status = VERIFIED | UNVERIFIED | STALE | CONFLICT | ACCESS_RUNTIME_FAILURE source verified_at evidence_path notes Если docs != runtime: CONFLICT → evidence → decision/ADR → accepted state. Не выбирать удобную версию молча.
После выполнения D-01…D-11 coding-AI обновляет статусы SP-02, фиксирует фактический project_root/repo/runtime/deploy и только после этого создаётся Statiya_poluchatel_1_04_SOURCE_PREFLIGHT_AND_CRAWL_PLAN.html.
NEXT EXACT ACTION 1. SSH → server2@192.168.0.116 2. LUNA-MEDIUM bounded read-only discovery 3. execute D-01 … D-11 4. save sanitized evidence 5. verify Work live URL 6. update Crawlee/Scrapy/RQ/logging decisions 7. checkpoint 8. proceed to SP-04