Anthropic CCA-F (Claude Certified Architect - Foundations (CCAR-F)) Practice Test 18

Question 170

A team needs to review an edit's side effects before code changes are made. Which planning artifact is most useful?

  1. A single statement saying all changes will be safe
  2. A generated final commit that exists before edits are reviewed
  3. A file-by-file plan with tests, rollback and dependencies
  4. An unrelated list of framework trends

Explanation

Correct Answer

C:

A concrete proposal exposes risk before implementation. Reviewers can challenge the scope and validation plan.

Incorrect Answers

A:

Unsupported assurance contains no implementation details or test criteria. It cannot support meaningful approval.

B:

Committing mutations defeats the requested pre-change gate. Approval should precede file modification.

D:

General trends do not show the effect of the proposed repository changes. The plan must be project-specific.

Question 171

A read-only code explorer reports a possible fix but cannot prove it because tests would require writes. What should it report?

  1. A proposed fix, evidence and the authorization checkpoint
  2. Write the fix despite the read-only boundary
  3. Erase the potential fix to avoid mentioning uncertainty
  4. Claim the tests passed because the fix seems plausible

Explanation

Correct Answer

A:

A planning workflow should distinguish observed facts from unexecuted tests. The next action is approval for controlled execution.

Incorrect Answers

B:

Execution would violate the role's restrictions. The agent should seek appropriate approval.

C:

A qualified recommendation is useful even before verification. It should be labeled accordingly.

D:

Plausibility is not runtime evidence. Reporting unexecuted checks as passed would mislead maintainers.

Question 172

A planner is asked to change public APIs with several consumers. What should it prioritize before editing?

  1. Only modify one unit test and assume consumers are safe
  2. Ignore external contracts because they are not in the current file
  3. Map dependent consumers and propose staged migration
  4. Rename symbols globally without checking call sites

Explanation

Correct Answer

C:

Cross-package interface changes can break callers. Understanding dependencies first reduces regressions and guides tests.

Incorrect Answers

A:

A single passing test does not establish compatibility. Interface changes require wider assessment.

B:

Public API behavior extends beyond one module. The plan must consider integration boundaries.

D:

A blind rename may miss reflection, external clients or generated bindings. Planning should identify impacts.

Question 173

An engineer wants an architecture proposal for a risky schema migration but forbids changes until approval. Which TWO measures are consistent with that boundary? Choose TWO.

  1. Use plan or read-only exploration to inspect dependencies and prepare the proposal
  2. Execute the migration first and document the steps afterward
  3. Enforce restrictions on write-capable tools until authorization is recorded
  4. Erase dependency information to keep the plan short
  5. Treat the model's confidence as sufficient approval for deployment

Explanation

Correct Answers

A:

Planning can produce a grounded sequence and risk assessment without modifying database or source state. Approval should follow a reviewable plan.

C:

A permission boundary prevents side effects even if generated text proposes them. It is stronger than a prompt-only request.

Incorrect Answers

B:

That reverses the requested approval order. Retrospective documentation cannot undo an unauthorized schema change.

D:

The proposed change affects callers and data. Omitting dependencies removes material review evidence.

E:

Self-assessed certainty is not an authorization artifact. An accountable reviewer must approve the release.

Question 174

A code assistant is about to run a destructive migration while still in a discovery phase. What should block the action?

  1. A lower temperature setting as the sole control
  2. An enforced permission boundary consistent with planning-only work
  3. A final response that omits mention of the migration
  4. A request to write a longer plan after the migration runs

Explanation

Correct Answer

B:

Mode and tool controls should prevent mutation before explicit approval. The host cannot rely solely on generated text for safety.

Incorrect Answers

A:

Sampling changes output variability, not authorization. Permission enforcement must block the tool call.

C:

Concealing actions worsens accountability. The forbidden operation must not execute.

D:

Documenting a destructive action afterward does not satisfy preapproval. Prevention is needed at execution time.

Question 175

A maintainer asks Claude Code to inspect 100 files and present only the top five refactor candidates. Which approach keeps the investigation controlled?

  1. Ask the model to list candidates from memory without reading the repository
  2. Edit all 100 files immediately and inspect them afterward
  3. Use bounded exploratory reads and rank candidates before asking to edit
  4. Choose five files randomly to avoid inspection cost

Explanation

Correct Answer

C:

An evidence-gathering phase can filter the repository without modifying it. The output should explain selection criteria and uncertainty.

Incorrect Answers

A:

Current code evidence is required for reliable prioritization. General familiarity is not enough.

B:

Broad mutation violates the exploratory objective and creates extensive rollback work.

D:

Random choice ignores coupling and maintainability evidence. The ranking must be justified.

Question 176

Claude Code generates a refactor that compiles but changes edge-case behavior. Which next step gives the clearest corrective signal?

  1. Run focused tests and revise based on actual failures
  2. Delete the edge-case tests to make the build green
  3. Ask the model whether it believes the refactor is correct
  4. Rewrite the entire module from scratch without inspecting failures

Explanation

Correct Answer

A:

Passing compilation does not establish semantic equivalence. Concrete failing inputs guide the model toward the actual regression.

Incorrect Answers

B:

Removing valid tests conceals a behavior change. The requirement is preserving behavior.

C:

Self-assessment cannot replace executable behavior evidence. The discrepancy requires specific tests.

D:

A broad rewrite may introduce new defects and ignores the available regression signal.

Question 177

A developer's vague request to improve performance leads Claude Code to optimize the wrong path. What prompt refinement is most useful?

  1. Tell the model to be much smarter without specifying constraints
  2. Trust an invented benchmark instead of running one
  3. State the measured bottleneck and acceptance target
  4. Ask for a complete rewrite to guarantee speed

Explanation

Correct Answer

C:

Specific evidence narrows the optimization target and makes results testable. Performance claims should be verified with representative measurements.

Incorrect Answers

A:

General encouragement lacks a measurable goal. The model may continue optimizing irrelevant code.

B:

Unmeasured claims are not evidence of improvement. The optimization needs a reproducible test.

D:

A rewrite is not necessarily faster and risks compatibility. The bottleneck should drive changes.

Question 178

An assistant changes a parser, then learns from tests that empty input should return a different error. What iteration is appropriate?

  1. Revise the specific error-handling branch and rerun the relevant test suite
  2. Ignore the failing case because normal inputs pass
  3. Revert unrelated files at random to trigger a different model answer
  4. Reset all tests to accept the new accidental behavior

Explanation

Correct Answer

A:

Targeted feedback supports a bounded correction. Verification must confirm the fix without reintroducing other parser defects.

Incorrect Answers

B:

Edge cases can be significant production behavior. A known failing requirement needs correction.

C:

Random edits do not address the identified cause. They make regression analysis harder.

D:

Changing tests to fit a bug undermines the documented contract. The implementation should meet the specification.

Question 179

A maintainer finds that Claude Code's first patch solves a bug but introduces duplicate helper functions. What review step is best?

  1. Review the diff, simplify repeated logic and retest
  2. Accept all generated code if the original bug disappears
  3. Remove source-control diff inspection from the workflow
  4. Add a third helper to provide another implementation option

Explanation

Correct Answer

A:

A successful bug fix can still degrade maintainability. Reviewing changed code catches unnecessary duplication before merge.

Incorrect Answers

B:

One success criterion does not justify avoidable duplication. Code quality and regression checks still matter.

C:

Diffs reveal unintended changes and duplication. Disabling them weakens editorial review.

D:

More copies compound the maintenance issue. The existing code should be simplified.

Question 180

A test run fails with a clear assertion describing a missing null check. How should Claude Code use that information?

  1. Claim success because most tests passed
  2. Ask for a completely different task to distract from the failure
  3. Use the assertion failure to fix and retest the affected path
  4. Remove the assertion so the failure is no longer visible

Explanation

Correct Answer

C:

A specific failure narrows the defect and supports an evidence-driven iteration. The assistant should not overgeneralize from a single case.

Incorrect Answers

A:

Partial pass rates do not satisfy a suite requiring all mandatory tests. The failing case remains unresolved.

B:

Changing objectives does not repair the code. The test is directly relevant to the accepted request.

D:

Suppressing valid checks masks the bug. Repair must occur in the implementation.

Claude Certified Architect - Foundations (CCAR-F) (CCA-F) Practice Tests