KoreaDevKNOWLEDGE SHARING

Content typeLearn

AI SOFTWARE DEVELOPMENT · 10 / 10

AI Native service capstone project

Connect React/Next.js, TypeScript/Python APIs, PostgreSQL/pgvector, Agent·MCP, tests, containers, and observability into a single body of handover evidence.

Difficulty
Capstone
Structure
Lessons 8 · Labs 2 · Assessment

CORE UNIT 1 / 1

AI Native service capstone project

Connect React/Next.js, TypeScript/Python APIs, PostgreSQL/pgvector, Agent·MCP, tests, containers, and observability into a single body of handover evidence.

Difficulty
Capstone
Structure
Lessons 8 · Labs 2 · Assessment

Diagrams and tables: composed by the author using each lesson's official primary sources. Find the originals and review dates at the end of that lesson.

NEW HIRE ONBOARDING

Start in the order you would receive your first assignment

So that even a new hire with no prior IT background can follow along, we start with the situation, the task, the evidence, and when to report, before difficult definitions.

  1. 01

    Read the situation in one sentence

    The demo answer looks good, but there is no source revision, ACL test, tool approval, image digest, or rollback record.

  2. 02

    Today's assignment

    Translate product requirements into acceptance criteria for architecture, privacy, authorization, and evaluation.

  3. 03

    Evidence that shows the work is complete

    Give a new operator only the restricted incident evidence and have them reproduce query recovery and unauthorized-access denial.

  4. 04

    When to stop and ask a senior colleague

    With more metrics to track, distinguish the priority of hard gates from that of optimization metrics.

Unpack unfamiliar terms first

Product contracts and success criteria
The AI Native standard is not whether AI is used, but product contracts that measure and control work outcomes, including uncertain model behavior.
Architecture and threat model
An architecture diagram must show data, identity, trust boundaries, and failure domains, not just list product names.
Data, PostgreSQL, and RAG contracts
Preserving source identity and ACLs through to answer citations lets you verify retrieval quality and security together.

Questions for this course

Why did it change, and what must be verified?

Do not merely memorize a technology's advantages; check the conditions under which they hold and the new failure boundaries they introduce.

OBSERVABLE OUTCOMES

What you can do after this course

  1. Translate product requirements into acceptance criteria for architecture, privacy, authorization, and evaluation.
  2. Connects frontend, API, data, RAG, agent, and MCP boundaries through versioned contracts.
  3. Complete the work from failure injection through recovery, re-verification under identical conditions, and runbook handover.

PREREQUISITE CHECK

Three things to check before reading

This is not a test of memorized answers. Think about each question first, then open the explanation to review the foundational concepts used in this course.

1Is a Capstone a project that uses every technology once?

No. It is an integrated decision-making exercise: choose only the technologies that user problems and operating conditions require, and explain with evidence why each was chosen or excluded.

2What's the difference between demo success and operational readiness?

Operations must verify repeatable builds, permissions, failure recovery, SLOs, audits, backups, and owners and runbooks.

3Can security be added after the code is written?

Data classification, authorization, and approval change API and tool boundaries, so design them at the acceptance and threat-model stages.

TEXTBOOK GUIDE

Main text that covers each concept from its background to the criteria for judging it

We explain the material section by section so readers new to IT can connect causes and effects without memorizing terms.

CONCEPT FLOW

How the chapters connect

The chapters are not isolated short answers to memorize. Follow them from left to right to see how each chapter's concepts support the next decision.

  1. 1.Product contracts and success criteria
  2. 2.Architecture and threat model
  3. 3.Data, PostgreSQL, and RAG contracts
  4. 4.Agent, MCP, and approvable actions
  5. 5.Tests · Deployment · Observability · Handover
  6. 6.Recheck the approved target against the target immediately before execution
  7. 7.Recover partial success between database storage and external notification
  8. 8.Have a new operator recover the same result without the original author
AI Native service capstone project: the overall map. If you lose track while reading the detailed explanations and chapters below, return to this sequence.
Figure 10-1. AI Native service capstone project: concept developmentShows how each chapter’s choices and limits lead to the problems of the next chapter.
  1. 1
    Product contracts and success criteria

    The AI Native standard is not whether AI is used, but product contracts that measure and control work outcomes, including uncertain model behavior.

  2. 2
    Architecture and threat model

    An architecture diagram must show data, identity, trust boundaries, and failure domains, not just list product names.

  3. 3
    Data, PostgreSQL, and RAG contracts

    Preserving source identity and ACLs through to answer citations lets you verify retrieval quality and security together.

  4. 4
    Agent, MCP, and approvable actions

    The Agent decomposes the business goal, but its actual capabilities are constrained by typed tools, server authorization, and user approval.

  5. 5
    Tests · Deployment · Observability · Handover

    Completion is not a screen demo but an evidence pack: the same revision can be rebuilt and recovered after a failure, and the next operator can make decisions from it.

  6. 6
    Recheck the approved target against the target immediately before execution

    Approval applies to a specific target, content and version, not automatically to later changes.

  7. 7
    Recover partial success between database storage and external notification

    Preserve each system’s state and retry conditions rather than collapsing two mutations into one success message.

  8. 8
    Have a new operator recover the same result without the original author

    Judge handover evidence by another person’s ability to reproduce decisions and recovery, not by its volume.

CONTROLLED EXPLANATION

Prevent notice-version mismatches between approval and execution

Current state: Review revision 7

Prevent notice-version mismatches between approval and execution

Source: author-designed from MCP authorization and data-concurrency principles. Business approval rules in this diagram are a teaching application design.

Explicit approvalEdit before executionVersion comparison failsReview new content1Review revision 72Approval for 73Current target: revision 84Hold execution5Review differences and reapprove
  1. Review revision 7

    Show the date, recipients, and content.

  2. Approval for 7

    Record decision-maker and approval scope.

  3. Current target: revision 8

    Another editor changed the date.

  4. Hold execution

    Approved and current versions differ.

  5. Review differences and reapprove

    Recheck current state before external sending.

1 → 2
Explicit approval
2 → 3
Edit before execution
3 → 4
Version comparison fails
4 → 5
Review new content

Arrows show the hypothetical event timeline. Valid login authority does not bypass a version mismatch.

CONCRETE CASES

Selection criteria for all courses

TABLE 10-1

Selection criteria for all courses

Compare the technology in each chapter by how it works, the new costs it adds, and the evidence to check, not by its name.

Table 10-1. AI Native service capstone project: design decision criteria
.Core mechanismCosts to watchEvidence to check
1. Product contracts and success criteriaAcceptance criteria connect user value and technical and safety signals to the same release decision.With more metrics to track, distinguish the priority of hard gates from that of optimization metrics.Review whether each goal has an input fixture, observed results, a threshold, an owner, and a failure response.
2. Architecture and threat modelExplicit trust boundaries and data flows connect controls to actual attack and failure paths.More control adds latency and user friction, so controls must be placed according to risk.Run abuse cases with unauthorized users, malicious documents, and stolen tokens, and verify rejection evidence at each boundary.
3. Data, PostgreSQL, and RAG contractsEvidence identity and revision graphs preserve provenance from the source to the answer.Costs include ingest delay, index builds, storage, and personal-data retention.After a source is modified, deleted, or its permissions change, verify that affected content disappears from the index and citations within the allowed time.
4. Agent, MCP, and approvable actionsHost policy and server authorization validate the model's proposal before it runs as a restricted domain operation.Costs include approval fatigue, partial success, and compatibility across multiple revisions.Inject duplicate requests, approval rejection, timeouts, and unauthorized targets, then verify that state remains safe.
5. Tests · Deployment · Observability · HandoverImmutable revisions, automated gates, and observable rollouts create a chain of custody from source to operational outcomes.Comprehensive gates require execution time and ownership of ongoing maintenance.Verify that a new operator can reproduce the deployment revision, incident isolation, rollback, and evidence of success from the documentation alone.
6. Recheck the approved target against the target immediately before executionComparing approval evidence with current state at execution detects changes between review and action.Frequent edits require more reapproval, so show differences clearly to reduce approval fatigue.Approve notice revision 7, change it to 8 and verify held sending, displayed differences and reapproval evidence.
7. Recover partial success between database storage and external notificationRecording the business change and notification intent together, then reconciling external results, reveals recovery points for partial success.Pending records and retry workers add components but can reduce duplicates and loss from blind retries.Reproduce a lost response after external acceptance and reconcile the single enrollment, notification state and duplicate-prevention evidence.
8. Have a new operator recover the same result without the original authorRecovery without the author’s private knowledge exposes real gaps in documentation, observability, and authority contracts.Independent execution takes time but reveals response gaps before an operator handover.Give a new operator only the restricted incident evidence and have them reproduce query recovery and unauthorized-access denial.

CHAPTER 1 / 8

Product contracts and success criteria

The AI Native standard is not whether AI is used, but product contracts that measure and control work outcomes, including uncertain model behavior.

Why this concept became necessary

Users of an internal knowledge-support service need more than answers: they must be able to check the evidence, the latest revision, and access permissions. Write the goals as task success, citation support, P95 latency, cost per success, and zero privacy incidents.

Define what is Out of scope, the data owner, retention, human escalation, and safe defaults on failure. Turn phrases such as “good answer” into observable criteria using representative cases, rubrics, and deterministic checks.

Figure 10-2. Product contracts and success criteria: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

The AI Native standard is not whether AI is used, but product contracts that measure and control work outcomes, including uncertain model behavior.

How it works

Acceptance criteria connect user value and technical and safety signals to the same release decision.

Verification evidence

Review whether each goal has an input fixture, observed results, a threshold, an owner, and a failure response.

Follow it through a concrete system

If an internal knowledge-support service's goal is merely “accurate answers,” each team may use different completion criteria. Replace this with observable conditions such as task success on a representative question set, support from evidence spans, zero unauthorized source exposures, P95 latency, and cost per successful task. Some are metrics for tracking improvement; others, such as personal-data exposure, must remain zero and are hard gates.

Out of scope and default behavior on failure also belong in the product contract. Decide whether to acknowledge missing evidence and hand off to a person rather than guess, and whether documents beyond the freshness limit may be used. Name the Data owner, model- and prompt-change owners, and incident contact to connect technical choices to user outcomes and operational responsibility.

Selection criteria and failure boundaries

With more metrics to track, distinguish the priority of hard gates from that of optimization metrics.

Misconceptions to avoid: Calling an LLM does not make a product AI Native.

Verify it yourself

Review whether each goal has an input fixture, observed results, a threshold, an owner, and a failure response.

What to judgeAcceptance criteria connect user value and technical and safety signals to the same release decision.

To summarize this chapter

The AI Native standard is not whether AI is used, but product contracts that measure and control work outcomes, including uncertain model behavior.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Meta, 「Your First ComponentReview date 2026-08-28 · Scope Official React learning documentation
  2. Microsoft, 「TypeScript HandbookReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 2 / 8

Architecture and threat model

An architecture diagram must show data, identity, trust boundaries, and failure domains, not just list product names.

Why this concept became necessary

The browser calls the Next.js UI and an authenticated API, and the API coordinates PostgreSQL, retrieval, and the agent host. The MCP server exposes limited tools in front of internal systems, and secrets and administrator credentials never enter the model context.

The threat model analyzes prompt injection, cross-tenant retrieval, tool-parameter tampering, token theft, and duplicate side effects by asset, actor, and boundary. Place least privilege, output encoding, approval, and audit as prevention, detection, and recovery controls.

Figure 10-3. Architecture and threat model: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

An architecture diagram must show data, identity, trust boundaries, and failure domains, not just list product names.

How it works

Explicit trust boundaries and data flows connect controls to actual attack and failure paths.

Verification evidence

Run abuse cases with unauthorized users, malicious documents, and stolen tokens, and verify rejection evidence at each boundary.

Follow it through a concrete system

Architecture diagrams should not just draw product boxes such as React and PostgreSQL; they should show which trust boundaries user identity and documents cross. The token sent from the browser to the API, the source documents that ingest reads from object storage, and the tool inputs and results the agent host sends to the MCP server are each distinct attack surfaces. Secrets must stay within the credential boundaries of the host or server, not in the model context.

The threat model maps scenarios onto the data flow: a malicious document using prompt injection to induce tool calls, vectors from another tenant appearing in search results, and an approval screen that differs from the actual parameters. Least privilege and input validation are preventive controls, tracing and auditing are detective controls, and disabling tools and revoking credentials are recovery controls. Only when each control is linked to an actual abuse test and an owner does the diagram become an operational document.

Selection criteria and failure boundaries

More control adds latency and user friction, so controls must be placed according to risk.

Misconceptions to avoid: It is incorrect to assume that an MCP server is trustworthy merely because it is on the internal network.

Verify it yourself

Run abuse cases with unauthorized users, malicious documents, and stolen tokens, and verify rejection evidence at each boundary.

What to judgeExplicit trust boundaries and data flows connect controls to actual attack and failure paths.

To summarize this chapter

An architecture diagram must show data, identity, trust boundaries, and failure domains, not just list product names.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. OpenTelemetry, 「Context PropagationReview date 2026-08-28 · Scope Latest official documentation
  2. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 3 / 8

Data, PostgreSQL, and RAG contracts

Preserving source identity and ACLs through to answer citations lets you verify retrieval quality and security together.

Why this concept became necessary

Document ingest stores the source ID, revision, owner, ACL, parser version, and hash, and links chunks and embeddings as derived artifacts. A reconciliation job observes the freshness gap between PostgreSQL transaction data and the vector index.

Retrieval records ACL filtering first, candidates, reranking, packed spans, and citations in a stage manifest. Measure recall@k and citation support on a ground-truth set, and enforce zero results from stale or unauthorized sources as a hard gate.

Figure 10-4. Data, PostgreSQL, and RAG contracts: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Preserving source identity and ACLs through to answer citations lets you verify retrieval quality and security together.

How it works

Evidence identity and revision graphs preserve provenance from the source to the answer.

Verification evidence

After a source is modified, deleted, or its permissions change, verify that affected content disappears from the index and citations within the allowed time.

Follow it through a concrete system

When ingesting a source, first store its source ID, revision, owner, ACL, parser, and content hash, then link chunks and embeddings to it as derived artifacts. If documents are treated as identical just because their file names match, there is no way to tell which vectors reflect edits and deletions. A reconciliation job is responsible for finding differences between source and index revisions and converging them within the allowed freshness.

On the query path, generate only candidates the user is permitted to access, and preserve source identity through every rerank and context-packing step. Answer citations must point to the span and revision actually used. Only after injecting permission changes and deletions and confirming that they disappear from the cache, vector candidates, and final answer within the defined time can you say that the data contract protects both search quality and security.

Selection criteria and failure boundaries

Costs include ingest delay, index builds, storage, and personal-data retention.

Misconceptions to avoid: It is incorrect to assume that attaching a citation string to a RAG answer guarantees its grounding.

Verify it yourself

After a source is modified, deleted, or its permissions change, verify that affected content disappears from the index and citations within the allowed time.

What to judgeEvidence identity and revision graphs preserve provenance from the source to the answer.

To summarize this chapter

Preserving source identity and ACLs through to answer citations lets you verify retrieval quality and security together.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. pgvector, 「Exact and Approximate Nearest Neighbor SearchReview date 2026-08-28 · Scope Official repository README
  2. PostgreSQL Global Development Group, 「JSON Functions and OperatorsReview date 2026-08-28 · Scope PostgreSQL 18 / current

CHAPTER 4 / 8

Agent, MCP, and approvable actions

The Agent decomposes the business goal, but its actual capabilities are constrained by typed tools, server authorization, and user approval.

Why this concept became necessary

Separate search as a read-only tool and ticket creation as a state-changing tool, and define the input schema, domain validation, idempotency, and timeout. The Host shows the actual target and changes before execution and records approval results for high-risk operations in an audit trail.

The Agent loop includes step and token budgets, repetition detection, tool-error recovery, and human handoff. Use Multi-agent only where parallelism helps, such as independent research, and serialize shared-state changes through a single owner and transaction.

Figure 10-5. Agent, MCP, and approvable actions: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

The Agent decomposes the business goal, but its actual capabilities are constrained by typed tools, server authorization, and user approval.

How it works

Host policy and server authorization validate the model's proposal before it runs as a restricted domain operation.

Verification evidence

Inject duplicate requests, approval rejection, timeouts, and unauthorized targets, then verify that state remains safe.

Follow it through a concrete system

Separating the search tool from the ticket-creation tool allows different policies for reads and state changes. Besides an input schema, the creation tool must provide domain validation, authorization, an idempotency key, and a preview. Use audit identity to link the target shown by the Host to the target actually acted on by the server, so the approval UI is more than decoration.

An Agent loop needs not only maximum step and token limits but also repeated-operation detection, recovery per tool error, and human handoff. Multiple agents may research in parallel, but changes to the same ticket or database row must be serialized through one owner and a transaction. Prompt instructions help choose actions but cannot replace server authorization and concurrency control.

Selection criteria and failure boundaries

Costs include approval fatigue, partial success, and compatibility across multiple revisions.

Misconceptions to avoid: It is incorrect to assume that writing prohibitions into the prompt lets you skip server authorization.

Verify it yourself

Inject duplicate requests, approval rejection, timeouts, and unauthorized targets, then verify that state remains safe.

What to judgeHost policy and server authorization validate the model's proposal before it runs as a restricted domain operation.

To summarize this chapter

The Agent decomposes the business goal, but its actual capabilities are constrained by typed tools, server authorization, and user approval.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Model Context Protocol, 「ArchitectureReview date 2026-08-28 · Scope MCP 2025-06-18
  2. Model Context Protocol, 「AuthorizationReview date 2026-08-28 · Scope MCP 2025-11-25

CHAPTER 5 / 8

Tests · Deployment · Observability · Handover

Completion is not a screen demo but an evidence pack: the same revision can be rebuilt and recovered after a failure, and the next operator can make decisions from it.

Why this concept became necessary

Tie type, unit, contract, and browser tests, security abuse cases, and offline evals to the release revision. Record the image digest, migration, readiness, canary metrics, and rollback thresholds, and check the hard gate on a portion of traffic.

Operational traces correlate the UI request with retrieval, model, and tool steps and alert on SLOs, costs, and policy violations. After failure injection, follow evidence→isolation→minimal fix→re-verification under identical conditions, then hand over the owner, dashboard, rollback, backup, and known risks in a runbook.

Figure 10-6. Tests · Deployment · Observability · Handover: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Completion is not a screen demo but an evidence pack: the same revision can be rebuilt and recovered after a failure, and the next operator can make decisions from it.

How it works

Immutable revisions, automated gates, and observable rollouts create a chain of custody from source to operational outcomes.

Verification evidence

Verify that a new operator can reproduce the deployment revision, incident isolation, rollback, and evidence of success from the documentation alone.

Follow it through a concrete system

A release evidence pack binds the source commit, dependency lock, test and eval results, image digest, migration revision, and configuration schema into one release identity. In a canary, check not only HTTP 200 but also citation support, authorization violations, tool success, and cost per success. If a hard gate fails, do not increase traffic; fix the cause and rerun the same frozen cases.

Operational handover tests whether a new operator can find a run in the dashboard, disable a tool, and perform rollback and restore without the creator explaining it beside them. The runbook must describe the owner, alert meanings, safe initial diagnosis, credential revocation, data recovery, and known risks. The project can be judged complete only with evidence that both user outcomes and safety conditions recovered after failure injection.

Selection criteria and failure boundaries

Comprehensive gates require execution time and ownership of ongoing maintenance.

Misconceptions to avoid: It is incorrect to assume that operational handover is complete after one production deployment returns HTTP 200.

Verify it yourself

Verify that a new operator can reproduce the deployment revision, incident isolation, rollback, and evidence of success from the documentation alone.

What to judgeImmutable revisions, automated gates, and observable rollouts create a chain of custody from source to operational outcomes.

To summarize this chapter

Completion is not a screen demo but an evidence pack: the same revision can be rebuilt and recovered after a failure, and the next operator can make decisions from it.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Docker, 「Understanding Image LayersReview date 2026-08-28 · Scope Latest official documentation
  2. Kubernetes, 「DeploymentsReview date 2026-08-28 · Scope Kubernetes official documentation
  3. OpenTelemetry, 「SignalsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 6 / 8

Recheck the approved target against the target immediately before execution

Approval applies to a specific target, content and version, not automatically to later changes.

Why this concept became necessary

Adding an approval button does not complete the approval contract in a capstone project. Target data can change while a person reads the screen. At execution, the system must be able to compare what was approved with the current state.

Bind approval to the actual target, proposed change and base revision. Approval loses meaning if the displayed summary differs from server parameters. Base the approval view on server-validated changes rather than solely on model descriptions.

Recheck current authorization and target revision immediately before execution. If another user has edited the target, do not apply the old approval blindly. Require a new decision with the differences shown, or safely hold the operation according to product requirements.

Authentication and business approval are separate layers. Access conforming to MCP authorization still requires a separate decision about whether the user approved sending specific content. A protocol token is not permission for every business mutation.

Figure 10-7. Recheck the approved target against the target immediately before execution: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Approval applies to a specific target, content and version, not automatically to later changes.

How it works

Comparing approval evidence with current state at execution detects changes between review and action.

Verification evidence

Approve notice revision 7, change it to 8 and verify held sending, displayed differences and reapproval evidence.

Follow it through a concrete system

Assume that, in a teaching leave-notice service, an operator approved notice draft revision 7. Before sending, another operator changes the date, creating revision 8. The system must detect the mismatch between approved revision 7 and current revision 8 and hold sending. Dismissing a date-only edit as trivial delivers a schedule the user never approved.

Show the changed date and recipient scope again. Record reapproval as a decision on new content, linked to the old approval without overwriting it. If an incorrect notice is sent later, investigators must reconstruct exactly what was approved. Link approver identity and decision time to detect improper reuse of old approval after edits.

Storing approval as a single Boolean is a counterexample. If it remains true after edits, another request can reuse an old decision. Approval without a target and revision cannot establish which change was approved. Storing the approved content identity and scope, rather than one Boolean, is central to preventing this failure.

Inject content changes, recipient changes and authorization revocation after approval. Verify that each mismatch is blocked before external sending. Unchanged valid approvals must still execute; a system that only holds work is not complete. Include external-send counts to reject implementations that display a hold while sending in the background.

Selection criteria and failure boundaries

Frequent edits require more reapproval, so show differences clearly to reduce approval fatigue.

Misconceptions to avoid: One approval does not authorize later edits; verify that the approved target is unchanged.

Verify it yourself

Approve notice revision 7, change it to 8 and verify held sending, displayed differences and reapproval evidence.

What to judgeComparing approval evidence with current state at execution detects changes between review and action.

To summarize this chapter

Approval applies to a specific target, content and version, not automatically to later changes.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Model Context Protocol, 「AuthorizationReview date 2026-08-28 · Scope MCP 2025-11-25
  2. PostgreSQL Global Development Group, 「Concurrency Control: IntroductionReview date 2026-08-28 · Scope PostgreSQL 18 / current
  3. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 7 / 8

Recover partial success between database storage and external notification

Preserve each system’s state and retry conditions rather than collapsing two mutations into one success message.

Why this concept became necessary

Integrated services often store data and then send an external notification. If storage succeeds but the notification response is lost, calling the whole operation a failure does not recover it. Distinguish completed effects from effects whose status remains unknown.

Changes within a database can be grouped in a transaction, but external service actions are not automatically included. Saving a business row with a pending-notification record can preserve the intent to notify. Consider a separate worker that processes pending records and stores outcomes.

This approach does not automatically eliminate duplicates. The worker may stop after external processing completes but before recording acknowledgment. Decide whether redelivery is safe by combining a stable operation identifier, external-status lookup, and a duplicate-handling policy.

Blindly resending when the outcome is unknown is risky. If the external system does not support duplicate prevention, you may need to look up the status first or hand confirmation to a person. A retryable failure and an unconfirmed outcome are different states, so tell users about them differently.

Figure 10-8. Recover partial success between database storage and external notification: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Preserve each system’s state and retry conditions rather than collapsing two mutations into one success message.

How it works

Recording the business change and notification intent together, then reconciling external results, reveals recovery points for partial success.

Verification evidence

Reproduce a lost response after external acceptance and reconcile the single enrollment, notification state and duplicate-prevention evidence.

Follow it through a concrete system

A teaching enrollment service saves an enrollment and then sends a notice. Assume the messaging service accepted it but its response was lost. Canceling the enrollment and starting over can create duplicates or inconsistency with a notice already delivered. Preserve the existing enrollment identifier so follow-up queries track the original event rather than a new enrollment.

Leave the notification status linked to the enrollment identifier as unconfirmed, and look it up using the external receipt identifier. If acceptance is confirmed, complete the record without sending another message. If there is no basis for a lookup, show the resend risk to an operator and stop blanket retries. Record when the unconfirmed state began and who checks next so partial successes are not left unresolved indefinitely.

Code that assumes an HTTP error proves no external action occurred is a counterexample. A connection failure may mean the result was not received. Store transport outcomes separately from business outcomes to keep this uncertainty visible. Record fault-injection timing because recovery differs before and after external acceptance even with the same error code.

Inject failures before storage, after storage, and after external acceptance. A failure before storage must leave neither an enrollment nor a pending-notification record. After storage, preserve one valid enrollment and its pending-notification record; after external acceptance, leave the notification either confirmed or explicitly unconfirmed. Reconcile both systems to find missing pending records and duplicate outcomes. Verifying that reprocessing keeps the original operation identifier catches recovery that creates a new business operation.

Selection criteria and failure boundaries

Pending records and retry workers add components but can reduce duplicates and loss from blind retries.

Misconceptions to avoid: It is incorrect to assume that a network error means no external change occurred. The outcome may be unconfirmed.

Verify it yourself

Reproduce a lost response after external acceptance and reconcile the single enrollment, notification state and duplicate-prevention evidence.

What to judgeRecording the business change and notification intent together, then reconciling external results, reveals recovery points for partial success.

To summarize this chapter

Preserve each system’s state and retry conditions rather than collapsing two mutations into one success message.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. PostgreSQL Global Development Group, 「TransactionsReview date 2026-09-14 · Scope PostgreSQL 18 / current
  2. PostgreSQL Global Development Group, 「ConstraintsReview date 2026-08-28 · Scope PostgreSQL 18 / current
  3. PostgreSQL Global Development Group, 「Concurrency Control: IntroductionReview date 2026-08-28 · Scope PostgreSQL 18 / current
  4. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 8 / 8

Have a new operator recover the same result without the original author

Judge handover evidence by another person’s ability to reproduce decisions and recovery, not by its volume.

Why this concept became necessary

A demonstration guided by the developer can hide documentation gaps. The final capstone check is whether a new operator can determine current state and next actions from the evidence alone. Record what they read and where they get stuck.

Organize handover evidence around questions rather than inventories. It should answer which version is running, which input failed, and how far changes went. Recovery commands must state their targets together with success and stop conditions.

Separate completion evidence from known limits. Success in one environment does not certify an untested environment. Missing configuration or pseudonymous fixtures prevents reproduction and should remain a handover blocker.

This drill is not an exercise in sharing production credentials. Validate observation and recovery in a restricted test environment. Keep real operational authority and responsibility behind a separate approval boundary so the exercise does not alter external state.

Figure 10-9. Have a new operator recover the same result without the original author: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Judge handover evidence by another person’s ability to reproduce decisions and recovery, not by its volume.

How it works

Recovery without the author’s private knowledge exposes real gaps in documentation, observability, and authority contracts.

Verification evidence

Give a new operator only the restricted incident evidence and have them reproduce query recovery and unauthorized-access denial.

Follow it through a concrete system

Give a new operator a teaching incident in which some documents cannot be found. Set the cause as a stale route during an index-generation switch. Provide the known-good generation, current generation and failed query without revealing the diagnosis first. Fixed incident conditions make another operator’s results comparable after documentation changes.

The operator compares request records with search targets, identifies the wrong route and restores the previously verified route in the restricted environment. Check both the query’s evidence document and a denied-access case. A recovered answer alone does not prove preserved authorization. Check that current data was not lost during recovery rather than judging success solely from a quick normal response.

A handover that only progresses when the developer supplies a remembered file path is incomplete. Document the location and why it matters, then have another operator start afresh. Success by someone remembering the prior walkthrough does not establish reproducibility. Classifying each blockage as missing evidence or an incorrect step improves usability rather than merely document length.

The final submission includes the cause hypothesis, rejected hypotheses, before/after recovery evidence, and remaining limits. The receiving operator must explain which failure each action addressed. If that connection is unclear, precisely fill in the necessary observations and procedures rather than simply adding more material. Record the owner and recheck conditions for each remaining limit so unverified parts are not mistaken for completed work after handover.

Selection criteria and failure boundaries

Independent execution takes time but reveals response gaps before an operator handover.

Misconceptions to avoid: Long documentation and a successful demo do not complete handover; a new operator must reproduce the result independently.

Verify it yourself

Give a new operator only the restricted incident evidence and have them reproduce query recovery and unauthorized-access denial.

What to judgeRecovery without the author’s private knowledge exposes real gaps in documentation, observability, and authority contracts.

To summarize this chapter

Judge handover evidence by another person’s ability to reproduce decisions and recovery, not by its volume.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation
  2. OpenTelemetry, 「SignalsReview date 2026-08-28 · Scope Latest official documentation
  3. pgvector, 「Exact and Approximate Nearest Neighbor SearchReview date 2026-08-28 · Scope Official repository README

INTERACTIVE LAB 1 / 2

Lab 1 · AI Native service release evidence pack completed

The demo answer looks good, but there is no source revision, ACL test, tool approval, image digest, or rollback record.

Choose the decision required before taking over operations.

Choose an answer

Correct answer A

A. Hold the deployment and complete acceptance criteria, the threat model, RAG provenance, authorization abuse tests, eval, digest, canary, rollback, and runbook as evidence for the same revision.A decision that accounts for conditions, working principles, and failure boundaries together.

B. Substitute a good demo video for evidence.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

C. Add more of the latest technology names to the architecture.It treats the responsibilities of different layers as one and misses the actual verification points.

D. Deploy to production first when there are few users.It relies on technology names or trends, with no observable evidence from the current requirements.

INTERACTIVE LAB 2 / 2

Lab 2 · Decide whether old approval applies to an edited notice

In a simulated notice service, an operator approved revision 7 with its date and recipients shown. Immediately before execution, the data is revision 8 with a different date. Login permission is still valid.

Distinguish authentication, approval, and target version, then choose the action at the sending boundary.

Choose an answer

Correct answer B

A. Send current revision 8 because login permission is still valid.Access authority is not business approval of edited content; this can send a date the user never reviewed.

B. Hold sending, show the difference between 7 and 8, obtain approval for the new content and recheck current state.This resolves the target mismatch and uses a final recheck to handle changes that occur after reapproval.

C. Change only the approval record’s revision to 8 and send.This falsely records approval of unreviewed content, corrupting both audit evidence and the user’s decision.

D. Silently force the target back to revision 7 and send.This overwrites another editor’s valid work and introduces a separate restoration without checking its authority or approval.

KEY TERMS

Key terms in this unit

Product contracts and success criteria
Acceptance criteria connect user value and technical and safety signals to the same release decision.
Architecture and threat model
Explicit trust boundaries and data flows connect controls to actual attack and failure paths.
Data, PostgreSQL, and RAG contracts
Evidence identity and revision graphs preserve provenance from the source to the answer.
Agent, MCP, and approvable actions
Host policy and server authorization validate the model's proposal before it runs as a restricted domain operation.
Tests · Deployment · Observability · Handover
Immutable revisions, automated gates, and observable rollouts create a chain of custody from source to operational outcomes.
Recheck the approved target against the target immediately before execution
Comparing approval evidence with current state at execution detects changes between review and action.
Recover partial success between database storage and external notification
Recording the business change and notification intent together, then reconciling external results, reveals recovery points for partial success.
Have a new operator recover the same result without the original author
Recovery without the author’s private knowledge exposes real gaps in documentation, observability, and authority contracts.

UNIT WORKBOOK

Exercises and worksheets for applying concepts to new situations

Start by checking basic principles, then expand to practical workplace decisions. After submitting an answer, you can see why every option is correct or incorrect, not just the correct answer.

THREE-LEVEL ASSESSMENT

From basic principles to operational decisions

After you submit an answer, you can see not only the correct answer but also why each option is right or wrong.

Basic Question 1

What are the completion criteria for AI Native products?

Choose an answer

Correct answer B

A. The screen was opened once.It relies on technology names or trends, with no observable evidence from the current requirements.

B. A state in which user outcomes and safety, cost, and operational conditions are met through observable acceptance criteria.A decision that accounts for conditions, working principles, and failure boundaries together.

C. The LLM API call has succeeded.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

D. Every latest framework is already in use.It treats the responsibilities of different layers as one and misses the actual verification points.

Apply Question 2

What should you check after RAG permissions change?

Choose an answer

Correct answer C

A. Only the response length.It treats the responsibilities of different layers as one and misses the actual verification points.

B. Only the UI colors.It relies on technology names or trends, with no observable evidence from the current requirements.

C. Whether an ACL change on the source propagates to candidates and citations within the allowed time, with zero unauthorized results.A decision that accounts for conditions, working principles, and failure boundaries together.

D. Only the embedding dimension.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

Capstone Question 3

What evidence is needed for an independent operational handover?

Choose an answer

Correct answer D

A. The developer’s memory.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

B. A single HTTP 200 health-check response.It treats the responsibilities of different layers as one and misses the actual verification points.

C. The number of source files.It relies on technology names or trends, with no observable evidence from the current requirements.

D. Build, test, eval, deployment, observability, and recovery results for the same revision, plus its owner and runbook.A decision that accounts for conditions, working principles, and failure boundaries together.

PRIMARY SOURCES

Course references

This list collects the sources for each chapter. The text and author-created diagrams were prepared by directly reviewing the originals below.

MetaYour First ComponentReview date 2026-08-28 · Official React learning documentationVercelServer and Client ComponentsReview date 2026-08-28 · Next.js App RouterMicrosoftTypeScript HandbookReview date 2026-08-28 · Latest official documentationpgvectorExact and Approximate Nearest Neighbor SearchReview date 2026-08-28 · Official repository READMEModel Context ProtocolArchitectureReview date 2026-08-28 · MCP 2025-06-18Model Context ProtocolAuthorizationReview date 2026-08-28 · MCP 2025-11-25MicrosoftPlaywright Best PracticesReview date 2026-08-28 · Latest official documentationDockerUnderstanding Image LayersReview date 2026-08-28 · Latest official documentationKubernetesLiveness, Readiness and Startup ProbesReview date 2026-08-28 · Kubernetes official documentationOpenTelemetrySignalsReview date 2026-08-28 · Latest official documentationAnthropicDemystifying Evals for AI AgentsReview date 2026-08-28 · Latest official documentationOpenTelemetryContext PropagationReview date 2026-08-28 · Latest official documentationPostgreSQL Global Development GroupJSON Functions and OperatorsReview date 2026-08-28 · PostgreSQL 18 / currentKubernetesDeploymentsReview date 2026-08-28 · Kubernetes official documentationPostgreSQL Global Development GroupConcurrency Control: IntroductionReview date 2026-08-28 · PostgreSQL 18 / currentPostgreSQL Global Development GroupTransactionsReview date 2026-09-14 · PostgreSQL 18 / currentPostgreSQL Global Development GroupConstraintsReview date 2026-08-28 · PostgreSQL 18 / current

PERSONAL WORKSHEET

A learning worksheet you adapt to your own environment

Your input remains only on the current browser screen and is not stored or transmitted externally. Use categories and pseudonyms instead of actual sensitive information.

OFFICIAL SOURCES

Verify against official sources

Technical, compatibility, and model information reviewed: August 2026

PostgreSQL Global Development GroupTransactions2026-09-14 Review ↗MicrosoftTypeScript Handbook2026-08-28 Review ↗MetaYour First Component2026-08-28 Review ↗AnthropicDemystifying Evals for AI Agents2026-08-28 Review ↗Model Context ProtocolArchitecture2026-08-28 Review ↗Model Context ProtocolAuthorization2026-08-28 Review ↗PostgreSQL Global Development GroupConstraints2026-08-28 Review ↗PostgreSQL Global Development GroupConcurrency Control: Introduction2026-08-28 Review ↗PostgreSQL Global Development GroupJSON Functions and Operators2026-08-28 Review ↗pgvectorExact and Approximate Nearest Neighbor Search2026-08-28 Review ↗DockerUnderstanding Image Layers2026-08-28 Review ↗KubernetesDeployments2026-08-28 Review ↗OpenTelemetrySignals2026-08-28 Review ↗OpenTelemetryContext Propagation2026-08-28 Review ↗

LEARNING RECORD

Have you reviewed the text, decision activities, and all explanations?

Completion status is stored only in this browser.