Engineering dossier

The model is not the source of truth.

LeagueLoop treats AI as one bounded transformation inside an observable pipeline. This page exposes the architecture and proof normally discovered through a public repository.

← Return to the coaching report

Data flow

Every boundary has one job

External data becomes evidence before the model sees it, then deterministic validation stands between generated coaching and the player.

External systems

Riot + patch data

  • Account identity
  • Match-V5 + timeline
  • Versioned patch sources
Deterministic server

Facts before advice

  • Validate + normalize
  • Derive evidence
  • Rank coachable moments
  • Bind applicable knowledge
Model boundary

One bounded call

  • Compact projection only
  • Structured coaching output
  • No raw Riot payloads
Deterministic guard

Reject unsupported claims

  • Evidence + knowledge refs
  • Time + diversity rules
  • Player-facing prose
Browser output

Useful next action

  • Coaching review
  • Expandable reasoning
  • Report-only PDF
Hard boundary: raw Match-V5 and timeline payloads remain inside the ingestion side. Only selected evidence, candidate windows, and applicable knowledge cross into the model projection.

Execution trace

From request to accepted artifact

The diagram defines ownership. This trace connects each boundary to behavior a reviewer can inspect or test.

  1. 01

    HTTP perimeter

    Accept local, credential-backed review requests

    Observable proof

    Reject non-local traffic before parsing or external work.

  2. 02

    Riot ingestion

    Validate → normalize

    Observable proof

    Transport, timeout, schema, and cancellation paths are covered by boundary tests.

  3. 03

    Candidate extraction

    Derive → score → keep ≤ 12

    Observable proof

    Candidate IDs and rankings are deterministic for a stored packet.

  4. 04

    Knowledge binding

    Attach applicable, patch-matched claims

    Observable proof

    Packet validation rejects inactive or out-of-scope knowledge IDs.

  5. 05

    Model + validator

    One call → validate → fail closed

    Observable proof

    The provider sets retries to zero; structured-output tests reject unsupported references.

  6. 06

    Report + export

    Accepted review → browser + PDF

    Observable proof

    The report projection excludes intake identity, source match ID, and provider metrics.

Safety contract

Rules the happy path cannot bypass

These are enforced constraints, not instructions that the model is trusted to remember.

InvariantRuleEnforcement
Model inputRaw Match-V5 and timeline payloads never cross the model boundary.Allowlisted projection + runtime schema
Factual supportEvery cited evidence ID belongs to the selected candidate and its time window.Output validator rejects foreign references
Strategic supportEvery knowledge claim is active and applicable to that candidate.Packet builder + output validator
Spend ceilingA review attempts at most one model call and never retries automatically.Route guards + provider retries: 0
Player-facing timeAdvice uses M:SS or M:SS–M:SS, never raw elapsed seconds.Formatter + prose validation
Portfolio runtimeThe hosted demo performs no Riot calls, model calls, or writes.Bundled report + route artifact checks

Engineering evidence

What is proven—and what is not claimed

The portfolio case is strongest when implemented safeguards and unfinished production work are equally visible.

01Demonstrated

Network-isolated tests

Every unmocked fetch fails in automated tests, so canonical verification cannot spend Riot or model credit.

02Demonstrated

Candidate-owned evidence

Validation rejects facts imported from another candidate or cited outside the candidate time window.

03Demonstrated

Candidate-scoped knowledge

The model can cite only active claims selected for the exact candidate before generation.

04Demonstrated

Positive-selection PDF

The export receives a strict report projection rather than subtracting sensitive fields from application state.

05Demonstrated

Owner-only zero-network replay

The hosted artifact replays the accepted Talon-versus-Zed report without external calls or writes.

06Deferred

Authenticated public review

Durable multi-user storage, arbitrary account review, abuse protection, and production API access are not implemented.

Last verified · 2026-09-0130 test files107 tests4 portfolio artifact checks0 canonical network calls

Decision records

Tradeoffs, not unexplained choices

ADR-0001

Metadata first

Structured match data establishes facts; the model only prioritizes and explains bounded evidence.

Cost
LeagueLoop cannot claim exact wave state, player intent, or mechanical execution.
Revisit when
Approved visual evidence can add a separately validated evidence type.
ADR-0006

Coachability gate

Replay-dependent moments cannot crowd out metadata-supported adjustments.

Cost
Potentially important moments are omitted when the available evidence cannot support useful advice.
Revisit when
Replay evidence is proven safe, bounded, and more useful than the metadata fallback.
ADR-0010

Candidate-scoped knowledge

Each strategic claim is bound to the candidates it may support before generation.

Cost
Patch knowledge needs explicit applicability rules and version maintenance.
Revisit when
A broader knowledge source requires a new, testable applicability model.
ADR-0013

Zero-network public demo

The portfolio surface replays an accepted report without widening the private credential boundary.

Cost
Visitors cannot generate live reviews for arbitrary Riot accounts.
Revisit when
Auth, durable storage, abuse controls, spend limits, and production access are release-ready.

Failure behavior

Cost is a controlled outcome

FailureBehaviorModel callsStatus
No eligible Talon MID matchReturn a specific not-found result0Demonstrated
Patch or matchup knowledge missingBlock that match; never substitute an older one0Demonstrated
Riot timeout or schema driftReturn a typed safe error0Demonstrated
Unsupported model claimReject the complete output1 attemptedDemonstrated
Duplicate request IDReuse the in-process resultNo duplicateDemonstrated

Next release boundary

What must become true before live public review

These are release gates, not implemented capabilities.

  1. 01

    Authenticate

    Bind every generated review to a verified user and an explicit access policy.

  2. 02

    Persist safely

    Store durable review state with ownership, retention, and deletion rules.

  3. 03

    Bound abuse + spend

    Add request quotas, rate limits, idempotency, monitoring, and a hard cost ceiling.

  4. 04

    Approve the external path

    Reverify Riot production access, policy, patch behavior, and operational failure handling.

Selected implementation proof

Small contracts that enforce the story

Candidate ownershiplib/coaching/schema.ts
if (!candidate?.evidenceIds.includes(evidenceId)) {
  throw new Error(
    `Opportunity ${opportunity.candidateId} cited evidence`,
  );
}

if (!candidate?.applicableKnowledgeIds.includes(knowledgeId)) {
  throw new Error(
    `Opportunity ${opportunity.candidateId} cited knowledge`,
  );
}

Condensed validator logic: generated evidence and knowledge references must belong to the selected candidate.

Player-facing timetalon-review-validator-v2
Internal: window_s: [460, 560]
Player:   7:40–9:20

Raw elapsed seconds never enter
advice, titles, or labels.

Numeric seconds remain available for deterministic checks, while the renderer enforces recognizable game time.