# CONTEXT FILE — Statiya_poluchatel_1 ## Updated through EXEC-48 ## Purpose: handoff to another AI/chat with zero loss of project context --- # 0. HOW TO USE THIS FILE This file is the canonical continuation context for the project **Statiya_poluchatel_1 / Autonomous Site Research Pipeline**. A new AI should: 1. Read this entire file before continuing. 2. Treat this file as the authoritative project continuation state. 3. Do **not** restart planning from scratch. 4. Do **not** ask the user to repeat requirements already contained here. 5. Continue the numbered artifact chain from the exact next step specified below. 6. Preserve the current visual/design language of generated HTML files. 7. Preserve all architecture/security/data invariants listed below. 8. Never invent runtime facts, repo paths, frameworks, DBs, hosts, branches, deployment roots, or infrastructure values that were not verified. 9. When the user says only **"дальше"**, generate the next numbered HTML file directly. Current user workflow: - The user repeatedly says **"дальше"**. - Expected behavior: generate the **next numbered HTML execution/evidence artifact** as a downloadable file. - Avoid explanations unless needed. - Final response should normally be only a download link. --- # 1. PROJECT IDENTITY Working name: **Автономный исследовательский конвейер сайтов** Project / artifact chain prefix: `Statiya_poluchatel_1` Core purpose: Build a service that can take a source website URL, inspect the site structure, create a crawl plan, crawl valid article/project pages, classify them, deduplicate and order them, generate stable article IDs, compile machine-readable manifests, render HTML datasets, support a durable owner approval gate after the first 30 valid logical articles, then continue to full corpus processing, validate, deploy, verify live output, and register the dataset/service inside Work. The service must be: - deterministic where possible; - restart-safe; - observable; - security-bounded; - idempotent; - evidence-driven; - suitable for future AI consumption; - designed for manual operator visibility; - deployable to Work after staging/live verification. --- # 2. CORE USER-FACING PRODUCT FLOW Expected end-to-end product behavior: 1. User submits source URL. 2. Service enters preflight/discovery. 3. Service shows a crawl plan. 4. Service starts first-batch work. 5. Service gathers up to 30 valid logical article/project pages. 6. Service renders/validates a preview. 7. Service enters durable `WAITING_FOR_OWNER`. 8. User presses Continue. 9. Full corpus crawl resumes. 10. Full corpus is validated. 11. Static dataset is rendered. 12. Immutable build is staged/published. 13. Live build is verified. 14. Work catalog/index/service registration happens. 15. Only then can the Job become DONE. Conceptual pipeline: `source discovery → crawl-plan construction → policy/classification → crawl → title/URL extraction → deduplication/ordering → stable IDs → batching → AI-readable manifests/navigation → validation → deploy → live verification → Work registration → DONE` --- # 3. VALID ARTICLE / PROJECT POLICY A valid page is a substantive separate article/project/tip page with: - meaningful written content; - normally multiple substantive sentences; - at least one content image. Short but genuinely useful project/tip pages may qualify. Exclude: - video-only pages; - category/archive/listing pages; - service/utility pages; - forums/indexes; - search pages; - navigation shells; - pages with no meaningful text; - pages with no content image; - ambiguous pages. Global invariant: `uncertain → exclude` Stable classification reason codes: - `INCLUDE_ARTICLE` - `INCLUDE_SHORT_NOTE` - `EXCLUDE_VIDEO_ONLY` - `EXCLUDE_NO_MEANINGFUL_TEXT` - `EXCLUDE_NO_CONTENT_IMAGE` - `EXCLUDE_LISTING` - `EXCLUDE_SERVICE` - `EXCLUDE_FORUM` - `EXCLUDE_DUPLICATE_SHELL` - `EXCLUDE_UNCERTAIN` - `EXCLUDE_FETCH_INVALID` --- # 4. ORDERING POLICY Priority order: 1. official chronological archive/category order; 2. `datePublished` / article metadata if broadly consistent; 3. feed order; 4. sitemap order only if proven; 5. deterministic discovery fallback. Save: - method; - direction; - confidence; - evidence refs. Allowed ordering methods: - `ARCHIVE_ORDER` - `DATE_PUBLISHED` - `FEED_ORDER` - `PROVEN_SITEMAP_ORDER` - `DISCOVERY_ORDER` Fine Woodworking benchmark is expected to be reverse chronological. --- # 5. IDENTITY / DEDUP / STABLE ID INVARIANTS Required order: **logical identity → canonical → ordering → corpus freeze → stable IDs** Never assign article IDs to raw URLs first. Strong duplicate evidence: - same normalized/final URL; - redirect convergence; - valid same-source canonical relationship; - stable source-specific content ID; - other explicitly documented strong source-specific equivalence. Weak evidence is never enough alone: - title similarity; - date similarity; - slug similarity; - same author; - same image; - similar text. If equivalence is not proven, keep records separate. Stable IDs: - are per-source; - permanent after assignment; - are not semantically equal to sequence number; - are not automatically renumbered; - are not reused after removal; - one logical identity gets one stable article ID; - aliases do not get separate article IDs. Request-level queue dedup is separate from logical article dedup. --- # 6. DATASET STRUCTURE Conceptual source dataset root: `/datasets//` Expected output: - `index.html` - batch files such as `articles-001-030.html` Visible fields: - sequence; - original title; - canonical/original URL. Machine-readable fields: - article_id; - source_id; - batch_id; - sequence; - title; - canonical_url; - aliases; - prev; - next; - ordering metadata; - verification metadata; - versions. Machine schema: `STATIYA_ARTICLE_DATABASE` Target schema version: `1.0` HTML should embed JSON. Optional: - JSON-LD; - data attributes. MASTER index includes: - source; - status; - counts; - ordering method/confidence; - schema/build/version; - batch directory; - traversal instructions; - validation summary. --- # 7. JOB STATE MACHINE Canonical durable Job statuses: - `CREATED` - `PREFLIGHT` - `PREFLIGHT_READY` - `RUNNING_FIRST_BATCH` - `WAITING_FOR_OWNER` - `RUNNING_FULL` - `VALIDATING` - `DEPLOYING` - `VERIFYING_LIVE` - `DONE` - `PARTIAL` - `FAILED` - `CANCELLED` Critical rules: - state is canonical and durable; - state must not be reconstructed from logs; - Continue must be durable and idempotent; - only one active mutating worker; - worker lease/fencing required; - DONE only after live verification; - owner approval must survive restart; - restart/resume must be safe. UI/observer should show: - job ID; - source; - canonical state; - phase; - activity; - state version; - counters; - current error; - exact next action. Counters: - discovered; - fetched; - included; - excluded; - duplicates; - failed; - pending; - batches. Structured logs: - timestamp; - severity; - stage; - event; - message; - URL; - progress; - reason; - job_id; - state_version. --- # 8. PREFLIGHT Expected internal stages: `CREATED → SCOPE_VALIDATING → ROBOTS_DISCOVERY → SITEMAP_DISCOVERY → FEED_DISCOVERY → ARCHIVE_DISCOVERY → SAMPLE_ANALYSIS → ORDERING_ANALYSIS → PLAN_BUILDING → PREFLIGHT_READY / PARTIAL / FAILED` Principle: **discover first, crawl second** Preflight investigates: - robots.txt; - sitemaps; - sitemap indexes; - feeds; - archives/categories; - pagination; - representative samples; - URL patterns; - ordering evidence. Output: - machine-readable `crawl_plan`. Preflight must be bounded and must not silently become a full-site crawl. --- # 9. CRAWLER PRINCIPLES Crawler executes approved crawl plan. Preferred: - HTTP-first; - browser only as separate proven fallback. Required: - bounded retries; - rate limiting; - persistent queue; - request-level dedup; - safe resume; - explicit stop semantics. Request dedup != logical article dedup. --- # 10. AI ROLE AI is not the mandatory per-page engine. Use AI for: - unknown structure; - ambiguity; - crawl rule proposals; - diagnostics. Volume work should be deterministic. If AI review is used in classification: - bounded; - structured output only; - optional; - fail closed; - hard exclusions cannot be overridden; - timeout/failure should result in deterministic fallback / `EXCLUDE_UNCERTAIN`. --- # 11. DEPLOYMENT MODEL Required deployment pipeline: `VALIDATE → STAGE → PUBLISH → VERIFY LIVE → REGISTER → DONE` Only immutable validated build may be deployed. Conceptual routes: - `/services/site-research-pipeline/` - `/datasets//` Real physical paths/runtime routes are **not locked** until actual runtime discovery. Requirements: - isolated staging; - atomic switch if possible; - previous good build retained; - same build deploy should be idempotent; - Work catalog upsert should be idempotent by dataset identity; - DONE only after live build identity verification. --- # 12. SECURITY Public web only. Allowed network schemes: - HTTP - HTTPS Reject: - localhost; - RFC1918/private ranges; - link-local; - metadata targets; - loopback; - special/reserved targets; - file/data/javascript/ftp/etc. Required: - DNS validation; - all resolved addresses checked; - mixed public/private DNS fails closed; - redirect target revalidation; - browser target revalidation; - DNS/connect TOCTOU mitigation/proof; - TLS verification enabled; - robots respected; - rate limits; - `Retry-After`; - bounded backoff; - response body/header limits; - browser isolated; - no cookies/login/downloads/permissions; - no proxy rotation; - no stealth bypass; - no login/CAPTCHA bypass in MVP. Future browser fallback must share origin budget. --- # 13. FINE WOODWORKING BENCHMARK Existing manual WOOD benchmark exists. Older ZIP reference: `Wood_1_9_Fine_Woodworking_articles_211-240(1).zip` Known characteristics: - 30 articles; - full batch; - embedded `wood-ai-database` JSON; - series metadata; - prev/next; - reverse chronological; - JSON-LD ItemList; - stable FW IDs; - source links; - dedup keys. Manual series in other chats reached 810+. Important: - benchmark is frozen reference only; - new service starts from source URL independently; - answer key/reference data must never become hidden production input. Benchmark comparison categories: - missing valid; - extra false positives; - order; - canonical; - policy; - access; - source changes; - reference defects. Difference is not automatically failure. **Unexplained difference is blocker.** --- # 14. EXISTING DATASET UPDATE MODES — POST-MVP Planned modes: - `CHECK_ONLY` - `PREVIEW_UPDATE` - `APPEND_NEW` - `CORRECT_METADATA` - `MERGE_DUPLICATE` - `MARK_REMOVED` - `REBUILD_STAGING` Not part of current AW-01 implementation unless explicitly required. --- # 15. IMPLEMENTATION METHOD Coding agent target: - GPT-5.6 Luna / Medium Principles: - reuse-before-build; - live infrastructure discovery before architecture freeze; - immutable START_PROJECT; - live project state under `/razraba`; - bounded task windows; - evidence per task; - no invented runtime values. Task contract style: `INPUT → PROCESS/COMPONENT → WHAT IT DOES → WHAT IT READS → WHAT IT WRITES/STORES → OUTPUT → NEXT CONSUMER → ACCEPTANCE → VERIFICATION → ROLLBACK/RISK` Active windows should be around 10–30 bounded tasks. Candidate technology stack before runtime verification: - Crawlee Python - Scrapy - Playwright fallback - Trafilatura spike-only - feedparser - urllib.robotparser - Jinja2 - structlog - RQ - Celery - pip-audit Prefer existing Work crawler if present. --- # 16. RUNTIME MUST NOT BE INVENTED Historical unverified hints: - `server2@192.168.0.116`: text AI/orchestrator/bots/automation - `aiadmin@192.168.0.114`: ComfyUI These are **not verified runtime facts**. Must verify in live environment: - Work root; - repo; - branch; - runtime; - DB; - queue; - Redis; - nginx; - logging; - deploy path; - rollback path; - catalog/index; - auth; - public root. Never treat old hints as verified. --- # 17. RELEASE BLOCKERS Critical blockers include: - SSRF bypass; - secret leak; - DONE before live verify; - lost owner approval after restart; - duplicate logical records after resume; - visible HTML != embedded manifest; - broken batch boundaries; - duplicate/missing IDs; - obvious category/video/service false positives; - crawler escapes scope; - mixed-build deploy; - unexplained Fine Woodworking benchmark differences. --- # 18. MVP EXCLUDES Do not add unless explicitly requested: - full article body/image storage; - semantic summaries; - research_value; - taxonomy; - embeddings; - RAG; - scheduled refresh; - login/CAPTCHA bypass; - auto-update UI; - heavy log analytics. --- # 19. RIGHTS / COPYRIGHT CONTEXT For the WOOD/Mathcast source material, the user has stated that they have legal rights to the relevant source texts and images, all documents exist, and separate copyright/authorship verification is not required for this project material. Do not introduce redundant copyright verification into this project workflow. --- # 20. HTML DESIGN SYSTEM FOR ALL GENERATED FILES No purple/lilac. Core colors: ```css --bg:#f3f0e6; --paper:#fbfaf5; --ink:#1f241f; --muted:#687067; --line:#d8d5c8; --olive:#5f704d; --red:#a0492b; --redbg:#f7e8df; --green:#4f684b; --greenbg:#e8efe4; --chip:#eceae1; --code:#20251f; --codefg:#edf1e8; ``` Visual style: - editorial technical dossier; - large headline; - monospace chips/labels; - minimal/no shadow; - compact tables; - responsive; - sticky left navigation; - search/filter input; - embedded execution manifest JSON; - novice-friendly explanation alongside exact technical contracts. Typical structure: ```html ...CSS...
EXEC-XX · ...

...

...

...
...
...
...
``` Do not invent runtime paths/framework/DB values in these files. --- # 21. COMPLETE FILE CHAIN CREATED SO FAR ## Planning / architecture / implementation packets 1. `Statiya_poluchatel_1_MASTER_PLAN.html` 2. `Statiya_poluchatel_1_01_PRODUCT_SCOPE_AND_ACCEPTANCE.html` 3. `Statiya_poluchatel_1_02_REUSE_SKILLS_RESEARCH.html` 4. `Statiya_poluchatel_1_03_LIVE_DISCOVERY_WORK_INFRA.html` 5. `Statiya_poluchatel_1_04_SOURCE_PREFLIGHT_AND_CRAWL_PLAN.html` 6. `Statiya_poluchatel_1_05_URL_DISCOVERY_CRAWLER.html` 7. `Statiya_poluchatel_1_06_ARTICLE_DETECTION_FILTERING.html` 8. `Statiya_poluchatel_1_07_ORDERING_DEDUP_CANONICAL_IDS.html` 9. `Statiya_poluchatel_1_08_JOB_STATE_CHECKPOINT_RESUME.html` 10. `Statiya_poluchatel_1_09_OPERATOR_UI_LIVE_LOGS.html` 11. `Statiya_poluchatel_1_10_AI_READABLE_DATASET_SCHEMA.html` 12. `Statiya_poluchatel_1_11_BATCH_HTML_AND_MASTER_INDEX.html` 13. `Statiya_poluchatel_1_12_WORK_DEPLOY_AND_CATALOG_INTEGRATION.html` 14. `Statiya_poluchatel_1_13_SECURITY_ROBOTS_RATE_LIMITS.html` 15. `Statiya_poluchatel_1_14_VALIDATION_TESTS_BENCHMARK.html` 16. `Statiya_poluchatel_1_15_UPDATE_EXISTING_DATASET.html` 17. `Statiya_poluchatel_1_16_MASTER_MERGE_START_PROJECT_LUNA_TASKS.html` 18. `Statiya_poluchatel_1_17_RUNTIME_DISCOVERY_EXECUTION_PACKET.html` 19. `Statiya_poluchatel_1_18_START_PROJECT_TEMPLATE_AND_FILL_PROTOCOL.html` 20. `Statiya_poluchatel_1_19_CRAWLER_SPIKES_AND_ARCHITECTURE_ADR_PROTOCOL.html` 21. `Statiya_poluchatel_1_20_RUNTIME_EVIDENCE_NORMALIZATION_AND_CONFLICT_REVIEW.html` 22. `Statiya_poluchatel_1_21_LIVE_RUNTIME_DISCOVERY_OPERATOR_RUNBOOK.html` 23. `Statiya_poluchatel_1_22_RUNTIME_DISCOVERY_RESULT_AND_PASSPORT_FILL_TEMPLATE.html` 24. `Statiya_poluchatel_1_23_CRAWLER_SPIKE_RESULTS_AND_ADR_DECISION_TEMPLATE.html` 25. `Statiya_poluchatel_1_24_START_PROJECT_INSTANTIATION_GATE_AND_IMMUTABILITY_PROTOCOL.html` 26. `Statiya_poluchatel_1_25_RAZRABA_BOOTSTRAP_AND_ACTIVE_WINDOW_01_INITIALIZATION.html` ### AW-01 implementation packets 27. `Statiya_poluchatel_1_26_TASK_001_CORE_DOMAIN_CONTRACTS_IMPLEMENTATION_PACKET.html` 28. `Statiya_poluchatel_1_27_TASK_002_URL_NORMALIZATION_AND_PUBLIC_WEB_SECURITY_GUARD_IMPLEMENTATION_PACKET.html` 29. `Statiya_poluchatel_1_28_TASK_003_PERSISTENT_JOB_STATE_AND_TRANSITION_GUARD_IMPLEMENTATION_PACKET.html` 30. `Statiya_poluchatel_1_29_TASK_004_SOURCE_PREFLIGHT_V1_IMPLEMENTATION_PACKET.html` 31. `Statiya_poluchatel_1_30_TASK_005_PERSISTENT_CRAWL_QUEUE_IMPLEMENTATION_PACKET.html` 32. `Statiya_poluchatel_1_31_TASK_006_HTTP_FETCH_WORKER_IMPLEMENTATION_PACKET.html` 33. `Statiya_poluchatel_1_32_TASK_007_CANDIDATE_LINK_DISCOVERY_AND_EMISSION_IMPLEMENTATION_PACKET.html` 34. `Statiya_poluchatel_1_33_TASK_008_ARTICLE_CLASSIFIER_V1_IMPLEMENTATION_PACKET.html` 35. `Statiya_poluchatel_1_34_TASK_009_LOGICAL_IDENTITY_CANONICAL_ORDERING_AND_STABLE_IDS_IMPLEMENTATION_PACKET.html` 36. `Statiya_poluchatel_1_35_TASK_010_BATCH_AND_DATASET_MANIFEST_COMPILER_IMPLEMENTATION_PACKET.html` 37. `Statiya_poluchatel_1_36_TASK_011_MASTER_AND_BATCH_HTML_RENDERER_V1_IMPLEMENTATION_PACKET.html` 38. `Statiya_poluchatel_1_37_TASK_012_END_TO_END_LOCAL_VERTICAL_SLICE_IMPLEMENTATION_PACKET.html` ### Checkpoint / execution-start transition 39. `Statiya_poluchatel_1_38_ACTIVE_WINDOW_01_CHECKPOINT_GAP_REVIEW_AND_ACTIVE_WINDOW_02_DECISION_PACKET.html` 40. `Statiya_poluchatel_1_39_AW_01_EXECUTION_START_AND_TASK_RUN_PROTOCOL.html` ### AW-01 execution evidence/result templates 41. `Statiya_poluchatel_1_40_TASK_001_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 42. `Statiya_poluchatel_1_41_TASK_002_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 43. `Statiya_poluchatel_1_42_TASK_003_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 44. `Statiya_poluchatel_1_43_TASK_004_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 45. `Statiya_poluchatel_1_44_TASK_005_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 46. `Statiya_poluchatel_1_45_TASK_006_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 47. `Statiya_poluchatel_1_46_TASK_007_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 48. `Statiya_poluchatel_1_47_TASK_008_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` 49. **Latest actual generated file:** `Statiya_poluchatel_1_48_TASK_009_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Important: The human-readable sequence count above includes the MASTER as item 1, but the actual EXEC document id of the latest file is **EXEC-48**. --- # 22. IMPORTANT DISTINCTION: IMPLEMENTATION PACKETS VS EVIDENCE TEMPLATES This is critical. ## Implementation packets Files EXEC-26 through EXEC-37 define how to implement TASK-001…TASK-012. They are **specifications**, not proof that code was actually implemented. ## Checkpoint conclusion EXEC-38 explicitly established: `PLANNED ≠ IMPLEMENTED ≠ TESTED ≠ VERIFIED` The available context contained: - execution packets; - architecture; - plans; but did **not** contain real repo code diffs, test results, runtime evidence, migrations, or real vertical-slice evidence. Therefore the factual checkpoint outcome was: `EXECUTION_NOT_STARTED` ## EXEC-39 EXEC-39 formalized the sequential execution protocol: - execute TASK-001; - gather evidence; - only if VERIFIED continue to TASK-002; - repeat sequentially; - stop on blocker. ## EXEC-40 onward EXEC-40+ are **execution evidence/result templates**. They are deliberately: - `UNFILLED`; - or `BLOCKED_UNTIL_TASK_PREVIOUS_VERIFIED`. They must never be interpreted as proof of actual implementation. --- # 23. AW-01 TASK ORDER Original Active Window 01 task sequence: 1. TASK-001 Core domain contracts 2. TASK-002 URL normalization + public-web security guard 3. TASK-003 Persistent Job state + transition guard 4. TASK-004 Source Preflight V1 5. TASK-005 Persistent crawl queue 6. TASK-006 HTTP fetch worker 7. TASK-007 Candidate link discovery + emission 8. TASK-008 Article classifier V1 9. TASK-009 Logical identity + canonical + ordering + stable IDs 10. TASK-010 Batch + dataset manifest compiler 11. TASK-011 MASTER + batch HTML renderer V1 12. TASK-012 End-to-end local vertical slice Current evidence template chain has reached TASK-009. --- # 24. SUMMARY OF TASK-001…TASK-009 EVIDENCE TEMPLATES ## EXEC-40 — TASK-001 File: `Statiya_poluchatel_1_40_TASK_001_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for real implementation of core domain contracts. Covers: - Job; - OwnerGate; - CrawlPlan; - OrderingStrategy; - Candidate; - ClassificationDecision; - ArticleIdentity; - Batch; - DatasetManifest; - enums; - serialization; - schema/version validation; - batch max-30 invariant; - regression tests. Default: `UNFILLED` Next if VERIFIED: TASK-002 / EXEC-27. --- ## EXEC-41 — TASK-002 File: `Statiya_poluchatel_1_41_TASK_002_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for URL normalization + public-web security guard. Covers: - scheme allowlist; - host/IDNA; - localhost/private/link-local/metadata rejection; - IPv4/IPv6 special cases; - all-DNS-address validation; - mixed public/private DNS fail-closed; - DNS/connect TOCTOU mitigation proof; - redirect target revalidation; - redirect loops/limits; - security vs crawl scope separation. Default: `BLOCKED_UNTIL_TASK_001_VERIFIED` Next if VERIFIED: TASK-003 / EXEC-28. --- ## EXEC-42 — TASK-003 File: `Statiya_poluchatel_1_42_TASK_003_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for persistent Job state and transition guard. Covers: - durable Job repository; - transition matrix; - state_version; - optimistic concurrency/CAS; - idempotency; - durable owner approval; - WAITING_FOR_OWNER restart behavior; - lease/fencing; - stale-worker rejection; - restart recovery; - atomic mutation boundaries; - DONE requires live verification evidence. Default: `BLOCKED_UNTIL_TASK_002_VERIFIED` Next if VERIFIED: TASK-004 / EXEC-29. --- ## EXEC-43 — TASK-004 File: `Statiya_poluchatel_1_43_TASK_004_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for Source Preflight V1. Covers: - robots discovery; - sitemap/index discovery; - RSS/Atom discovery; - archive/category/pagination discovery; - representative sample analysis; - ordering evidence; - CrawlPlan READY; - bounded request budgets; - restart/checkpoint behavior; - no hidden full crawl. Default: `BLOCKED_UNTIL_TASK_003_VERIFIED` Next if VERIFIED: TASK-005 / EXEC-30. --- ## EXEC-44 — TASK-005 File: `Statiya_poluchatel_1_44_TASK_005_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for persistent crawl queue. Covers: - QueueItem model; - states: - PENDING - LEASED - COMPLETED - RETRY_WAIT - FAILED_TERMINAL - CANCELLED - request-level dedup; - deterministic ready-item ordering; - lease/renew; - ACK/NACK; - retry policy; - Retry-After; - expired lease recovery; - Job fencing; - queue counters/checkpoints; - restart persistence. Default: `BLOCKED_UNTIL_TASK_004_VERIFIED` Next if VERIFIED: TASK-006 / EXEC-31. --- ## EXEC-45 — TASK-006 File: `Statiya_poluchatel_1_45_TASK_006_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for HTTP fetch worker. Covers: - one bounded HTTP attempt; - request-time TASK-002 security revalidation; - DNS/connect safety proof; - manual/safely intercepted redirects; - TLS verification; - connect/read/total timeout; - header/body/decompression limits; - streaming body cap; - rate/concurrency; - retry classification; - immutable FetchResult; - queue ACK/NACK integration; - crash/replay behavior; - sanitized logs. Default: `BLOCKED_UNTIL_TASK_005_VERIFIED` Next if VERIFIED: TASK-007 / EXEC-32. --- ## EXEC-46 — TASK-007 File: `Statiya_poluchatel_1_46_TASK_007_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for Candidate Link Discovery + Emission. Covers: - safe bounded HTML parser; - no JS execution; - no network side effects; - relative URLs resolved from final URL; - safe base href; - TASK-002 guard on every target; - typed observations: - OBS_CANONICAL - OBS_NEXT - OBS_PREV - OBS_ALTERNATE - OBS_FEED_LINK - Candidate provenance/depth; - asset/scheme filtering; - queue emission only through TASK-005; - deterministic replay; - page/depth limits; - discovery must not classify articles; - discovery must not perform logical dedup. Default: `BLOCKED_UNTIL_TASK_006_VERIFIED` Next if VERIFIED: TASK-008 / EXEC-33. --- ## EXEC-47 — TASK-008 File: `Statiya_poluchatel_1_47_TASK_008_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for Article Classifier V1. Covers: - deterministic-first classification; - hard exclusions; - meaningful text extraction; - content image qualification without downloads; - listing/service/forum/video-only detection; - short-note include; - uncertain → exclude; - source profile hook; - benchmark answer key must not enter production logic; - optional bounded AI review; - stable reason codes; - classification evidence persistence; - replay determinism; - no network; - no identity/order/ID logic. Default: `BLOCKED_UNTIL_TASK_007_VERIFIED` Next if VERIFIED: TASK-009 / EXEC-34. --- ## EXEC-48 — TASK-009 — LATEST ACTUAL FILE File: `Statiya_poluchatel_1_48_TASK_009_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Purpose: Evidence for: - logical identity; - canonical selection; - publication ordering; - corpus freeze; - stable article IDs; - prev/next chain. Critical invariants: - only INCLUDE records enter; - strong evidence required for merge; - weak signals never sufficient alone; - aliases/provenance retained; - canonical deterministic; - order evidence-backed; - tie-break deterministic; - corpus frozen before ID assignment; - IDs stable per-source; - no automatic renumbering; - no ID reuse; - prev/next chain valid; - replay deterministic. Strong equivalence: - same normalized/final URL; - redirect convergence; - valid same-source canonical; - stable source content ID; - source-specific strong evidence. Weak only: - same/similar title; - same date; - similar slug; - author; - image; - text similarity. Default state: `BLOCKED_UNTIL_TASK_008_VERIFIED` Next if VERIFIED: TASK-010 / EXEC-35. --- # 25. EXACT NEXT FILE TO CREATE When the user says **"дальше"**, the next file must be: `/mnt/data/Statiya_poluchatel_1_49_TASK_010_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Document metadata: - document_id: `Statiya_poluchatel_1_49` - sequence_number: `49` - active_window_id: `AW-01` - task_id: `TASK-010` - document_type: `execution_evidence_template` - packet_ref: `Statiya_poluchatel_1_35_TASK_010_BATCH_AND_DATASET_MANIFEST_COMPILER_IMPLEMENTATION_PACKET.html` - current_result: `BLOCKED_UNTIL_TASK_009_VERIFIED` The file should visually match EXEC-40…48. --- # 26. REQUIRED CONTENT FOR EXEC-49 / TASK-010 EVIDENCE TEMPLATE Title: **Batch + Dataset Manifest Compiler — Execution Evidence + Result** Purpose: Evidence for the real implementation of TASK-010. It must prove that a frozen ordered ArticleIdentity corpus from TASK-009 compiles into deterministic batches and a canonical `STATIYA_ARTICLE_DATABASE 1.0` DatasetManifest. ## Entry gate Require: - TASK-009 = VERIFIED; - frozen ordered corpus available; - source_id stable; - article IDs stable; - no unresolved identity/order blocker. ## Environment facts Include placeholders: - REPO_ROOT - BRANCH - REVISION_BEFORE - REVISION_AFTER - MANIFEST_COMPILER - SERIALIZER - VALIDATOR - TEST_RUNNER - TASK_009_EVIDENCE_REF - CORPUS_FREEZE_REF - PROJECT_STATE_REF ## Reuse review Check existing: - manifest compiler; - batch planner; - schema serializer; - JSON schema validator; - build metadata helper; - deterministic hashing/version helper. ## Changed files / migrations Allowed: - batch compiler; - manifest compiler; - validators; - schema serialization; - fixtures/tests. Out of scope: - renderer; - deployment; - source crawling; - classifier; - ID assignment. ## Input contract Frozen ordered corpus only. Example input: - source_id; - corpus_freeze_id; - ordered ArticleIdentity list; - stable article IDs; - sequence; - canonical URL; - aliases; - title; - ordering metadata; - prev/next. ## Batch rules Critical: - max 30 per batch; - all non-final batches exactly 30; - only final batch may be partial; - every article exactly once; - no article omitted; - no duplicate article across batches; - ordering unchanged; - article IDs unchanged; - sequence unchanged. Batch IDs deterministic. Suggested batch filenames conceptual: - `articles-001-030.html` - `articles-031-060.html` etc. Actual physical paths belong to renderer/runtime, not compiler. ## Required size fixtures Must test: - 1 - 29 - 30 - 31 - 59 - 60 - 61 - 90 - 91 Expected examples: - 30 → one 30 batch - 31 → 30 + 1 - 60 → 30 + 30 - 61 → 30 + 30 + 1 - 91 → 30 + 30 + 30 + 1 Zero articles: must not silently become validated successful dataset unless explicitly supported by product policy. Prefer explicit EMPTY/PARTIAL/failure gate. ## DatasetManifest Canonical machine source for renderer. Schema: `STATIYA_ARTICLE_DATABASE` Version: `1.0` Must include: - dataset_id; - source_id; - source metadata; - build_id/version; - corpus_freeze_id; - schema/version; - ordering method/direction/confidence; - article_count; - batch_count; - batches; - all article records or renderer-consumable canonical references; - traversal metadata; - validation summary; - build provenance. Each batch record: - batch_id; - batch_number; - sequence_start; - sequence_end; - count; - article_ids; - prev_batch_id; - next_batch_id. ## AI traversal metadata Should support another AI reading MASTER and batches. Include: - first batch; - last batch; - batch directory; - next/prev batch references; - article prev/next chain; - machine schema/version. ## Determinism Same frozen corpus must produce semantically identical: - batch boundaries; - batch IDs; - article membership; - manifest; - counts; - ordering; - traversal metadata. Allowed changes: - timestamps/run IDs only if explicitly non-semantic. ## Validation Must verify: - max 30; - all article_ids exactly once; - no batch gaps; - sequence coverage exact; - no overlap; - prev/next batch reciprocity; - article count equals corpus count; - batch count correct; - schema/version exact; - all article records preserve TASK-009 order and IDs; - build provenance present. ## Atomicity/staging Compiler may create output package in isolated temp/staging area then atomically expose complete package. Do not leave half-written manifest as valid output. ## Renderer boundary Renderer TASK-011 must not: - regroup; - reorder; - assign IDs; - choose canonical; - modify batch boundaries. TASK-010 package is canonical renderer input. ## Required tests - size fixtures 1/29/30/31/59/60/61/90/91; - zero corpus behavior; - exact coverage; - no duplicates; - stable batch IDs; - batch prev/next; - manifest serialization; - schema validation; - deterministic replay; - corrupted/inconsistent input rejection; - regression suite. ## Negative tests - duplicate article ID in input; - duplicate sequence; - missing sequence; - unsorted/frozen corpus contract violation; - more than 30 in batch; - missing article from batches; - article duplicated across batches; - broken prev/next batch; - wrong schema/version; - renderer-only field invented by compiler if out of contract. ## Acceptance checklist Must include: - frozen TASK-009 corpus only; - max 30 rule; - exact membership; - order preserved; - IDs preserved; - deterministic batch IDs; - exact counts; - valid batch prev/next; - canonical DatasetManifest 1.0; - AI traversal metadata; - deterministic replay; - zero-corpus policy handled explicitly; - no renderer/deploy logic; - no unrelated diff. ## Final result enum - VERIFIED - PARTIAL - FAILED - BLOCKED Default: `BLOCKED_UNTIL_TASK_009_VERIFIED` ## Project state if VERIFIED last_verified_task = TASK-010 completed_tasks includes TASK-001…010 current_task_id = TASK-011 next packet = EXEC-36 ## Next if VERIFIED TASK-011 / EXEC-36: MASTER + Batch HTML Renderer V1. --- # 27. WHAT COMES AFTER EXEC-49 If user continues saying "дальше": ## EXEC-50 Create: `Statiya_poluchatel_1_50_TASK_011_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Should be blocked until TASK-010 VERIFIED. Key evidence: - renderer consumes TASK-010 canonical package only; - no regroup/reorder/re-ID; - outputs MASTER + batch HTML; - embedded JSON from same canonical data; - visible HTML == embedded machine data; - JSON-in-script escaping safe; - `` injection safe; - filenames deterministic; - JSON-LD optional; - responsive layout; - snapshot/golden tests; - special characters/unicode/malicious strings; - all links valid; - no production deploy. ## EXEC-51 Create: `Statiya_poluchatel_1_51_TASK_012_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Should be blocked until TASK-011 VERIFIED. Key evidence: - local frozen fixture site; - full TASK-001…011 orchestration; - first 30 valid logical identities; - preview; - WAITING_FOR_OWNER durable; - Continue idempotent; - restart mid-crawl; - restart while waiting; - stale worker; - 429 / Retry-After; - 503 then success; - timeout; - 404 terminal; - private redirect blocked; - malformed HTML; - full corpus continuation; - final render; - deterministic replay; - evidence bundle; - no production deploy. After TASK-012 actual evidence exists: rerun EXEC-38 checkpoint procedure using real evidence. Only then: - PROCEED_TO_AW02; - or repair; - or architecture review. --- # 28. EXEC-38 CHECKPOINT LOGIC EXEC-38 file: `Statiya_poluchatel_1_38_ACTIVE_WINDOW_01_CHECKPOINT_GAP_REVIEW_AND_ACTIVE_WINDOW_02_DECISION_PACKET.html` Status taxonomy: - VERIFIED - PARTIAL - FAILED - BLOCKED - NOT_IMPLEMENTED - READY_TO_EXECUTE Possible decisions: - `PROCEED_TO_AW02` - `REPAIR_WINDOW_REQUIRED` - `ARCHITECTURE_REVIEW_REQUIRED` - `EXECUTION_NOT_STARTED` At the current context state: the factual conclusion is **EXECUTION_NOT_STARTED** because we have no real code/test evidence in this conversation. Do not change this to PROCEED merely because more templates were generated. --- # 29. PROPOSED AW-02 — ONLY AFTER REAL AW-01 PASS If real AW-01 eventually passes, proposed AW-02 tasks were: - TASK-014 Fine Woodworking Benchmark Runner - TASK-015 Benchmark Difference Analyzer - TASK-016 Operator Status API / Read Model - TASK-017 Live Structured Log Transport - TASK-018 Operator UI V1 - TASK-019 Deploy Adapter — Staging - TASK-020 Live Verification + Rollback Adapter - TASK-021 Work Catalog/Service Registration - TASK-022 AW-02 Integrated Staging Run TASK-013 is reserved as optional AW-01 Repair Pack if checkpoint finds P0/P1 blockers. Do **not** jump to these yet. --- # 30. TASK-012 VERTICAL SLICE REFERENCE TASK-012 implementation packet: `Statiya_poluchatel_1_37_TASK_012_END_TO_END_LOCAL_VERTICAL_SLICE_IMPLEMENTATION_PACKET.html` Frozen local fixture source should include: - homepage; - robots.txt; - sitemap/index; - RSS/Atom; - archive/category; - pagination; - 35–45 valid article/project pages; - short valid notes; - listing/service/forum/video-only/empty/no-image negatives; - redirect duplicates; - canonical duplicate; - same-title different articles; - relative links; - external/out-of-scope links; - controlled 429/503; - removed page; - known reverse chronological order. Example fixture truth: - expected_valid_logical_articles = 38 - expected_first_batch = 30 - expected_final_batch = 8 - expected_ordering = ARCHIVE_ORDER_DESC Truth file is test-only. Production code must not read answer key. First-30 condition: Count is not fetched pages or raw INCLUDEs. It is up to 30 valid **logical article identities**. Owner gate: - durable; - restart-safe; - Continue idempotent. Full continuation: - RUNNING_FULL; - resume queue; - full corpus; - freeze; - manifest; - render; - validate. Suggested evidence bundle path: `/razraba/evidence/vertical-slice/AW-01-TASK-012/` Suggested files: - environment.json - fixture_truth.json - job_state_transitions.json - preflight_summary.json - queue_summary.json - fetch_summary.json - classifier_matrix.json - identity_merge_report.json - ordering_report.json - batch_manifest_summary.json - render_validation.json - restart_recovery_report.json - failure_injection_report.json - logs_tail.txt - output_tree.txt - verification_summary.json --- # 31. CURRENT USER INTERACTION PREFERENCE User language: Russian. User normally says: - "дальше" - "продолжай" Expected response behavior: - do not restate project; - do not ask unnecessary questions; - generate next artifact immediately; - one short commentary update is okay; - final answer should generally only contain: `[Скачать файл](sandbox:/mnt/data/)` The user explicitly asked now for: "собери файл контекста чтобы можно было продолжить в другом чате с того же места. всю инфу!" This file exists specifically for that handoff. --- # 32. EXACT CURRENT STATE Latest generated file: `/mnt/data/Statiya_poluchatel_1_48_TASK_009_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` Latest EXEC: `EXEC-48` Current template status: `BLOCKED_UNTIL_TASK_008_VERIFIED` No real implementation evidence has been supplied in this conversation. Therefore: - do not claim TASK-009 actually passed; - do not claim AW-01 passed; - do not jump to AW-02 benchmark; - continue generating the next evidence template when user says "дальше". --- # 33. EXACT NEXT ACTION On next "дальше": Create: `/mnt/data/Statiya_poluchatel_1_49_TASK_010_EXECUTION_EVIDENCE_AND_RESULT_TEMPLATE.html` It must be the execution evidence/result template for: **TASK-010 — Batch + Dataset Manifest Compiler** Default: `BLOCKED_UNTIL_TASK_009_VERIFIED` Next task if VERIFIED: TASK-011 / EXEC-36. No web browsing is needed. Use the same HTML design system and embed an `execution-manifest` JSON. --- # 34. DO NOT LOSE THESE PROJECT PRINCIPLES Always preserve: - `uncertain → exclude` - discover first, crawl second - request dedup != logical dedup - logical identity before canonical/order/IDs - corpus freeze before stable IDs - stable IDs never auto-renumber - max 30 per batch - visible HTML == machine manifest - state != logs - durable owner approval - Continue idempotent - one active mutating worker - fencing for stale workers - SSRF protection at every network boundary - redirects revalidated - browser cannot bypass security/rate controls - DONE only after live verification - benchmark answer key never becomes production input - unexplained benchmark difference is blocker - no invented runtime facts - implementation packets are not proof - evidence templates are not proof until filled with real repo/test evidence - Work production deployment remains separately gated --- # 35. HANDOFF IN ONE SENTENCE The project has completed architecture + implementation specifications for TASK-001…012 and evidence templates through TASK-009; the next artifact is **EXEC-49 / TASK-010 Batch + Dataset Manifest Compiler Execution Evidence + Result Template**, while all task statuses remain unverified until real repository/test evidence exists.