Pure functions: normalization, parsing, ID allocation, ordering, batching, redaction.
01 / Verification contract
Каждый критический инвариант из предыдущих SP должен быть либо unit/integration/browser/live test, либо явным owner gate с сохранённым evidence. Скриншот может дополнять тест, но не заменяет machine-verifiable checks.
Fine Woodworking run стартует с source URL и общих правил. Ручной WOOD dataset используется только как frozen reference для сравнения результата.
02 / Test layers
Crawler queue, classifier, resolver, renderer, state repository, deploy adapter in isolation.
Multiple components over controlled local fixtures.
Forced crashes, duplicate workers, partial checkpoints, deploy interruption.
SSRF, redirects, robots, rate limits, secret leakage, injection, browser scope.
Operator UI and generated dataset pages in real browser.
Actual Work deployment verification against public URLs.
Real representative resource compared with known curated reference.
03 / Quality gates
SP-03 runtime evidence exists; technology choices are not based on guesses.
Discovery, queue, retry, scope and resume fixtures pass.
Positive/negative corpus meets agreed precision-oriented thresholds.
Dedup/order/ID boundary fixtures pass deterministically.
Forced-kill recovery and owner-gate persistence pass.
All schema/HTML/navigation validators pass.
Security suite has no unresolved critical failures.
Fine Woodworking benchmark produces explainable differences within accepted tolerance.
Immutable validated build + rollback path verified.
Live Work paths, catalog integration and browser navigation verified.
04 / Fixture families
| ID | Family | Coverage |
|---|---|---|
| FIX-URL | URL normalization | case, fragments, ports, query params, trailing slash, encoded paths. |
| FIX-SITEMAP | Sitemaps | single sitemap, index, nested, loop, huge stream, mixed content. |
| FIX-ROBOTS | robots.txt | allow, disallow, sitemap directives, unavailable robots. |
| FIX-FEED | Feeds | RSS/Atom order, partial historical coverage, malformed entries. |
| FIX-LIST | Listings | category/archive/pagination/calendar loop/tag/search pages. |
| FIX-ARTICLE | Articles | long article, short valid tip, no image, lazy image, video-only, forum-like page. |
| FIX-CANON | Canonical identity | redirect alias, rel=canonical, print view, conflicting canonical, external canonical. |
| FIX-ORDER | Ordering | published dates, ties, missing dates, wrong lastmod, deterministic fallback. |
| FIX-JOB | Job state | crash at each major phase, stale worker, double Continue. |
| FIX-HTML | Generated HTML | 0/1/29/30/31/60/61/65 records, long titles, hostile titles. |
| FIX-SEC | Security | localhost/private IP, redirect SSRF, huge body, script injection, credential-like values. |
| FIX-DEPLOY | Deploy | partial copy, stale cache, 404 batch, duplicate catalog registration. |
05 / Unit/component matrix
| Component | Required proof |
|---|---|
| URL normalizer | same semantic URL → same request identity when rule proves equivalence; unrelated query variants stay separate. |
| Batch partitioner | N records → exact ranges; 30 max; final partial valid. |
| Public ID allocator | sequence 1..N → unique SOURCE_000001..N. |
| Ordering engine | same frozen input → identical order on repeated run. |
| Canonical resolver | strong evidence beats weak; external conflict never silently wins. |
| Secret redactor | tokens/cookies/auth fields redacted, safe text preserved. |
| HTML escaper | hostile title renders as text, not script/markup. |
| State transition validator | invalid transitions rejected. |
| Checkpoint version guard | stale state_version write rejected. |
06 / Crawler evaluation
| Metric | Expectation |
|---|---|
| Coverage | Fraction of known benchmark corpus discovered before classification. |
| Duplicate request rate | Should stay near zero after normalization/queue dedup. |
| Retry behavior | Transient failures retried; permanent failures bounded. |
| Browser usage | Measured percentage; must remain exceptional on HTTP-friendly source. |
| Loop resistance | Calendar/pagination/sitemap loops terminate. |
| Resume | Forced stop resumes without full rediscovery. |
| Scope discipline | No unapproved external hosts fetched. |
| Resource use | Memory and concurrency remain bounded on large sitemap fixture. |
07 / Classifier evaluation
| Area | Rule |
|---|---|
| Primary bias | Precision-first: false positives are more harmful than false negatives. |
| Positive set | Known valid articles/projects/tips. |
| Negative set | category/archive/search/video-only/forum/service/no-image pages. |
| Uncertain set | Borderline pages expected to resolve to EXCLUDE_UNCERTAIN. |
| Metrics | precision, recall, false-positive reasons, false-negative reasons. |
| Release emphasis | No obvious listing/video/service false positives in benchmark sample. |
| Profile tuning | Any rule change must re-run full fixed evaluation set. |
| Regression | Previously fixed page remains in fixture corpus. |
08 / Identity / ordering / IDs
| Area | Required proof |
|---|---|
| Logical duplicate precision | Aliases merge only with sufficient evidence. |
| Same-title separation | Different articles with same title remain separate. |
| Ordering stability | Repeated frozen build has identical order. |
| Boundary correctness | 29/30/31 and 59/60/61 cases. |
| ID stability predeploy | Rebuild staging corrects missing records before freeze. |
| ID stability postdeploy | Routine recrawl does not renumber published articles. |
09 / Chaos and resume
| Crash point | Expected recovery |
|---|---|
| Preflight crash | Resumes unfinished surfaces. |
| First-batch crash | Continues toward first 30 without duplicate candidate records. |
| WAITING_FOR_OWNER restart | Still waits. |
| Continue double-submit | Single durable approval. |
| Full crawl crash | Pending queue restored. |
| Validation crash | Restarts from frozen corpus. |
| Deploy crash | Recovers/rolls back without duplicate registration. |
| Live-verify crash | DONE remains false until verification resumes. |
10 / Security suite
| Test | Expected behavior |
|---|---|
| SSRF direct | 127.0.0.1, ::1, RFC1918, link-local blocked. |
| SSRF redirect | public→private redirect blocked. |
| Scheme abuse | file/data/javascript/ftp blocked. |
| DNS drift | private resolution at request time blocked. |
| robots | disallowed route never fetched. |
| 429 | Retry-After/backoff honored. |
| Runaway URLs | safety ceiling trips. |
| Browser popup | new host passes same scope guard. |
| Injection | source title cannot execute on Work dataset page. |
| Leakage | public artifacts/diagnostic packet contain no secrets/internal paths. |
11 / Browser + live verification
| Browser scenario | Expected behavior |
|---|---|
| Operator landing | URL input works; invalid URL error is understandable. |
| Preflight | Plan visible before full crawl. |
| Live logs | State/header/counters/log stream visible without reload. |
| Owner gate | Continue/Reject actions persist. |
| Reconnect | Page reload restores canonical job state. |
| Dataset MASTER | Batch directory and machine manifest present. |
| Batch pages | first/middle/final navigation works. |
| Mobile | monitoring + dataset pages remain usable. |
| JS off dataset | core generated HTML still usable. |
| Live check | Expected behavior |
|---|---|
| HTTP | MASTER and every batch URL reachable. |
| Identity | live build_id/dataset_id/schema match expected. |
| Catalog | exactly one dataset registration. |
| Route | Work → Services → service → dataset → batch path works. |
| Original source links | remain correct and external. |
| No mixed build | all live pages belong to same immutable build. |
| Rollback | known-good previous build can be restored during replacement test if safe to exercise. |
12 / Fine Woodworking / WOOD benchmark
| Reference aspect | What it means |
|---|---|
| Reference corpus | Existing manually curated Fine Woodworking WOOD pages. |
| Reference structure | 30 substantive article records per full batch; final/boundary consistency. |
| Reference identity | Stable per-source IDs such as FWW/FW-style sequential identifiers. |
| Reference order | Reverse chronological for Fine Woodworking dataset. |
| Reference graph | previous/next batch and article relationships. |
| Reference machine layer | Embedded JSON manifest + JSON-LD/data-* style machine-readable structures. |
| Reference source policy | Article page evidence preferred; sitemap/archive support discovery; uncertain non-articles excluded. |
| Reference caveat | Manual corpus may itself contain past corrections; newest available reference snapshot is required for formal benchmark. |
| ID | Benchmark step | Rule |
|---|---|---|
| B-14-01 | Freeze benchmark snapshot | Select latest trustworthy Fine Woodworking manual dataset/context and record exact reference version. |
| B-14-02 | Independent run | New service starts from source URL; do not seed it with the manual answer list. |
| B-14-03 | First-30 comparison | Compare titles, canonical URLs, order and exclusions. |
| B-14-04 | Tune by rule | Fix source profile/systemic logic, not individual records. |
| B-14-05 | Full run | Collect complete reachable corpus under current product/security policy. |
| B-14-06 | Normalize comparison | Compare logical articles by canonical/alias evidence, not raw URL string only. |
| B-14-07 | Explain deltas | Every missing/extra/reordered record gets a reason category. |
| B-14-08 | Boundary compare | Check batch transitions against reference around 30-record boundaries. |
| B-14-09 | Graph compare | IDs/navigation/manifest consistency validated independently. |
| B-14-10 | Decision | Accept, retune, or block release based on documented deltas. |
Сравниваем то, что важно новому сервису: coverage, корректность article/non-article, порядок, logical duplicates, canonical URL, границы пакетов, стабильные IDs и связность HTML/manifest.
13 / Как объяснять benchmark differences
| Category | Meaning |
|---|---|
| MISSING_VALID | Reference article absent from generated corpus. |
| EXTRA_FALSE_POSITIVE | Generated record is not a valid article under accepted contract. |
| ORDER_DIFFERENCE | Same article set, different sequence. |
| CANONICAL_DIFFERENCE | Same logical article, preferred URL differs. |
| REFERENCE_POLICY_DIFFERENCE | Manual reference used a rule no longer in universal product contract. |
| ACCESS_DIFFERENCE | Current site/robots/access changed since manual reference. |
| SOURCE_CHANGED | Article removed/moved/new since reference snapshot. |
| REFERENCE_DEFECT | Manual benchmark itself proven inconsistent. |
14 / Release evidence packet
| Artifact | Purpose |
|---|---|
| test_summary.json | Machine-readable totals by suite/gate. |
| junit_or_equivalent.xml | Optional CI-compatible executable test results. |
| benchmark_delta.json | Per-record benchmark differences and reason categories. |
| security_report.json | Security test outcomes; no secret values. |
| browser_evidence/ | Screenshots/trace refs where browser proof is needed. |
| validation_report.json | Generated dataset structural validation. |
| live_verify.json | Public Work URL/build identity verification. |
| release_decision.md/json | Accepted risks, blockers, exact build/commit versions. |
15 / Hard release blockers
| ID | Blocker |
|---|---|
| BLOCKER-01 | Any SSRF bypass or secret leak. |
| BLOCKER-02 | DONE possible before live verification. |
| BLOCKER-03 | Resume loses owner approval or duplicates logical articles. |
| BLOCKER-04 | Generated visible HTML diverges from machine manifest. |
| BLOCKER-05 | Broken batch boundaries or duplicate/missing public IDs. |
| BLOCKER-06 | Classifier admits obvious category/video-only/service false positives in accepted benchmark sample. |
| BLOCKER-07 | Crawler escapes approved host scope. |
| BLOCKER-08 | Deploy can expose incomplete mixed build without rollback. |
| BLOCKER-09 | Benchmark differences cannot be explained/reproduced. |
16 / Definition of Done
| ID | Criterion |
|---|---|
| A-14-01 | Every critical product contract has at least one executable test. |
| A-14-02 | All security-critical tests pass before release. |
| A-14-03 | Forced-kill recovery is tested at multiple phases. |
| A-14-04 | 0/1/29/30/31/60/61/65 rendering fixtures pass. |
| A-14-05 | Classifier regression corpus contains positives, negatives and uncertain examples. |
| A-14-06 | Fine Woodworking benchmark uses a frozen named reference snapshot. |
| A-14-07 | Benchmark run starts independently from source URL. |
| A-14-08 | Every benchmark delta has a categorized explanation. |
| A-14-09 | No release blocker remains unresolved. |
| A-14-10 | Live Work verification evidence matches exact build_id being released. |
| A-14-11 | Browser acceptance covers operator UI and generated dataset. |
| A-14-12 | Test evidence is machine-readable enough for a new AI session to inspect. |
| A-14-13 | A failed gate prevents progression to release. |
| A-14-14 | Accepted exceptions are explicit owner/ADR decisions, not hidden test skips. |
17 / Luna Medium bounded blocks
| Block | Scope | Expected result |
|---|---|---|
| LUNA-14-A | Fixture harness | Reusable local fixtures for sitemap/listing/article/security cases. |
| LUNA-14-B | Unit/component suites | Normalization, classifier helpers, identity, batching, state. |
| LUNA-14-C | Crawler integration | Coverage/retry/loop/resume/scope metrics. |
| LUNA-14-D | Chaos suite | Forced kill, stale worker, deploy interruption. |
| LUNA-14-E | Security suite | SSRF/robots/rate/browser/injection/leakage. |
| LUNA-14-F | HTML/browser suite | Render validators + browser flows. |
| LUNA-14-G | Fine Woodworking benchmark harness | Reference snapshot loader + independent run comparator. |
| LUNA-14-H | Delta reporter | Categorize missing/extra/order/canonical/reference/source changes. |
| LUNA-14-I | Release gate compiler | Single PASS/FAIL decision with evidence refs. |