Archived case study · service retired

WTG

Where things are in the code, how to run it and what was checked.
Version 21841487f524 · prepared on 7 September 2026

About the project

Each publication goes through several processing steps. The interface needed to show its source, OCR output, classification and the operator's decision. Errors and queues have separate screens.

The system collected publications, ran OCR and classification, then showed them to an operator for review. The service, its data and backups have been removed from the VPS. Anonymized screenshots, diagrams and measurements are kept here.

  • Archived project; service decommissioned. There is no WTG demo link or recovery option.
  • Job statuses and confidence values are not measurements of OCR or model accuracy.
  • Legacy noVNC and unavailable sections are not presented as working features.
  • Observed web memory growth to approximately 3.8 GiB is documented as an observation; the code-level root cause was not established.

Screenshots, diagrams and source evidence retain their original language; captions and descriptions are translated.

Architecture and diagrams

  • Collection and long-running processing are separate jobs with leases and heartbeats.
  • OCR is separate from the web service, with its own queue, statuses and attempts.
  • Source publications, intermediate decisions and final materials have different roles.
  • The archive contains only anonymized images, documentation and aggregates; the working database, sessions and backups were not retained.
Observed architecture before deletion
Observed architecture before deletion · Mermaid ↓
Data model before deletion
Data model before deletion · Mermaid ↓
Former deployment: seven containers
Former deployment: seven containers · Mermaid ↓
Processing sequence before deletion
Processing sequence before deletion · Mermaid ↓
Historical target architecture from source code; not a plan to restart WTG
Historical target architecture from source code; not a plan to restart WTG · Mermaid ↓

Code map: files and dependencies

This map is tied to version 21841487f524. The table lists the screen or API, related module and data.

FeatureScreen / APIModuleData / verification
Authorizationaccountsservices/auth.py, vk_user_token.pyauth_accounts, account_communities; browser/API states are considered separately
Job creation and executionschedules, processingservices/admin_control.py, cli/admin_worker.pyadmin_jobs, admin_job_step_logs; claim, heartbeat, retry, stale cleanup
API schedulingschedules, group-poolservices/api_posts_schedule.pyapi_schedule_steps, api_group_pool_items; schedule generation, queue, cooldown
Collectiongroups, postsservices/crawler.py, vk_parsers.pycommunities, posts, post_media; source, rereading, normalization
Profile and marketplacegroups tabs, marketcommunity_profile.py, community_market.py, community_services.pyprofile, products, services; filters and group association
Quick selectiongroup-poolfast_screen_pool.py, fast_wall_probe.pyfast_screen_pool_states, fast_screen_pool_checks; lease, due rows, retention
Pipelinepipelineservices/content_pipeline.pycontent_pipeline_runs/posts/items; stages and persisted results
OCRprocessing, post detailsocr.py, ocr_jobs.py, cli/ocr_worker.py, cli/ocr_sidecar.pyocr_jobs, post_media; completed/failed, attempts, timeout
Canonical materialsresultspublication_materials.py, publication-intelligencepublication_decisions/materials/media; decision-to-source relationship and revision
Labeling and teacherlabels, processingpublication_teacher.pyteacher runs/results/applications; labeling, discrepancies, application
Logslogs, file-logsweb/app.py, helpers file logsadmin_job_logs, step logs, files; event and file traces
DeliveryTelegram / MAXseparate bot repositoriescanonical output + bot tables; downstream consumes prepared data

Using the code map

  1. Before making a change, find the feature and trace its links to the API, state and storage.
  2. Check inputs, errors, repeated events and dependent workflows.
  3. After making a change, update the map and affected diagrams alongside the code.
  4. Run the related checks and link the new evidence to the source version.

Workflows and API

  1. Browse anonymized schedules, groups, pipeline and materials.
  2. Match a screen to its code-map entry and data diagram.
  3. Open queue/history aggregates and read the measurement date and limitations.
  4. Review the deletion record and disk/RAM comparison before and after decommissioning.

Verification of the published version

CI: prod-deploy ↗ · 61c78116 · historical run of a different version · 2026-06-16T11:57:17Z

CI: prod-deploy ↗ · 1299a357 · historical run of a different version · 2026-06-16T11:45:01Z

  • 30 sanitized UI images checked before deletion
  • Deletion and authoritative DNS removal verified

These checks apply to the listed version. Business metrics and model quality on an independent dataset were not measured.

Measurements

before after
before after · Source data ↓
collection history
collection history · Source data ↓
container logs
container logs · Source data ↓
cpu samples
cpu samples · Source data ↓
material types
material types · Source data ↓
ocr status
ocr status · Source data ↓
table storage
table storage · Source data ↓
  • 30 meaningful screenshots of the actual interface retained.
  • Each screenshot includes its date, scenario and code revision.
  • 527,718 publications and 29,092 OCR jobs recorded; these are different entities, not quality metrics.
  • WTG was deleted after the local archive was verified; before cleanup, its directory occupied approximately 104 GiB.

Running and operating

WTG is excluded from portfolio rollback. /opt/wtg, its containers, data, backups, access credentials, configurations and DNS records were deleted after the local archive was verified.

GitHub source code and shared OS logs were retained as agreed. Dedicated deployment workflows were disabled and WTG keys removed.

The result confirms logical deletion of managed data. Physical erasure of the provider's storage blocks cannot be confirmed from inside a guest VPS.

The server checkout and published audited repository have different SHAs. Each evidence source is identified separately; no equivalence is claimed between the old image and the checkout contents.

Stack

Python / FastAPI / JinjaOperations admin interface, JSON API and orchestration.
PostgreSQL / SQLAlchemy / AlembicPublications, jobs, decision versions, materials and migrations.
PaddleOCRSeparate OCR sidecar and worker.
Docker / Nginx / systemdFormer deployment of seven services and background jobs.

Materials and source code

Code-map documents: June 2026; retained data history: June–July. Archiving and deletion: 7 September 2026.

The evidence archive retains its original language.