Capstone delivery and verification
Use the complete reproducible fixture
The package lab-fixtures/chapter-60/capstone.py creates its own assets, configuration, local certificate and backend versions. Run it in a disposable approved Linux environment with Python 3, OpenSSL and Nginx with SSL and stub_status support. It chooses ephemeral loopback ports, starts an unprivileged Nginx process and removes temporary files afterward. The script runs syntax checks before each process start. This is a standalone lab, not a ByteMind interactive editor or an installation command. The source and recorded output are included.
python3 -B capstone.pypython3 -B cost.pyMake proxy behavior explicit
The API fragment below is part of the complete fixture. A direct-edge proxy replaces incoming X-Forwarded-For with the peer address, sets the scheme from the observed connection and strips Forwarded. The app must trust only the actual edge and must not consult other untrusted client identity headers. Proxy caching is off, and the response is marked no-store. Connection timeout is not a total request deadline; read timeout covers the gaps between reads. Retries are disabled in this exercise to make the failing candidate visible.
proxy_pass http://docs_api;proxy_set_header X-Forwarded-For $remote_addr;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header Forwarded "";proxy_cache off;proxy_hide_header Cache-Control;add_header Cache-Control "no-store" always;proxy_connect_timeout 1s;proxy_read_timeout 2s;proxy_next_upstream off;Test both positive and negative outcomes
Syntax success means the binary accepts the configuration, not that it meets the contract. The lab verifies trust using the local certificate, rejects the same certificate under default trust, checks unknown host and route handling, confirms the credential requirement and checks that supplied identity headers do not survive unchanged. Six requests to the deliberately limited route must include both 200 and 429. Timing can vary, so run on an isolated machine. The private status listener must not appear on the public route. Structured logs contain method, normalized path, status and upstream result, not query strings or authorization headers; path data itself can still be sensitive.
TLS: trust anchor accepted / untrusted rejectedRouting: expected asset and API / unknown host and path deniedIdentity: forged address replaced with actual peerPrivacy: no-store; credential and query absent from access logLimit: finite 6 requests -> both 200 and 429Gate release artifacts, not just source files
CI should stop on any failed assertion and archive the sanitized evidence and tool versions. Build and verify the actual deployment artifact separately, then use an approved staged rollout. The included deployment.md explains VM and container variants, including private origins, read-only artifacts, writable runtime paths, certificate handling and monitoring boundaries. They are illustrative, not executed. Do not copy the temporary certificate or Python demo server into production. A performance claim needs representative measured latency, load, errors and resource utilization; this lab measures functional behavior only.
review -> syntax/functional tests -> sanitized evidence-> build target artifact -> environment integration tests-> approval -> staged rollout -> verify or rollbackApply what you learned
Practice: In the disposable lab, run capstone.py; then propose two additional negative assertions for the new routes from the previous exercise. Describe which layer enforces each rule and what a failed test means. The manual exercise and quiz are staged separately. Related references and the next lesson are listed in the chapter authored map.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Capstone delivery and verification
Assess the professional delivery capstone.
Why does syntax validation precede behavior tests?
What should untrusted localhost certificate verification do?
What does proxy_cache off address?
What does 429 mean in the limited route test?
Where should status metrics be exposed?