Anthropic CCAR-P (Claude Certified Architect - Professional) Practice Test 40

Question 390

A command-line integration reports only 'AI failed' for authentication errors, invalid inputs, and temporary service failures. What improvement would most help maintainers respond correctly?

  1. Include every raw request and secret in the terminal error output
  2. Return one success exit status and place all failure details in free-form prose
  3. Return distinct safe error categories with actionable context and a correlation identifier
  4. Retry every failure automatically until the command succeeds

Explanation

Correct Answer

C:

Different failure classes require different responses. Structured categories and trace correlation support diagnosis without exposing credentials or sensitive payloads.

Incorrect Answers

A:

Detailed output can create a disclosure while still overwhelming maintainers. Error reporting should provide useful context with appropriate redaction.

B:

A success status can mislead callers and automation even if the text describes an error. Distinct safe categories should make the actual outcome actionable.

D:

Some errors require changed credentials or input rather than retries. A generic loop can hide the cause and amplify load.

Question 391

A developer updates an API credential in a configuration file, but the running process still uses an older environment-variable value. The application's documented precedence favors the environment. What should be checked first?

  1. The configuration file's contents without inspecting inherited environment values
  2. The credential value in a new shell that does not launch the failing process
  3. The effective runtime environment and the process's configuration-loading behavior
  4. Rotate the credential again while leaving the process environment unchanged

Explanation

Correct Answer

C:

The documented precedence explains why editing the lower-priority file has no effect. Diagnosis should inspect the actual process inputs and reload or restart behavior.

Incorrect Answers

A:

The file may be correct while a higher-priority environment variable overrides it. Diagnosis must inspect the effective inputs of the running process.

B:

A different shell can have different inherited variables. The relevant evidence is the configuration of the actual process that makes the failing request.

D:

The same precedence rule would continue selecting the stale environment value. A new credential does not address which configuration source the process actually reads.

Question 392

An API integration consistently receives an authentication failure after a key was revoked. The retry loop uses exponential backoff but never succeeds. What is the appropriate fix?

  1. Supply a valid authorized credential and verify the effective configuration
  2. Increase the retry count to cover a longer recovery period
  3. Switch request payload formats while retaining the revoked credential
  4. Cache the last successful response and report new requests as authenticated
  5. Reduce concurrency while keeping the revoked key unchanged

Explanation

Correct Answer

A:

Backoff is useful for some transient conditions, but a revoked key remains invalid over time. The integration needs corrected authentication rather than repeated identical requests.

Incorrect Answers

B:

Time alone does not make a revoked credential valid again. More retries preserve the same deterministic authentication failure.

C:

Changing the body does not restore credential validity. The consistent authentication failure requires a valid authorized key and verified runtime configuration.

D:

A cached result does not authenticate the current request or establish its outcome. Reporting success would conceal the unresolved access failure.

E:

Concurrency reduction can help capacity problems, not invalid credentials. The reported error class points to authentication configuration.

Question 393

A dependency used by the assistant's tool runner has a confirmed vulnerability in a reachable feature. What should the team do with a candidate patched version?

  1. Upgrade every dependency to its newest major version in the same patch
  2. Ignore it until the model generates an exploit during ordinary use
  3. Suppress the advisory because the package is not visible in the user interface
  4. Assess applicability, update promptly, and run focused compatibility and security checks

Explanation

Correct Answer

D:

The reachable vulnerability creates a concrete reason to act. Targeted validation helps remediate it while checking that the tool runner still behaves as required.

Incorrect Answers

A:

Unrelated upgrades expand the change and complicate diagnosis. The immediate remediation should be scoped while any broader updates receive their own assessment.

B:

Observed exploitation is not necessary when the vulnerable feature is reachable. Waiting leaves a known exposure without justification.

C:

Backend reachability matters even when users never see the package. Interface visibility does not determine whether the vulnerability affects the runner.

Question 394

A coding assistant says it created a valid configuration archive. The archive will be consumed by an automated deployment process. What should verification include?

  1. Check only that the archive's byte size is greater than zero
  2. Review only the script that was supposed to produce the archive
  3. Trust the final message if it includes the intended filename
  4. Open the produced archive and validate its expected files and configuration schema

Explanation

Correct Answer

D:

A completion statement does not prove the artifact is usable. Inspecting the actual output checks the contract that the deployment process will consume.

Incorrect Answers

A:

A nonempty archive can contain missing, malformed, or unrelated files. Size alone does not validate the required structure and schema.

B:

The script may be correct while execution fails or produces stale output. The actual artifact must satisfy the consumer's contract.

C:

Naming a file does not establish its existence, contents, or validity. The generated artifact itself needs verification.

Question 395

The team wants generated changes checked before merge. Which two gates directly evaluate the change's integration readiness? Choose TWO.

  1. An edit log showing that the requested files were written successfully
  2. A reproducible build or validation of the artifact that will be delivered
  3. Relevant automated tests and static checks for the affected code
  4. A passing test run on the parent commit before applying the generated patch
  5. A generated checklist that marks all requested requirements complete

Explanation

Correct Answers

B:

A mergeable change needs to produce the expected deliverable under the defined environment. Building or validating that artifact tests a concrete integration contract.

C:

These checks provide repeatable evidence about behavior and code quality within their coverage. They should be selected for the actual change and repository requirements.

Incorrect Answers

A:

A successful write confirms that an edit occurred. It does not establish that the modified code builds, behaves correctly, or integrates with its dependencies.

D:

The parent result establishes a baseline rather than validating the new change. It supplies no direct evidence that the modified artifact integrates correctly.

E:

A self-reported checklist can organize review but does not execute or validate the change. The requested gates need evidence from the modified code and artifact.

Question 396

An assistant is about to perform a broad refactor in a repository with valuable uncommitted work. What should happen before the refactor?

  1. Preserve the existing work in an appropriate checkpoint and establish a recoverable baseline
  2. Make a note of the current branch name without preserving file contents
  3. Rely on editor undo history as the sole recovery mechanism
  4. Discard all uncommitted changes to give the assistant a clean starting point
  5. Begin immediately and rely on the assistant to remember every original line

Explanation

Correct Answer

A:

A recoverable baseline protects work and makes the refactor's effects reviewable. The checkpoint should distinguish existing changes from the new transformation.

Incorrect Answers

B:

The branch name does not capture uncommitted edits. Recovery requires the actual content to be preserved through an appropriate mechanism.

C:

Undo history may not cover external edits, every affected file, or the full refactor session. A deliberate checkpoint provides a recoverable baseline for the valuable work.

D:

The scenario identifies valuable work, so deletion would be destructive. A clean baseline should be achieved by preserving that work, not silently removing it.

E:

Model context is not a reliable version-control mechanism. A repository checkpoint provides an explicit and recoverable record of the prior state.

Question 397

An integration failure appears only in a large application. The team cannot determine whether its adapter or the external API is responsible. What next artifact would best isolate the boundary?

  1. A minimal reproducible request using the same relevant inputs and configuration
  2. A complete rewrite of the adapter before collecting more evidence
  3. A screenshot of the generic top-level error message alone
  4. A longer architectural document that does not execute the failing path

Explanation

Correct Answer

A:

A small reproduction removes unrelated application behavior while preserving the suspected failure. It helps determine whether the problem occurs at the API boundary or in surrounding code.

Incorrect Answers

B:

A rewrite changes many variables and can hide the original cause. A minimal reproduction provides evidence before a larger intervention.

C:

The screenshot may confirm failure but omits the request and configuration needed to reproduce it. It does not separate adapter behavior from API behavior.

D:

Documentation can describe the design but does not isolate the observed behavior. The team needs an executable case reproducing the relevant boundary.

Question 398

An assistant-generated unit test mocks every external function to return success, including the validation function being tested. Why is this test inadequate?

  1. It should run only in production where mocks are unavailable
  2. It uses mocks at all, so it cannot provide any useful unit-test evidence
  3. It replaces the behavior under test with a predetermined result
  4. It has too few assertions, regardless of what code actually executes

Explanation

Correct Answer

C:

The test can pass without exercising the validation logic. Mock boundaries should preserve the behavior being evaluated while controlling appropriate external dependencies.

Incorrect Answers

A:

Production execution is not the required remedy. A properly designed test can exercise validation in a controlled development environment.

B:

Mocks can be useful for isolating dependencies. The specific problem is mocking away the behavior the test claims to verify.

D:

More assertions on the same predetermined output would not restore the missing behavior. The test must exercise the actual validation logic.

Question 399

A team publishes coding-assistant guidelines but never examines recurring mistakes or developer friction. What lightweight practice would improve the guidance over time?

  1. Require developers to follow the original examples even after tools change
  2. Expand the guidelines every month by a fixed number of pages
  3. Review recurring issues and update examples, checks, or tooling based on observed needs
  4. Measure success only by how many developers opened the guidelines

Explanation

Correct Answer

C:

Enablement should evolve with actual use. Repeated problems can reveal unclear guidance or missing tooling that a static document does not address.

Incorrect Answers

A:

Stale examples can become inaccurate or inefficient. Guidance should be maintained as the workflow and tools evolve.

B:

Document growth is not evidence of improved usefulness. Updates should target observed needs rather than an arbitrary volume goal.

D:

Page views do not show whether the guidance improves work. The feedback loop should examine recurring outcomes and practical friction.

Question 400

A coding assistant has edited the requested files but has not run the relevant checks. Which three elements should its handoff distinguish? Choose THREE.

  1. Remaining failures, unverified areas, or blocked steps
  2. A claim that all checks passed because the edited code appears plausible
  3. A blocked check recorded as passed because its environment is expected to be repaired
  4. Planned validation commands presented as evidence that validation occurred
  5. What changed and how the change addresses the requested behavior
  6. Which checks actually ran and their observed results

Explanation

Correct Answers

A:

Open work affects whether the recipient can rely on the change. A useful handoff makes those limits explicit rather than implying completion.

E:

The recipient needs a clear connection between the implementation and the goal. This supports review of whether the work stayed within scope.

F:

Validation claims must match execution evidence. Distinguishing performed checks from planned checks prevents an untested change from appearing verified.

Incorrect Answers

B:

Plausibility is not evidence that checks executed successfully. The handoff should not transform code review confidence into fabricated test results.

C:

An expected future repair is not an observed test result. A handoff should identify the blocked check and its limitation until it actually runs.

D:

A command in a plan has not necessarily executed. The handoff needs to separate intended verification from the checks actually run and their outcomes.

Claude Certified Architect - Professional (CCAR-P) Practice Tests