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

Question 250

The relevant test fails both before and after a proposed change with the same missing-fixture error. What should the report state?

  1. That the patch is fully verified because the failure was pre-existing.
  2. That the patch introduced the missing fixture without further evidence.
  3. The observed baseline failure and the fact that this test has not validated the patch.
  4. That the failed test can be silently removed from the suite.

Explanation

Correct Answer

C:

Comparing baseline and final runs separates existing breakage from evidence about the new change. The identical fixture error is evidence of a baseline problem, not proof that the patch is good or bad. Any other completed checks should be reported separately from this blocked validation.

Incorrect Answers

A:

An existing failure still prevents this test from providing a passing validation signal.

B:

An unchanged baseline failure does not establish that the new code caused it.

D:

Deleting a test would conceal the unresolved validation condition.

Question 251

A test alternates between passing and failing across unchanged reruns. What should Claude Code avoid claiming?

  1. That the latest run passed while earlier runs failed.
  2. That the failure pattern warrants investigation.
  3. That one passing rerun proves the underlying defect is fixed.
  4. That the observed failure may involve timing or shared state.

Explanation

Correct Answer

C:

A single pass does not resolve an intermittent failure that remains reproducible. Intermittent behavior requires examining the failure mechanism rather than selecting a convenient successful run. Timing, state leakage, or unstable external dependencies may need controlled isolation.

Incorrect Answers

A:

Reporting the actual sequence preserves the uncertainty in the validation evidence.

B:

Inconsistent results on unchanged code are useful evidence of instability.

D:

Those are reasonable hypotheses to investigate rather than guaranteed diagnoses.

Question 252

A refactored parser reaches 100% statement coverage, but tests never assert how it handles invalid input. What conclusion should the reviewer draw?

  1. The parser cannot contain any conditional branches because its statement coverage is complete.
  2. No further review is needed if the coverage report is machine generated.
  3. Statement coverage is useful evidence of execution, but invalid-input behavior still needs meaningful assertions.
  4. Every possible parser behavior is correct because each statement executed at least once.

Explanation

Correct Answer

C:

A covered line can produce the wrong result without a test noticing. The reviewer should connect assertions to the parser's required boundary and error behavior rather than infer correctness from coverage alone.

Incorrect Answers

A:

Statement coverage and branch structure are different properties; executing statements does not imply the absence of untested branch outcomes.

B:

Automating measurement does not change what the coverage metric can and cannot demonstrate.

D:

Execution coverage does not establish that assertions check the intended result or that every meaningful input path was exercised.

Question 253

A newly added test passes alone but fails when run after an existing test. Both touch a process-wide configuration object, and the earlier test changes a setting without restoring it. What is the most direct repair to the test design?

  1. Require the new test to run first in every environment.
  2. Isolate or restore the shared configuration in fixtures so each test starts from its declared state.
  3. Retry the failing test until it runs in a process with favorable configuration.
  4. Update the expected result to match the earlier test's modified configuration.

Explanation

Correct Answer

B:

The failure depends on state leaked by the earlier test, not on the new test's isolated input. Fixture cleanup makes execution order irrelevant to the behavior each test intends to verify.

Incorrect Answers

A:

This hides the dependency in the suite's ordering. Other tests or a different runner can reintroduce the same leaked state.

C:

Retries can mask contamination without removing it. The suite would still depend on which state earlier tests leave behind.

D:

That expectation no longer verifies the new test's declared starting conditions. It legitimizes an accidental dependency between otherwise separate cases.

Question 254

A CI job asks Claude Code only to review a pull-request diff. Which permission design fits the job?

  1. Provide the read and analysis capabilities needed for review without deployment or repository-write credentials.
  2. Store a personal administrator token inside the review prompt.
  3. Give the job production deployment access in case it finds a bug.
  4. Grant administrator access to every repository in the organization.

Explanation

Correct Answer

A:

A review job can assess the diff without inheriting unrelated publishing authority. Read permissions should cover the code and context necessary for the finding. Deployment credentials contribute no useful capability to a task that only analyzes a pull request.

Incorrect Answers

B:

Embedding a powerful credential in prompt text is unnecessary for examining the diff.

C:

Potential future fixes do not justify production authority for a read-only review task.

D:

Organization-wide privileges exceed the scope of the single pull-request review.

Question 255

An external pull request modifies a script that a privileged review workflow would execute. What should the workflow designer do?

  1. Trust the script because the pull request has a familiar title.
  2. Run the changed script with production secrets so the review is realistic.
  3. Ask the model to promise that the script is harmless and then execute it unrestricted.
  4. Separate untrusted-code execution from privileged credentials and apply the repository's trusted workflow policy.

Explanation

Correct Answer

D:

Isolation and trusted workflow controls prevent the review process from granting unintended authority to branch content. A review workflow may inspect untrusted changes without executing them in a privileged environment. Any necessary execution should run under the appropriate isolated credential and resource boundaries.

Incorrect Answers

A:

A title does not establish the safety of code submitted in the branch.

B:

Executing contributor-controlled code with sensitive credentials creates an avoidable exposure path.

C:

A verbal assurance is not an isolation boundary for untrusted code.

Question 256

A generated patch changes a field from a signed 64-bit integer to a signed 32-bit integer to save memory. The documented input range includes 3,000,000,000. Existing tests use only values below 1,000. What review finding is supported?

  1. The new representation cannot hold every valid input; retain sufficient range and test the boundary.
  2. Use an unsigned 16-bit field because all current fixtures are nonnegative.
  3. The change is safe because both types store integer values.
  4. Reject all inputs above 1,000 because that is the largest tested value.

Explanation

Correct Answer

A:

A signed 32-bit integer ends at 2,147,483,647, below the permitted 3,000,000,000. The test suite's small fixtures do not cover the compatibility failure introduced by narrowing the field.

Incorrect Answers

B:

A 16-bit representation is even smaller and still excludes the documented value. Nonnegative fixtures do not justify discarding the required range.

C:

Sharing an integer category does not imply an identical representable range. The declared input exceeds the maximum signed 32-bit value.

D:

The test data is not the public input contract. Restricting valid inputs to observed fixtures would introduce a separate incompatible behavior.

Question 257

A review model reports the same null dereference once for each caller of one faulty helper. How should the report be organized?

  1. Publish all repeated reports as unrelated critical defects.
  2. Delete every finding because duplicate wording makes the issue invalid.
  3. Consolidate the shared root cause and list distinct affected paths where relevant.
  4. Keep only the first reported caller and omit the shared helper and other affected paths.

Explanation

Correct Answer

C:

A single evidence-backed finding avoids duplication while retaining the impact across callers. Several call sites can expose one faulty implementation rather than several independent defects. Consolidation should preserve the affected paths that help establish reachability and impact.

Incorrect Answers

A:

Separate entries would exaggerate the number of independent root causes.

B:

Redundancy does not eliminate a genuine defect in the shared helper.

D:

A first-come reduction can hide the root cause and understate its relevant impact.

Question 258

A changed line appears unsafe in isolation, but its caller may already validate the input. What should the reviewer do before filing a defect?

  1. Assume unchanged callers always guarantee safety.
  2. Assume every changed line lacks all surrounding validation.
  3. Treat a matching static-analyzer pattern as a confirmed reachable defect without inspecting its assumptions.
  4. Inspect enough surrounding code and call-site context to test the suspected failure path.
  5. File the issue from the changed line alone and ask the author to prove that every possible caller is safe before reviewing any surrounding code.

Explanation

Correct Answer

D:

Relevant context can confirm whether the vulnerable condition is reachable or already prevented. A local expression can be safe because of a preceding invariant or unsafe because callers omit it. The review needs enough context to distinguish those cases before declaring a defect.

Incorrect Answers

A:

A caller's age does not prove that it enforces the required invariant.

B:

Ignoring existing checks can create a false positive.

C:

A pattern can identify a useful candidate, but existing call-site validation may make its failure condition unreachable. The review must check the relevant context.

E:

A reviewer should first gather available context that can establish or refute the failure. Burden-shifting without inspection increases speculative findings.

Question 259

A service is deployed gradually, so old and new application versions run together. A patch immediately renames a database column that the old version still reads. Which rollout design preserves compatibility during the overlap?

  1. Rename the column first and rely on the old version's retries until its instances are replaced.
  2. Expand the schema compatibly, migrate readers and writers with backfill as needed, then retire the old column after old instances are gone.
  3. Update only the database documentation because both column names describe the same data.
  4. Deploy the new code everywhere before adding the column it expects.

Explanation

Correct Answer

B:

An expand-and-contract rollout keeps required representations available through the mixed-version interval. Removing the old representation is safe only after its consumers and migration dependencies have been retired.

Incorrect Answers

A:

Retries cannot make a removed column available to old code. The overlap would contain instances that consistently query an incompatible schema.

C:

Documentation cannot alter the identifiers used by running queries. Equivalent meaning does not preserve executable compatibility after a schema rename.

D:

This reverses the incompatibility: the new application would reference schema that is not available yet. Deployment order must support both versions at each stage.

Question 260

A review job fetches the current branch after it has advanced, but its report is attached to an older commit. What should be fixed?

  1. Remove commit identifiers from all reports.
  2. Increase the model's output-token allowance.
  3. Bind checkout, analysis, and reported findings to the same intended commit identifier.
  4. Assume all commits on one branch have identical content.

Explanation

Correct Answer

C:

Revision consistency makes the findings reproducible and relevant to the exact code under review. Branch names can advance between queueing and checkout. Recording the exact analyzed commit prevents findings from being attached to code that was never inspected.

Incorrect Answers

A:

Hiding revision information makes the mismatch harder to detect.

B:

More response capacity does not align the inspected code with the reported revision.

D:

A branch can move between revisions with materially different code.

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