# Changelog of B2B Company Data Enrichment & Completion (`akatra/b2b-data-completion-agent`) Actor

- **URL**: https://apify.com/akatra/b2b-data-completion-agent/changelog.md
- **Full Actor documentation**: https://apify.com/akatra/b2b-data-completion-agent.md

## Changelog

### 1.0.0 (release candidate)

Result schema version: 1 (the version of the Akatra result layout, not of the Actor code).

- Data contract: required fields are satisfied only by present and valid values; email verification semantics (`not_checked`, `mx_only`, `catch_all`, `unknown` are never `verified`).
- Gap-aware execution: work is planned per missing field, re-planned after each step, cached per website, and stops when the contract is satisfied.
- Internal website completion: a bounded, static-HTML reader of the company's own public pages (home, contact, about, imprint) for business email (role-based, own domain),
  business phone and company social profiles (LinkedIn company page, Instagram, Facebook, X, YouTube). `robots.txt` is respected. Address is parsed but not offered.
- SSRF protection: scheme/port/host checks, every resolved IP validated, connection pinned to the validated IP, manual revalidated redirects, size/time/decompression limits.
- Provenance for every accepted value; stable `stopReason` and `unresolvedReasons`; field states; attempts; cost breakdown; `SUMMARY` record with stop-reason counts.
- Person-level data is never mapped, stored or echoed (privacy filter on the `original` echo; technical roles such as `abuse@` are not collected; general contact addresses are ranked first).
- Budgeting and charging: Decimal budget manager, persist-then-charge, real `Actor.charge` adapter behind `AKATRA_CHARGING_MODE` (default `off`, no price is active).
- Default memory is 1024 MB (benchmark: 256 MB resolved about 8 percent fewer fields and ran about three times slower at the same compute cost).
- External provider adapters exist (mocked tests only) but are not active: they need a plan that can run third-party Store Actors.
- Not in V1: browser rendering, proxy support, address extraction, decision makers, employees, personal emails, CRM, outreach, lead scoring.
- Deprecated, kept for schema compatibility: `Capability.WEBSITE_VALIDATION`, `Capability.CONTACT_EXTRACTION`.

### 0.1 (unreleased)

- Internal data collection block: SSRF-safe fetcher (`h11`), bounded company-site crawler (`internal_web`), email/phone/social extraction, JSON-LD parsing, run-level cache with
  in-flight sharing, provider health telemetry, validator and merger, execution loop with re-planning, external Actor adapter (mocked only), pipeline and `main.py` wiring,
  read-only source dataset. `h11` added as a dependency. `internal_web` enabled in the default registry. Phase 2 YouTube normalizer now accepts legacy `youtube.com/<name>` URLs
  (found on real sites). No prices, no publication.

- Core engine block (planning mode): gap detector, provider registry, deterministic router, budget manager, billing abstraction, stop and decision
  engines. Field-level capabilities added to `Capability` (legacy members kept); dataset schema `attempts.capability` enum updated to match.
  `ProviderDescriptor` gained `state`, `cost_known`, `metadata`, Decimal cost, priority and pinned-build validation. No new dependencies.

- Phase 3 contract engine (`src/core/contract_engine.py`): per-field satisfaction with stable reason codes, record-level contract result,
  completeness over requested fields. Internal only; no provider routing, no schema change.

- Phase 2 normalization: domain, URL, email, phone, social, company name and record normalizers, dedup keys; `tldextract` and
  `phonenumbers` (plus `idna`, imported directly) added; `defaultMemoryMbytes` set to 256 in `actor.json`; dataset `recordId`
  description now says `row-N` for records without an id.

- Phase 1 foundation: Actor configuration and schemas (input, output, dataset), canonical model and provider-result types,
  status and verification enums, error hierarchy, provider contract, input validation, tests.

- Memory: `actor.json` now sets the default to 256 MB (a new Actor otherwise defaults to 4096 MB and the start event is charged per GB).
