Complete the capstone / Lesson 24 of 24

Diagnose HarborDesk

Use exact synthetic failure packets to isolate omitted state, bad answer spaces, unsafe thresholds, and alias movement.

After this moduleYou can write a replayable diagnosis and explain it accurately to product and engineering audiences.

Use one failure-packet format

Lesson 22 assembled HarborDesk's complete decision contract. Diagnosis now starts from a wrong visible result and walks backward through execution, policy, judgment, question, and state. failure packet: a replayable record that contains the exact evidence needed to locate the smallest failing boundary and distinguish competing explanations prevents a plausible story from replacing a test. Every packet below is synthetic, not a live Jev response.

Each packet records exact state, exact questions, requested and returned model, answer distribution, policy, symptom, boundary, alternatives, controlled test, mitigation, and design fix. In production, also retain the provider request ID, safe state hash, question and policy versions, usage, latency, and conditional-write result.

type FailurePacket = {
  exactState: unknown;
  exactQuestions: unknown;
  requestedModel: string;
  returnedModel?: string;
  answers: unknown;
  policyVersion: string;
  visibleSymptom: string;
  smallestBoundary:
    "state" | "question" | "judgment" | "policy" | "service" | "execution";
  competingExplanations: string[];
  controlledTest: string;
  mitigation: string;
  designFix: string;
};

Packets 1, 3, and 4 use the exact, unmodified question artifact harbor-desk-question-pack.json, version harbor-desk-routing-v2, file SHA-256 a12771256e265e679c50546024c25a919c0b6372a029650d7726e14e64bb533f. Its complete semantic content is frozen here so a reader does not have to infer criteria from a name:

{
  "queue": {
    "type": "choice",
    "instructions": "Choose the one HarborDesk queue that directly owns `ticket.latestMessage`. Choose review when required facts are missing, evidence conflicts, or more than one team must act.",
    "criteria": {
      "billing": "Invoices, charges, payment failures, or refund requests",
      "technical": "A product malfunction or service availability problem",
      "account": "Sign-in, identity, membership, or account security",
      "sales": "A new purchase, plan comparison, or commercial evaluation",
      "other": "A supported request that belongs to none of the specialist queues",
      "review": "Missing or conflicting facts, multiple owners, or unclear intent"
    }
  },
  "refundIntent": {
    "type": "boolean",
    "instructions": "Does `ticket.latestMessage` ask HarborDesk to return money? A quoted request or account fact alone is not the customer's current request.",
    "criteria": {
      "true": "The customer currently requests reversal or return of a charge",
      "false": "The customer does not currently request money returned"
    }
  },
  "currentServiceImpact": {
    "type": "boolean",
    "instructions": "Does `ticket.latestMessage` report that the customer currently cannot use an important HarborDesk capability?",
    "criteria": {
      "true": "An important capability is unavailable or unusable now",
      "false": "Impact is resolved, hypothetical, minor, or not stated"
    }
  },
  "needsClarification": {
    "type": "boolean",
    "instructions": "Are facts required to select one owning queue absent or mutually conflicting in `ticket` and `facts`?",
    "criteria": {
      "true": "A required fact is absent or evidence points to incompatible owners",
      "false": "The available evidence supports one owning queue"
    }
  },
  "frustration": {
    "type": "score",
    "instructions": "Rate the frustration expressed in `ticket.latestMessage` using only the customer's wording.",
    "criteria": [
      "Neutral request or factual report",
      "Explicit dissatisfaction or impatience",
      "Strong anger or repeated urgent demands",
      "Hostile wording or a threat directed at support staff"
    ]
  }
}
Trace this example from input to result
01

Customer choice

A HarborDesk operator investigates a wrong queue assignment.

02

Request or event

The operator opens the immutable synthetic decision record rather than rerunning the current alias.

03

Backend behavior

The record joins state, questions, model metadata, distributions, policy, write, and later outcome.

04

Customer sees

The customer-impacting route is corrected while the system enters review mode if needed.

05

Diagnostic reasoning

Classify the failure as state, question, model judgment, policy, service, or execution before changing a threshold.

Packets one and two: state and answer space

Packet 1: omitted state

Synthetic fixture. Exact state: {"ticket":{"subject":"Cannot sign in","latestMessage":"Reset links loop back to the login page","language":"en","productArea":"identity"},"facts":{"ageHours":2,"accountVerified":true,"incidentLookupComplete":true},"policy":{"allowedAutomaticAction":"route_only"}}. The state omits the known openIncidentMatch: true value even though it claims lookup completed.

Exact questions: the frozen Gateway harbor-desk-routing-v2 artifact above, verified by the stated SHA-256 and used without modification.

Model requested and returned: requested typesafe-ai/jev; returned metadata records typesafe-ai/jev. The underlying native version is unknown through this fixture.

Answers/distribution: synthetic queue probabilities {technical: 0.55, account: 0.31, billing: 0.03, sales: 0.01, other: 0.06, review: 0.04}; refund intent 0.01; current service impact 0.74; needs clarification 0.18; frustration Score probabilities {0: 0.48, 1: 0.40, 2: 0.11, 3: 0.01} with expected score 0.65. Gateway metadata records queue confidence 0.49.

Policy: auto-route when confidence is at least 0.45 and winner is not other/review; this old synthetic policy lacks required-state validation.

Visible symptom: a security-linked login incident enters the technical queue without urgent review.

Smallest failure boundary: state construction omitted a relevant retrieved fact before inference. Competing explanations: the impact criterion is too narrow; the model misread the message; the incident record arrived after inference. Controlled test: replay the frozen question pack twice, changing only facts.openIncidentMatch from absent to true, and separately verify the record timestamp preceded the event. Immediate mitigation: disable automatic routing for login tickets when incident lookup is unavailable. Design fix: make lookup status and result explicit, require them in policy, and route missing lookup state to review.

Packet 2: overlapping and missing Choice options

Synthetic fixture. Exact state: {"ticket":{"subject":"Partner invoice API","latestMessage":"Our reseller invoice endpoint returns 403; finance cannot close the month"}}.

Exact question: {"queue":{"type":"choice","instructions":"Which queue directly owns ticket.latestMessage?","criteria":{"billing":"Invoices, charges, refund requests, or failures of billing APIs","technical":"Any product or API error","sales":"Purchases, pricing, or commercial questions"}}}. There is no other or review, and the billing API case overlaps technical.

Model requested and returned: requested Gateway typesafe-ai/jev; returned metadata records typesafe-ai/jev.

Answers/distribution: synthetic {billing: 0.46, technical: 0.44, sales: 0.10}, confidence 0.08.

Policy: choose the top label regardless of confidence. Visible symptom: the ticket bounces between billing and technical. Smallest failure boundary: question design has overlapping criteria and an incomplete answer space, followed by policy that forces a winner. Competing explanations: noisy model behavior; ambiguous customer wording; incorrect queue taxonomy. Controlled test: keep state fixed and compare the original question with mutually exclusive ownership criteria plus joint_triage, other, and review; repeat across similar labeled fixtures. Immediate mitigation: require review for low concentration and cross-domain terms. Design fix: define queues by ownership action, include no-fit/conflict outcomes, and measure confusion on cross-domain cases.

Customer seesApplication doesJev returns
A corrected route with a review noteRebuilds missing state or fixes the answer space, then reapplies policyA new distribution that remains evidence, not permission
No automatic high-risk actionKeeps refunds and authentication changes behind deterministic checksOnly bounded semantic judgments
Applied diagnosis

The rerun looks healthy

current alias replay differs from stored incident answer

Do not close the incident because a current rerun succeeds. Compare the stored requested and returned model, exact state, exact question order, and policy. A moved alias or changed retrieval result makes the rerun a new experiment, not a reproduction.

Packets three and four: policy and version

Packet 3: bad threshold

Synthetic fixture. Exact state: {"ticket":{"subject":"Pricing question","latestMessage":"We want more seats next quarter, but first we need our disputed invoice corrected. Who can handle both?"},"facts":{"accountVerified":true,"ageHours":0.2}}.

Exact questions: the frozen harbor-desk-routing-v2 artifact above, verified by the stated SHA-256 and used without modification.

Model requested and returned: requested Gateway typesafe-ai/jev; returned metadata records typesafe-ai/jev.

Answers/distribution: synthetic queue {sales: 0.42, billing: 0.36, other: 0.10, review: 0.06, technical: 0.04, account: 0.02}; refund intent 0.01; current service impact 0.03; needs clarification 0.58; frustration probabilities {0: 0.88, 1: 0.10, 2: 0.02, 3: 0.00} with expected score 0.14. Gateway metadata records queue confidence 0.21.

Policy: auto-route any top option above 0.40; no margin or confidence rule. Visible symptom: a commercial billing-adjacent ticket enters sales even though reviewers consistently choose joint review. Smallest failure boundary: policy threshold converts a weak relative winner into automation. Competing explanations: criteria overlap; reviewers use unavailable policy; the model is miscalibrated on commercial tickets. Controlled test: hold answers fixed and replay candidate policies over the held-out commercial slice, comparing top-probability-only against margin, confidence, and review outcomes. This requires no new inference. Immediate mitigation: increase review coverage for commercial/billing overlap based on capacity. Design fix: choose thresholds from labeled action costs and add a minimum winner-runner-up margin; monitor review load and subgroup errors.

The synthetic labeled replay makes the false-positive cost visible. With the old 0.40 gate, 72 of 100 cases were automatically routed and 24 of those routes were wrong. With a candidate 0.82 gate, 38 were automatically routed and three were wrong; the remaining 62 entered review. These invented counts illustrate policy measurement, not Jev performance or a recommended cutoff. The candidate creates 34 additional reviews, so the team must check staffing and time-to-resolution before accepting it. Preserve all 100 labels and frozen distributions: reporting only the lower automatic error rate would hide the lost coverage.

Packet 4: alias movement

Synthetic fixture. Exact state: {"ticket":{"subject":"Workspace locked","latestMessage":"All agents lost access after SSO settings changed"},"facts":{"accountVerified":true,"openIncidentMatch":false}}.

Exact questions: native artifact harbor-desk-question-pack-native.json, version harbor-desk-routing-native-v2, file SHA-256 ed83e0e693153faee65eea40ee95b78e3a3bcaa8bc0c30c76c343bef6d640a90, used without modification. It has the complete question content frozen above and mechanically maps the three Gateway boolean types to native noul; every instruction, criterion, option order, and Score rung is identical.

Model requested and returned: incident requested jev-latest, returned jev-1.13.0; later replay requested the same alias, returned jev-1.14.0 in this entirely synthetic future example.

Answers/distribution: incident synthetic queue {account: 0.71, technical: 0.18, review: 0.06, other: 0.03, billing: 0.01, sales: 0.01}, refund intent 0.00, current service impact 0.91, needs clarification 0.08, frustration {0: 0.22, 1: 0.49, 2: 0.27, 3: 0.02}, queue confidence 0.64; replay synthetic queue {technical: 0.48, account: 0.44, review: 0.05, other: 0.02, billing: 0.01, sales: 0.00}, refund intent 0.00, current service impact 0.88, needs clarification 0.19, frustration {0: 0.24, 1: 0.50, 2: 0.24, 3: 0.02}, queue confidence 0.12.

Policy: auto-route when confidence is at least 0.60; otherwise review. Visible symptom: the historical event auto-routed to account, while the same saved fixture now enters review. Smallest failure boundary: reproducibility failed because the alias resolved to a different model. This does not itself prove regression. Competing explanations: question serialization changed; option order changed; hidden state differed; the later model changed behavior. Controlled test: run the frozen corpus against both explicit versioned IDs with identical serialized requests and policy, then compare distributions and action deltas. Immediate mitigation: keep the measured production pin and stop alias-based incident replay. Design fix: log returned model, pin critical flows, replay and canary candidates, and retain rollback.

Dig deeperA mitigation is not the design fix

Sending everything to review limits harm but may exceed capacity. Raising a threshold may hide an incomplete answer space. Pinning controls model selection and improves attribution, but does not guarantee identical answers or fix missing state. Record containment separately from correction: containment controls current exposure; the design fix removes or detects the faulty boundary; the evaluation proves the fix on representative and adversarial fixtures.

Write the answer key for two audiences

Worked product explanation: "HarborDesk routed some tickets incorrectly for four different reasons: one decision lacked a current incident fact, one queue question could not represent a cross-team request, one automation threshold accepted an uncertain result, and one replay used a newer model behind an alias. We corrected affected queues, moved ambiguous cases to review, and changed the system to require complete state, explicit review options, evaluated thresholds, and pinned model versions. Refund and account actions were never automated."

Worked engineering report: "Synthetic packets HD-STATE-01, HD-SPACE-02, HD-POLICY-03, and HD-ALIAS-04 isolate state construction, question design, policy composition, and reproducibility boundaries. The tests vary one factor while preserving serialized questions and fixtures. Containment disables automation for missing lookups and ambiguous commercial/account cases. Permanent changes add retrieval-status invariants, mutually exclusive ownership criteria with review/no-match, held-out threshold selection with margin, returned-model logging, explicit pins, replay, canary, and rollback. Validation must include all four packets plus unaffected queue slices, service-failure fallbacks, stale-write checks, and review-capacity measures."

That engineering report does not claim a general model defect. It ties each conclusion to the smallest supported boundary. If the controlled test fails to distinguish explanations, retain both and gather the missing evidence.

Saved locally

Author a fifth failure packet

Your answers stay in this browser. Write enough that another engineer could continue the investigation.

Knowledge check

Check your understanding

Produce a complete failure packet and two explanations: a plain product account of customer impact and an engineering report that preserves exact evidence, competing hypotheses, controlled tests, mitigation, and design correction.

Module quiz

0/4 answered

01A relevant incident flag was absent from state. What is the smallest failure boundary?
02A weak Choice winner is auto-routed by a top-probability-only rule. What should be tested first?
03Why is a current alias replay not a reproduction?
04How do mitigation and design fix differ?
Sources and verification notes 5
Jev 1.13 limitationspublic-contract

Literal interpretation, arithmetic, dates, representations, indirection, irrelevant and adversarial text, criteria and calibration limitations. Reviewed model page dated September 17.

Models, limits and pricingpublic-contract

Native jev-latest and jev-preview documented as jev-1.13.0; 64k total and 32k state plus longest question; 250k tokens/second and 1,200 requests/minute; $0.042/million input tokens. Recheck before rollout.

Probability and confidencepublic-contract

Distribution concentration is distinct from empirical correctness. The exact native confidence formula is not published.

Building with System Onepublic-contract

State, independent judgments and code-owned composition, thresholds and actions.

Research reconciliationinferred

Original cross-source analysis records contradictions and unresolved backend, confidence, retention and empirical-performance questions.

Further learning

Optional references

These resources provide public documentation and examples for readers who want them.

DocsJev 1.13 model jaggedness
← Build HarborDesk