DVPPython Studio
Module 12: Ship work you can defend / Build 2 of 4

Connect the actual local workflow

Compose acquisition, persisted finding review and read-back export without hardcoded IDs, hidden fallback or overstated evidence.

Runs on your computer · 100–150 minutes · no paid services

Download practice filesFiles, commands & notes

Without JavaScript, use the step links and keep your files on your computer.

One useful idea

Composition connects already-defined boundaries without erasing their contracts. Use the separately installed Module 10 Python and expose the extracted Module 11 folder explicitly through PYTHONPATH. Do not install Module 11 over Module 10: both kits have practice.py. The capstone launcher selects your completed Module 10 file by its explicit absolute path and your Module 11 observer by --operation-target practice; it never repairs a database or substitutes a completed implementation when yours fails.

The reference CLI first acquires the explicit owned media into a NEW quarantine folder using the reviewed Module 11 inspector. Accepted means retained with observed container kind/duration, not published. The API receives separately supplied dimensions and frames. The demonstration’s finding is invented. Keep metadata_basis and judgment_basis in the export so a recipient cannot mistake those fields for measured pixels or verified judgment.

The seven HTTP calls create an evaluation, create a draft, submit it, approve with the distinct fixture reviewer, then read the current evaluation, finding and audit. Build routes from returned validated IDs. Supply the revision just returned, not a constant copied from an example. Compare persisted reads to the writes before reporting success. The creation snapshot remains unreviewed even when the current finding is approved at revision 3.

capstone.request is disclosed standard-library transport: literal loopback, declared routes, public fixture actors, no redirects/proxy, bounded JSON and five-second per-I/O timeout. It is not a hard whole-workflow deadline. Your integration belongs in capstone_practice.py. The CLI supplies exclusive output and read-back assistance. A later HTTP/file error can leave earlier server writes or partial NEW files; preserve them, diagnose and choose a new owned run instead of claiming rollback.

Refresh first: Your measurable contract, Actual dependency probes, Persisted records and audit.

Trace a finished example

import json
import os
import subprocess
import sys
from pathlib import Path
from tempfile import TemporaryDirectory
import operation_tools

# Use Module 10 Python, explicit Module 11 PYTHONPATH and an already-owned server.
module11 = Path(operation_tools.__file__).resolve().parent.parent
port = os.environ.get("DVP_CLASSROOM_PORT", "8765")
with TemporaryDirectory(prefix="owned-capstone-example-") as temporary:
    output = Path(temporary) / "new-reference-run"
    command = [sys.executable, "-X", "utf8", "-B", "capstone.py",
               "--port", port, "--asset", "Gallery_changed",
               "--media", str(module11 / "fixtures" / "one-second.wav"),
               "--mime", "audio/wav", "--ffprobe", os.environ["DVP_FFPROBE"],
               "--output", str(output)]
    completed = subprocess.run(command, check=True, capture_output=True, text=True)
    result = json.loads((output / "workflow.json").read_text(encoding="utf-8"))
    print(result["finding"]["state"], result["finding"]["revision"], len(result["audit"]))
    print(result["evaluation"]["review_status_at_creation"])
    print(result["acquisition"]["kind"], result["acquisition"]["received_bytes"])
    print(result["metadata_basis"])
# Only this example-owned temporary folder is cleaned; service records remain.
# For retained defense evidence use the README CLI with a NEW folder of your own.

Expected output

approved 3 4
unreviewed
wav 16078
supplied_not_measured

This executes the actual CLI against your already-started loopback server, inspects the real NEW export and prints four stable observations. IDs vary. The temporary example is guided; its cleanup removes only its owned local folder, not database records. Use the retained-output setup command for your own evidence.

The finished implementation is in capstone.py. Reading it is guided practice, not independent evidence.

Predict the snapshot

After approval, what is review_status_at_creation?

Compare your answer · self-reviewed

Still unreviewed. The historical creation snapshot is separate from the current finding state.

Find the hardcoding

Why is expected_revision=2 unsuitable for every transition?

Compare your answer · self-reviewed

The draft is revision 1 and later returned revisions change. Use the actual current revision; stale/state requests must remain visible refusals.

Separate authorship

Does a green reference run establish that capstone_practice is complete?

Compare your answer · self-reviewed

No. Select --target practice explicitly. Its stub raises NotImplementedError until implemented; supplied transport tests can pass while the learner integration still fails.

Change it, then build your own

One controlled change

Change the asset name and use another NEW retained-output folder. Predict which fields change and which remain fixture evidence. Then use the included MP4 with video/mp4; keep supplied dimensions separate from actual container observations.

Your independent task

Implement run_workflow in capstone_practice.py using disclosed capstone.request and identifier helpers, not either completed workflow. Make all seven calls with supplied metadata/finding input, returned IDs and revisions, compare actual persisted reads, preserve the creation snapshot and explicit evidence bases, and return the declared report. Run the 17 public cases, then the actual CLI with --target practice. Compose your own completed Module 10/11 boundaries using the launcher options in README; never call a reference fallback on error.

What success looks like

Your selected integration passes public changed-input checks and a real loopback run retains truthful JSON plus quarantine receipts. Your own tests also cover changed inputs, read-back mismatch and refused transitions. Demonstrate actual stop/restart read-back on the same DB without reinitialization. A green helper group or reference run alone is not this result.

Hint 1 · a question

List the seven calls and write the owner of each ID/revision beside them. Which reads must match earlier writes?

Hint 2 · a concept cue

Keep evaluation base and finding location separate. A changed metadata input must reach the actual POST; build the next transition from its returned finding.

Hint 3 · a localized example

The reference uses a small loop for submit/approve; the alternative uses explicit steps. Study either as guided assistance, close it, then implement and test with fresh values.

Need the complete worked solution?

Open capstone.py from the kit. Trace it, close it, then try fresh inputs in your own files. Treat the attempt as guided; seeing the solution does not award a practical pass.

Course help is guidance, not independent evidence. With JavaScript, opening help records guidance locally; otherwise note it in your README. Reset does not erase that history.

Repair a failed check

If the server cannot import a module, check the separate Module 10 interpreter and explicit extracted Module 11 path, not a system fallback. If a route fails, inspect its returned ID and revision. If a receipt appears after a fault, move success reporting after actual reads. If existing output is refused, preserve it and choose a NEW folder. If the selected learner raises NotImplementedError, implement that boundary.

NotImplementedError means a practice stub is still unfinished. Read the failing test name and the last error line. Change one behavior, rerun that build, then rerun all implemented builds.

Show it works on new inputs

Author a separate changed-input driver that rejects a submitted finding using a distinct fixture reviewer. Retain refusal of stale and self-review, current record/audit before and after restart, and a not-ready/recovery observation. State what you reused and what remains untested. The supplied approve-only workflow need not be distorted to claim every review outcome.

Self-review: name the input, result, refused case and reason. Your local test output and explanation are separate from a quiz score; this page does not certify a pass.

Keep the idea

An integration earns trust through real returned values, persistent reads and honest partial failure. It does not turn container observations or fixture review into production authority.