FlxWoo logoFlxWoo

FlxWoo architecture

Subsystem boundaries, execution guarantees, observability model, and failure handling. This document defines what the system enforces, not just what it intends.

System boundary

FlxWoo interposes between WooCommerce's hook system and the final checkout output. It governs the execution space between plugin field registration and rendered result. It does not replace WooCommerce internals.

Within the FlxWoo boundary

  • Field registry and ownership
  • Field resolution order
  • Validation coordination
  • Render pipeline and isolation
  • Phase sequencing and enforcement
  • Error boundaries and failure handling
  • Request tracing and execution logs
  • Webhook event handling
  • Idempotency enforcement

Outside the boundary

  • Cart state and session management
  • Payment gateway dispatch
  • Order persistence
  • WooCommerce hook and filter API
  • Stripe API communication
  • CDN and cache layer configuration

FlxWoo reads from WooCommerce state. It does not write back to WooCommerce internals.

Execution lifecycle

Every checkout request executes the same five-phase pipeline. Phases are sequential. No phase begins until the previous phase completes. Control enforces this. Each phase has defined inputs, outputs, guarantees, and observability points.

  1. 1

    Registration

    Input: WooCommerce checkout field filter chain and FlxWoo field providers.

    Output: Closed canonical registry. Duplicate keys resolved by provider priority.

    Guarantee: No new fields can be added after registration closes.

    Forbidden: Value resolution, validation, rendering, or output generation.

    Observability: Registry contents logged at phase close; provider failures logged with identity and error detail.

  2. 2

    Resolution

    Input: Closed registry plus data sources: session, cart, user meta, plugin-provided defaults.

    Output: Field map with resolved values. Unresolvable fields receive null — no silent defaults.

    Guarantee: Resolution order is priority-based, not hook-order-dependent. Resolution is a pure function of inputs.

    Forbidden: Validation, rendering, or registry mutation.

    Observability: Resolved values and source decisions logged per field.

  3. 3

    Validation

    Input: Resolved field state. Validation rules (per-field and cross-field).

    Output: Validated field state with structured failure data attached to each affected field.

    Guarantee: Validation never mutates field values. Failures are collected, not thrown. All rules run — evaluation is not short-circuited on first failure.

    Forbidden: Field mutation, registry modification, rendering, or output.

    Observability: Structured failure data logged as typed records: field key, rule name, message.

  4. 4

    Render

    Input: Immutable snapshot of validated field state, including failure metadata for affected fields.

    Output: HTML fragments ordered by registry sort order, not render execution order.

    Guarantee: Render cannot call back into Core, trigger re-validation, add or remove fields, or access WooCommerce hooks directly.

    Forbidden: Any state mutation. Any write path back to Core.

    Observability: Render duration and field-level output logged. Render failures captured with full pipeline trace.

  5. 5

    Output

    Input: Rendered HTML from the Render phase.

    Output: Checkout HTML delivered to WooCommerce output hooks plus a complete pipeline trace.

    Guarantee: Output failure falls back to WooCommerce default rendering. No partial output is delivered.

    Observability: Full trace — registry contents, resolved values, validation results, render output — emitted as a single structured log record per request.

Core

Core owns checkout state before rendering. Its output is a validated field state object. Everything downstream depends on this object.

Field registry

Data resolution

Validation

Core does not

Render

Render is a pure consumer. It receives validated field state from Core and produces HTML. It has no write access to Core and no mechanism to trigger re-validation or modify field definitions.

Input contract

Render receives an immutable snapshot containing field definitions, resolved values, and validation results including failure metadata. Render cannot distinguish between a field that was never registered and a field removed before render — it sees only what Core provides.

Output

Render produces HTML fragments. Each fragment corresponds to one field or field group. Fragments are ordered by the registry's sort order, not by render execution order.

Render does not

Control

Control coordinates the pipeline. It does not define fields, resolve data, validate, or render. It sequences phases and enforces boundaries between them.

Phase sequencing

Control starts each phase, awaits completion, then starts the next. A phase that has not completed cannot be followed by another. The decision to halt or continue after a phase failure is per-phase, not global.

Error boundaries

Control wraps each phase in an error boundary. A validation failure does not prevent rendering — Render receives the failure metadata. A render failure halts the pipeline; no partial output is delivered. Control logs all phase transitions and failures.

Control does not

Data flow

Data flows in one direction. Core produces state. Render consumes state. No subsystem reads from a downstream subsystem. These constraints are structural, not conventional.

Core

Reads from WooCommerce: fields, session, cart, user meta. Writes to: validated field state.

Render

Reads from: validated field state (Core output). Writes to: HTML output.

Control does not carry data. It enforces when each subsystem executes. Render cannot query Core for additional data mid-render. Core cannot inspect Render output.

Deterministic execution guarantees

These rules are always true during a FlxWoo pipeline execution. They are enforced by the system, not by convention.

  1. 1

    Render never receives unvalidated field state. Validation must complete before Render executes.

  2. 2

    Core never produces HTML output. Output generation belongs exclusively to Render.

  3. 3

    Control never modifies field definitions, field values, or validation rules. It coordinates; it does not mutate.

  4. 4

    No field can be added to the registry after registration closes. Late additions are rejected, not silently dropped.

  5. 5

    Validation never mutates field values. It reads resolved state and produces failure data only.

  6. 6

    Render has no write path back to Core. The data flow is unidirectional by design.

  7. 7

    Phase N does not begin until phase N-1 completes. No phase can be skipped or run concurrently.

  8. 8

    Every pipeline execution produces a trace log, regardless of success or failure. Traces are the primary observability artifact.

Observability model

Every pipeline execution is observable. Observability is not optional instrumentation — it is a first-class output of the execution system.

Failure model

Failures are explicit and phase-bound. No failure crosses phase boundaries silently. The system defines where failures are allowed, how they are surfaced, and what continues after them.

Operational tooling

FlxWoo ships operational tooling for production validation and debugging workflows.

Implementation reference

For integration details, API reference, operational tooling usage, and cache configuration, see the documentation.