Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.67 KB

File metadata and controls

40 lines (27 loc) · 1.67 KB

Architecture

This page is the architecture entry point for the current codebase.

Verified Scope

The active generation pipeline is synchronous and centered on src/Service/UserAgentService.php.

Pipeline Summary

  1. Validate GenerationSpec with SpecValidator; assert supported with SpecCapabilities.
  2. Build candidate browser templates (Chrome, Firefox, Safari, Edge).
  3. Apply BrowserFilter, DeviceFilter, OsFilter, VersionRangeFilter, EngineFilter, and RiskLevelFilter through CompositeFilter.
  4. Select one template (default WeightedStrategy; other strategy classes resolved from spec).
  5. Resolve context via VersionPicker, LocalePicker, ArchPicker, and optional ModelPicker.
  6. Render with UserAgentRenderer.

Important Current Behavior

  • UserAgentService does not persist generated strings to LruHistory.
  • LruHistory is currently used by AvoidRecentStrategy and stores browser family names in memory.
  • GenerationSpec::strategy is accepted, but UserAgentService currently only handles the default weighted class explicitly; non-default values fall back to random selection from filtered candidates.

Related Pages

Next

Related