Free self-study · No account needed · Progress stays in this browser. Back it up before clearing site data or changing devices.

← Week 24: Final Engineering Capstone

Week 24 / Lesson 1

Defining a bounded capstone

Choose a tractable end-to-end task with measurable requirements and threat boundaries.

Section 1.1 1 of 7

Overview

Focus

Choose a tractable end-to-end task with measurable requirements and threat boundaries.

Your route through the lesson

  • 1.2 Supported tasks, architecture, and tradeoffs
  • 1.3 Security review and forbidden operations
  • 1.4 Baselines, acceptance tests, and project scope
  • 1.5 Put it into practice
  • 1.6 Guided comparison
  • 1.7 A capstone feature without a measurable claim

All required teaching is included here. Review selections are saved. Choose a correct answer for every question to continue; retries are unlimited. Study time and personal notes are optional.

Section 1.2 2 of 7

Supported tasks, architecture, and tradeoffs

Focus

Choose one supported workflow and explain its architecture tradeoffs.

A bounded capstone proves one useful end-to-end behavior under explicit constraints. It does not need to combine every technique in the course. Start with a concrete user, input, permitted evidence, action, and observable result. A suitable narrow workflow is an authorized operator opening a review ticket when a synthetic backup report contains a failure.

The starter separates admission, retrieval, planning, skill validation, tool execution, memory, and durable operation state. A local HTTP interface makes the request boundary real. SQLite stores owner-scoped evidence and tickets. A deterministic planner fixture selects the proposed action so success and failure paths are reproducible. This fixture does not demonstrate language-model quality; replacing it with an approved real route is a distinct integration claim.

Architecture tradeoffs concern what a choice improves and what it costs. An embedded database simplifies local reproduction but does not prove multi-host availability. A single process makes lifecycle control visible but limits load isolation. A real external ticket system would add credentials, transport failure, and effect reconciliation requirements. Keep that expansion outside the core unless its evidence can fit the remaining project budget.

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. A capstone opens synthetic backup-review tickets. What makes scope bounded?
2. An embedded local database simplifies reproduction. What remains unproven?
3. The planner is deterministic fixture code. Which claim must remain separate?

Section 1.3 3 of 7

Security review and forbidden operations

Focus

Turn the threat model into forbidden operations enforced by trusted components.

A security review identifies assets, actors, trust boundaries, plausible misuse, and enforced controls. Assets in the starter include document content, ticket state, operation records, and owner memory. The ordinary request may create a ticket only for the authorized owner and only with permitted evidence. It cannot alter deployment policy, retrieve another owner's material, or invent a missing evidence identifier.

Treat retrieved text and planner output as untrusted proposals. The executor fixes the owner from authentication, retrieves only that owner's records, and validates the proposed tool against a skill allowlist. A skill here is a versioned procedure contract: permitted tool name plus required evidence. It is not an authorization grant by itself.

Define denial before mutation. A rejected identity must leave no operation or ticket row. Repeated operation identifiers must not create repeated effects, and an identifier must not bypass ownership. These are negative requirements: success means a forbidden event did not occur. Verify them through state queries as well as response codes. A polite 403 after a private read or ticket insertion would fail the intended boundary.

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. A forbidden identity gets 403 after a ticket was inserted. Is denial correct?
2. What determines operation ownership in the trusted workflow?
3. A skill allowlist permits create_ticket. Does it grant every caller permission?

Section 1.4 4 of 7

Baselines, acceptance tests, and project scope

Focus

Map each requirement to a frozen acceptance case and a declared baseline.

An acceptance case is a reproducible observation that decides whether a requirement is met. For the starter, success expects an authorized request to create one evidence-backed ticket. Denial expects an unauthorized request to create none. Interruption expects a durable pending intent before an injected failure. Recovery expects replay after restart to complete that same operation exactly once.

Freeze the cases before implementation changes. A cryptographic hash such as SHA-256 identifies the case bytes; it does not prove the cases are good or the system is safe. Keep both the case content and the hash. Record the manifest that produced each run.

A baseline gives the comparison meaning. The supplied baseline is explicitly a declared non-durable fixture: it handles ordinary success and denial but lacks interruption recovery. It is not a measured historical production service. If you want a measured baseline, implement and run that version on the same cases. Separate minimum acceptance from optional stretch work. The remaining budget should prioritize a real critical path and honest evidence gaps over extra features without testable claims.

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. What should a recovery case observe?
2. What does a case-file hash establish?
3. A baseline is a declared fixture rather than an executed prior service. How should it be reported?

Section 1.5 5 of 7

Put it into practice

Focus

Freeze executable requirements and inspect the capstone starter before extending it.

Save week24.py and run python week24.py --lesson 1. It uses only standard Python. The CASES list defines four named requests and expected HTTP statuses: success 200, denial 403, interruption 503, and recovery 200. MANIFEST records code, policy, index, planner, skill, and schema identities.

json.dumps(..., sort_keys=True) creates a stable representation for the declared case dictionary keys, and hashlib.sha256 computes its fingerprint. The script asserts unique case identifiers and prints the requirements and scope. This first command freezes and reports the executable contract; the following lesson actually runs the service path.

For the weekly extension, change one narrow behavior in this same artifact, such as requiring the evidence text to contain a specified failure category before creating a ticket. Add a case for that requirement before changing the executor. Keep the original success, denial, interruption, and recovery cases unchanged. No essay or imagined teacher approval is required: the executable cases, actual assertions, and recorded limits supply the learning evidence. Do not claim that printing a contract alone completes system integration.

Download this week’s Python lab ↓

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. The first capstone command prints cases and a hash. What has it completed?
2. A new requirement restricts tickets to storage failures. What should precede implementation?
3. Case identifiers must be unique. Why?

Section 1.6 6 of 7

Guided comparison

Focus

Explain how a small executable requirement set controls capstone scope.

The worked contract has four cases because each answers a different central question. Success checks useful work, denial checks the boundary, interruption checks durable intent, and recovery checks continued effect identity. Four cases are not broad production coverage, but they are a coherent starting set for the claimed local workflow.

An unbounded alternative promises a universal autonomous support platform and demonstrates only one greeting. Its feature description is larger while its evidence is smaller. Reduce such a claim to a supported task with explicit exclusions and measurable effects. The starter's synthetic data and fixture planner make those exclusions visible instead of pretending external integration occurred.

The hash lets later reports say whether the same cases were used, while the manifest identifies the candidate components. Neither substitutes for actual output and state checks. Keep all three: frozen contract, pinned configuration, and observed results. The capstone extends the accumulated platform by replacing or strengthening one boundary at a time. If a real model route is added, retain deterministic fixtures for regression checks and separately report actual inference outcomes under the same authorization and recovery requirements.

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. A project promises many features but demonstrates one greeting. What should change?
2. Why retain contract, manifest, and results together?
3. A real model replaces the planner fixture. What should remain?

Section 1.7 7 of 7

A capstone feature without a measurable claim

Focus

Convert a vague capstone feature into a measurable engineering claim.

A proposed feature says, "The assistant understands incidents better." That statement does not specify an input, desired behavior, or failure threshold. It cannot be verified by a single attractive demonstration. A narrower claim is: for five frozen synthetic backup reports, create a review ticket only when an authorized report contains the storage-failure marker and attach the permitted document identifier.

Now the claim maps to checks: correct marker classification, identity denial, evidence attachment, exactly one ticket per operation, and recovery after interruption. A comparison can show which cases improve over a baseline and which remain wrong. If the planner is still a fixture, the report states that classification is deterministic rule behavior rather than learned semantic understanding.

This transfer teaches restraint as engineering precision. A measured narrow result is useful because another person can reproduce and challenge it. A broad capability label hides uncertainty. Optional future work can include richer incident categories or actual local-model classification, but each expansion needs new source permissions, reserved cases, resource limits, and integration evidence before the claim grows.

// Quick review

Check your understanding.

Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.

1. Which claim is directly testable?
2. A marker rule drives classification. What should the report call it?
3. Adding richer incident categories expands what requirement?

Your personal notes

Optional, ungraded, and saved only in this browser. Export a backup from the Academy homepage to keep them.

References and further reading
Ask your own AI assistant

Copy this prompt into an assistant you already use. Nothing is sent automatically, and your personal notes are not included.

Next lesson: Integrating and proving the critical path →