Skip to main content

Module Quiz

Attempt independently before opening the solution and scoring guide. Use the contracts as the stated problem specification; do not consult implementation or solutions. Record assumptions and assistance. This is a transfer assessment: pattern names without traces do not pass.

A01: Policy substitution​

A quote callback returns bool and is invoked twice for logging. Explain both contract failures. Design a one-provider seam and compare it with a plain function. Trace a failing render hook in a fixed pipeline.

A02: Observer protocol​

A removes B and adds C on its first callback. A also attempts nested publication. Under L02, give the first two deliveries and error handling. Then register B twice and show independent disposal.

A03: Undo and snapshots​

Start ab, replace [0,1) with x, undo, perform invalid edit, redo. Give the resulting text and history behavior. Explain how a text-only snapshot fails for an editor with observable cursor state.

A04: Commands, facts, effects​

A worker sends successfully, times out before acknowledgement, then retries. Analyze processed-ID-before versus processed-ID-after. Contrast attempted-command logging with accepted-event replay; state what the local kit cannot prove.

A05: State and compatibility​

Extend draft/review/published/archived with revision-requested behavior. State exact transitions and invalid outcomes. Explain why changing rejection messages and making a writable status read-only is more than a refactor.

A06: Iterator lifecycle​

Pages are empty+more, (7,8)+more, (9)+final. Trace construction and three next calls. Define early-stop cleanup if pages now own resources and explain why the original kit does not test it.

A07: Handler composition​

Authentication returns allow before a quota check that would deny. Explain first-match versus mandatory-check contracts, terminal defaults, exception handling and one order-sensitive trace.

A08: Visitor and language semantics​

Compare adding Neg with adding Count to an arithmetic Visitor. Explain both dispatch steps. For Boolean AST false AND missing, give parse/evaluation obligations and contrast with true AND missing.

A09: Coordination and ownership​

Country selection changes allowed shipping method and submit eligibility. Design a mediator or pure coordinator, prevent render feedback, and reject stale asynchronous results after disposal. Explain how Observer alone differs.

A10: Evidence and composition​

A workflow accepts approval then an observer fails. Specify state, accepted history, returned outcome and recovery. Design an independent oracle, one finite sequence suite, a changed-assumption test and a 7–14 day recheck.

Score per competency using the gate rubric. Repair each weak gate and reattempt a fresh case. Reading the key is feedback, not a successful independent attempt.

Runtime comparison assessment​

After A01–A10, attempt BD1–BD6 for the runtime package. Keep its key closed. Explain why A02/A03's core expectations and the runtime cancellation/no-op expectations differ legitimately. The guided answers in runtime-practice are preparation, not an unseen assessment.