Anthropic CCDV-F (Claude Certified Developer - Foundations) Practice Test 22

Question 210

An extraction task can return unknown dates and the program must distinguish unavailable from blank strings. Which production safeguard is most relevant?

  1. Return actionable validation errors to callers
  2. Validate the outer JSON object schema
  3. Reject unexpected fields in business actions
  4. Handle null and missing values distinctly

Explanation

Correct Answer

D:

Type-aware validation preserves nullability and missing-field semantics for downstream logic—with this limitation: coercing every absent property to an empty value can distort business decisions.

Incorrect Answers

A:

A structured 4xx response names the offending field without leaking internal implementation details; the needed capability is different—type-aware validation preserves nullability and missing-field semantics for downstream logic—and a generic 500 would misleadingly suggest a server outage.

B:

Schema checking enforces required keys, types, and nested structures consistently, whereas the requirement calls for another behavior: type-aware validation preserves nullability and missing-field semantics for downstream logic; a parseable JSON string can still violate the endpoint's semantic contract.

C:

Application validation controls the allowed property set before any database mutation; however, the critical mechanism here is that type-aware validation preserves nullability and missing-field semantics for downstream logic, and the model may produce syntactically valid extra keys that are unsafe to execute.

Question 211

An assistant must read uncontrolled internet pages while also working with restricted internal records. Which solution should the engineer adopt?

  1. Audit privileged changes with actor attribution
  2. Isolate risky browsing from privileged tools
  3. Treat a retrieved webpage as untrusted data
  4. Verify tool permissions independently of text

Explanation

Correct Answer

B:

Separate trust zones and scoped workers prevent public content from directly wielding private capabilities; isolation fails if credentials or tool results leak back across the boundary.

Incorrect Answers

A:

An audit trail connects the principal, approved operation, target, and result; by comparison, the intended solution relies on this: separate trust zones and scoped workers prevent public content from directly wielding private capabilities; a text summary by the model is not sufficient evidence of a committed security change.

C:

External content is evidence, not an instruction source allowed to override the application's policies, whereas the requirement calls for another behavior: separate trust zones and scoped workers prevent public content from directly wielding private capabilities; prompt labeling helps but tool-side access restrictions must remain enforced.

D:

Server-side authorization checks bind each requested resource to the authenticated principal; however, the critical mechanism here is that separate trust zones and scoped workers prevent public content from directly wielding private capabilities, and a system-prompt ban on disclosure cannot replace real access control.

Question 212

A travel assistant identifies a suitable ticket but must not purchase it until the traveler approves the price. What should be implemented to solve this problem?

  1. Use idempotency keys for retriable writes
  2. Reconcile all returned tool results before synthesis
  3. Validate caller authorization per invocation
  4. Require explicit user confirmation before expensive writes

Explanation

Correct Answer

D:

An enforced approval step separates informative recommendations from transactional execution, although a prompt that says ask first cannot replace backend commit gating.

Incorrect Answers

A:

Stable transaction identifiers allow duplicate attempts to be detected before replaying the business action; the missing capability is more specific: an enforced approval step separates informative recommendations from transactional execution; replaying without deduplication can create multiple charges.

B:

The harness maps all available results to their calls before requesting a comparative answer; by comparison, the intended solution relies on this: an enforced approval step separates informative recommendations from transactional execution; ignoring a pending result can produce an unsupported recommendation.

C:

The backend checks owner, resource, action, and policy before accepting the call; the needed capability is different—an enforced approval step separates informative recommendations from transactional execution—and model-generated account identifiers are not an authorization proof.

Question 213

A known-valid request begins failing intermittently with a server-side status code. What should the team do at this decision point?

  1. Treat 401/403 responses as credential or access problems
  2. Treat 400-class validation responses as request defects
  3. Treat 5xx as potential upstream service faults
  4. Trace the external tool service

Explanation

Correct Answer

C:

The client applies guarded retries and monitoring while preserving safe degraded behavior, although treating an outage as a prompt defect misdirects investigation.

Incorrect Answers

A:

Authentication and entitlement checks distinguish invalid credentials from forbidden resource access; by comparison, the intended solution relies on this: the client applies guarded retries and monitoring while preserving safe degraded behavior; changing prompt wording cannot grant missing API permission.

B:

The developer checks the request schema, supported fields, and types before attempting another call; the needed capability is different—the client applies guarded retries and monitoring while preserving safe degraded behavior—and retrying an identical malformed request wastes time and capacity.

D:

A distributed trace follows the tool dispatcher to the failing downstream dependency; however, the critical mechanism here is that the client applies guarded retries and monitoring while preserving safe degraded behavior, and rewriting system instructions will not repair an unavailable invoice endpoint.

Question 214

A narrow eligibility decision depends entirely on a small set of codified rules and enumerated inputs. Which capability is necessary for this outcome?

  1. Store durable task state outside the model
  2. Prefer a workflow for regulated approvals
  3. Prefer a static lookup and rule table
  4. Prefer an agent for exploratory diagnostics

Explanation

Correct Answer

C:

A rule engine evaluates the defined cases predictably and yields transparent reasons; notably, a language model would introduce avoidable nondeterminism into a deterministic policy.

Incorrect Answers

A:

The application persists task IDs, stage progress, completed actions, and retry metadata in controlled storage; however, the critical mechanism here is that a rule engine evaluates the defined cases predictably and yields transparent reasons, and conversation context alone is not a transactional checkpoint or a durable job record.

B:

Explicit branches and immutable records make the process stable under regulatory review; the requirement instead turns on this behavior: a rule engine evaluates the defined cases predictably and yields transparent reasons; free-form agent planning is unsuitable for mandatory stage-order guarantees.

D:

An agent observes evidence and selects the next tool based on new findings; in contrast, a rule engine evaluates the defined cases predictably and yields transparent reasons, while it still requires restricted read-only tools and a bounded investigation scope.

Question 215

A Claude API integration receives HTTP 429 while sending too many requests in a short period. How should this requirement be met?

  1. Correct a malformed request before resubmission
  2. Back off on rate limiting
  3. Parse typed content blocks rather than raw concatenation
  4. Refresh authentication on unauthorized calls

Explanation

Correct Answer

B:

Rate-limit handling respects retry hints and adds capped exponential delays with jitter; its operational boundary is that immediate repeated calls worsen overload and do not change the assigned quota.

Incorrect Answers

A:

Client-side schema validation fixes the payload and prevents fruitless retries; this cannot substitute for the behavior that rate-limit handling respects retry hints and adds capped exponential delays with jitter, because a network backoff cannot make an invalid request body well formed.

C:

Typed block handling preserves whether an element is displayable text or a tool request; this addresses a separate concern, not the fact that rate-limit handling respects retry hints and adds capped exponential delays with jitter; blindly concatenating heterogeneous blocks can lose tool metadata and semantics.

D:

The operator checks key validity, workspace scope, and secret injection before retrying; here, the controlling capability is that rate-limit handling respects retry hints and adds capped exponential delays with jitter, but sending the same invalid secret repeatedly will not solve the auth problem.

Question 216

An application must prove that user input triggers an allowed tool and surfaces its final result coherently. Which engineering practice is the strongest match?

  1. Use regression evaluations for prompts
  2. Pin reproducible dependencies
  3. Run an end-to-end test using a sandbox
  4. Run unit tests for a tool argument validator

Explanation

Correct Answer

C:

An end-to-end test exercises the public request path, model call, dispatcher, and response formatter; its operational boundary is that isolated component success cannot prove the integration as a whole functions.

Incorrect Answers

A:

A frozen dataset and grading rubric compare model outputs before and after the proposed prompt revision; the requirement instead turns on this behavior: an end-to-end test exercises the public request path, model call, dispatcher, and response formatter; passing a linter does not measure semantic output quality.

B:

Lockfiles and controlled versions reduce unplanned changes between test and production; this cannot substitute for the behavior that an end-to-end test exercises the public request path, model call, dispatcher, and response formatter, because automatically taking every new major dependency version can break stable interfaces.

D:

Unit cases exercise the validator's accept/reject logic without live API traffic; this addresses a separate concern, not the fact that an end-to-end test exercises the public request path, model call, dispatcher, and response formatter; a complete agent test is slower and less precise for locating pure validation bugs.

Question 217

A response requests two independent pricing checks and the assistant should compare them only after both resolve. Which design would meet this acceptance criterion?

  1. Execute dependent calls in the correct sequence
  2. Reconcile all returned tool results before synthesis
  3. Serialize conflicting writes to shared state
  4. Read the returned tool_use ID and name

Explanation

Correct Answer

B:

The harness maps all available results to their calls before requesting a comparative answer; notably, ignoring a pending result can produce an unsupported recommendation.

Incorrect Answers

A:

A follow-up action depends on the actual result of the first tool operation; the requirement instead turns on this behavior: the harness maps all available results to their calls before requesting a comparative answer; running both in parallel can reference an object that does not yet exist.

C:

Coordination or transactions prevent lost updates and inconsistent final state; in contrast, the harness maps all available results to their calls before requesting a comparative answer, while independent model-generated reasoning does not provide concurrency control.

D:

Each client tool request includes metadata that ties subsequent execution and results to that call; this addresses a separate concern, not the fact that the harness maps all available results to their calls before requesting a comparative answer; guessing an operation from nearby text can dispatch the wrong function.

Question 218

Several automated code-review jobs run concurrently and must not modify each other's checkout. Which approach best meets this requirement?

  1. Use a fresh isolated CI workspace
  2. Use an interactive session for exploratory editing
  3. Use CLAUDE.md for repository instructions
  4. Use non-interactive print mode for CI automation

Explanation

Correct Answer

A:

Per-job isolation avoids file collisions and cross-run contamination; shared mutable directories can corrupt outputs even when prompts are correct.

Incorrect Answers

B:

An interactive coding session supports iterative commands and review as context evolves, whereas the requirement calls for another behavior: per-job isolation avoids file collisions and cross-run contamination; automating every command without supervision is unnecessary for a human-led investigation.

C:

A project instruction file provides contextual guidance when Claude Code works in that repository; however, the critical mechanism here is that per-job isolation avoids file collisions and cross-run contamination, and it is explanatory context rather than a security boundary enforcing tool privileges.

D:

Headless command-line invocation can run a prompt and return consumable output under controlled settings; the requirement instead turns on this behavior: per-job isolation avoids file collisions and cross-run contamination; CI still needs noninteractive credentials and appropriately limited permissions.

Question 219

A long-lived conversation cites technical guidance that may be superseded by a newer document. Which measure directly addresses the problem?

  1. Retrieve relevant evidence per user question
  2. Keep unresolved questions explicit
  3. Label external text as untrusted input
  4. Track source timestamps or versions

Explanation

Correct Answer

D:

Version metadata allows the agent to prefer current evidence and flag historical material; in production, timestamp alone does not establish which source is authoritative.

Incorrect Answers

A:

Retrieval selects bounded passages pertinent to the current question and supplies their source context; this addresses a separate concern, not the fact that version metadata allows the agent to prefer current evidence and flag historical material; selecting on superficial keywords alone may miss nuanced exceptions.

B:

Recording open issues prevents compaction from converting uncertainty into an invented guarantee; here, the controlling capability is that version metadata allows the agent to prefer current evidence and flag historical material, but suppressing gaps for a cleaner paragraph undermines factual reliability.

C:

Trust-boundary marking prevents source content from being promoted to application authority; the missing capability is more specific: version metadata allows the agent to prefer current evidence and flag historical material; labels should be backed by tool restrictions because prompts can be attacked.

Question 220

An inference was repeated after a timeout but its earlier suggested action may already have executed. Which change would satisfy the constraint?

  1. Retry only failures considered transient
  2. Distinguish model-call retry from tool-action replay
  3. Use capped exponential backoff with jitter
  4. Centralize retry policy in shared middleware

Explanation

Correct Answer

B:

Separating generation retries from durable side-effect records avoids duplicate tool execution; the implementation must still recognize that model text has no transactional guarantee that would make action replays harmless.

Incorrect Answers

A:

A retry policy classifies failure causes and retries only the recoverable subset; this addresses a separate concern, not the fact that separating generation retries from durable side-effect records avoids duplicate tool execution; repeating all failures indiscriminately can amplify outages and costs.

C:

Randomized increasing delays spread load and respect retry guidance where supplied; the missing capability is more specific: separating generation retries from durable side-effect records avoids duplicate tool execution; unbounded retries create unpredictable latency and can hide an enduring fault.

D:

Shared policy consistently classifies errors and applies bounded retries across services; by comparison, the intended solution relies on this: separating generation retries from durable side-effect records avoids duplicate tool execution; it must still allow endpoint-specific rules for unsafe side effects.

Claude Certified Developer - Foundations (CCDV-F) Practice Tests