Environment review
Trace the inputs from base image to runtime. For each issue, name the failing step, the cause, the fix, and the check.
Reproducible inputs
Pin the base image by digest and specify the target platform. Lock direct and transitive Python dependencies. Record hashes for the artifacts you install.
Offline build
Stage the base image and target-platform wheels before the build. Install from the wheelhouse with --no-index. Exercise the build and runtime with network access disabled.
Clean machine
Use a fresh checkout and build context. Check for host paths, local virtual environments, missing generated files, and first-run downloads.
Practice · Payments API
The build must work offline after input preparation. The source imports an SDK API that exists only in version 1.
FROM python:3.12-slim
WORKDIR /app
COPY . .
RUN pip install "example-payments-sdk>=1.8"
CMD ["python", "-m", "payments_api"]
Reveal the review
- Base image. The tag can resolve to a different image. Pin the digest and preload the correct platform image.
- Dependency install. A fresh resolver can select version 2. The build can succeed and the import can fail at startup. Lock a compatible dependency graph and prepare a wheelhouse.
- Build context. A broad copy can include a host virtual environment or local artifacts. Copy explicit inputs and check a fresh checkout.
- Verification. Build from staged inputs with networking disabled, then start the container and exercise an API request with networking disabled.
Project example · Codesurface exposed an import failure on a fresh dependency install. Dependency declaration · Related compatibility fix
Verifier review
For each requirement, name an incomplete implementation that passes the current test. Add the smallest check that rejects it.
Practice · Payment retries
The verifier sends two sequential requests with the same key and checks only that both return HTTP 200. The contract requires one durable payment per key and the original payment ID on retry.
Check durable state
Two successful responses can hide two writes. Compare the payment IDs and inspect persistent storage for exactly one payment. Submit a distinct key and check that it creates a second payment.
Check concurrency and restart
Sequential requests can hide a race. Start two requests at a controlled overlap and inspect the stored effect. Restart the service before a retry to catch an in-memory cache.
Check verifier integrity
Keep fixtures and assertions under grader control. Vary data across cases. Run the candidate through the documented entry point and score observed behavior. Check that the baseline fails and a reference fix passes.
Project example · Codesurface checks that a later index pass preserves the same language selection as the first pass. Regression tests
90-minute mock assessment
- 15 min: Find three environment failures. For each one, state when it fails and how to check the fix.
- 20 min: Find three verifier gaps. Write the expected result and the state to inspect.
- 35 min: Choose a repo and draft the task. Explain one partial fix and the check that catches it.
- 20 min: Record the walkthrough and play it back.
Video checklist
Target five to seven minutes. Show the repo and starting point, explain the task, and trace one verifier case.