Browse documentation

How the frontend/server communication audit works

See how Enji Guard checks request efficiency and correctness across requesting clients.

Audit page Frontend/server communication audit 

What this audit answers

How efficiently and reliably does the requesting client exchange data with a server? The client can be a web, mobile, or desktop app, a CLI, an SDK, a worker, or a service. The audit follows the part that initiates requests and consumes their results.

What Enji Guard inspects

Enji Guard traces important workflows from request triggers through shared network code to response handling and client state. It inspects loaders, caches, subscriptions, polling, and session refresh. For web clients it also follows routes, rendering effects, server-side rendering, and hydration where relevant.

Response types, API specifications, fixtures, and controlled observations help establish the contract that client code relies on. The audit checks real dependencies between requests, the bounds on repeated work, and what happens when inputs change while a request is still in flight.

Diagnostic criteria

The report rates applicable criteria from 0 to 5. An inapplicable criterion or one with insufficient evidence has an explanation in place of a rating.

  • Request count and payload. Check repeated reads, client-side N+1 patterns, page limits, and unnecessary fields or rows.
  • Loading order. Check which requests depend on earlier results and which can run independently.
  • Cache identity and freshness. Trace resource, user, tenant, and session scope, along with invalidation and required freshness.
  • Request lifecycle. Follow request ownership, refresh, polling, subscriptions, cleanup, and stop conditions.
  • Concurrent and obsolete responses. Inspect response ordering and safeguards when inputs or tasks overlap.
  • Mutations. Trace duplicate invocations, operation identity, result reconciliation, and optimistic updates or rollback where used.
  • Results and failures. Check how clients distinguish success, empty results, and errors, and how they let callers recover.
  • Timeouts, retries, and limits. Check time budgets, safe retries, service limits, and overlapping work that can amplify load.

How evidence becomes findings

A finding shows which client owns the request, what triggers it, what response or state it depends on, and how the mechanism affects the user or server. For example, the audit can trace whether a late response for a previous filter overwrites results for the current filter. The structured report includes a summary, evidence and confidence for each finding, diagnostic criteria, recommendations, scope limits, and a score when supported.

Low covers small excess work or inconsistency. Medium covers a meaningful, bounded interaction defect or excess work with a recovery path. High requires substantial incorrect behavior or avoidable work on an important workflow or across many paths. Critical requires demonstrated repeated irreversible or destructive server mutations, or a self-sustaining request storm that threatens core service availability, with a reachable trigger and ineffective safeguards. Unconfirmed opportunities can appear as Info.

How the score works

Enji Guard calculates scores the same way across audits. The calculation starts at 100 and deducts 25 points per Critical finding, 14 per High, 7 per Medium, and 3 per Low. Info findings deduct zero. The calculation counts each independent root cause once when the evidence supports medium or high confidence. One Critical or at least two High findings cap the result at 69. The final score stays within 0–100. Diagnostic criterion ratings do not enter the calculation.

Limitations and boundaries

The read-only audit focuses on data and API interactions from the requesting side. Backend code may clarify response structure. Server implementation analysis and production measurements are outside this scope. Optional local checks use synthetic data or controlled response fixtures. The report distinguishes request behavior established by code from traffic and latency that would require measurement.

Review and rerun

Reproduce the affected request sequence and check its relevant server assumptions. After a change, rerun against the new commit and compare the evidence for the same client trigger and state transition.