Question 170
A team needs to review an edit's side effects before code changes are made. Which planning artifact is most useful?
- A single statement saying all changes will be safe
- A generated final commit that exists before edits are reviewed
- A file-by-file plan with tests, rollback and dependencies
- 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?
- A proposed fix, evidence and the authorization checkpoint
- Write the fix despite the read-only boundary
- Erase the potential fix to avoid mentioning uncertainty
- 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?
- Only modify one unit test and assume consumers are safe
- Ignore external contracts because they are not in the current file
- Map dependent consumers and propose staged migration
- 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.
- Use plan or read-only exploration to inspect dependencies and prepare the proposal
- Execute the migration first and document the steps afterward
- Enforce restrictions on write-capable tools until authorization is recorded
- Erase dependency information to keep the plan short
- 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?
- A lower temperature setting as the sole control
- An enforced permission boundary consistent with planning-only work
- A final response that omits mention of the migration
- 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?
- Ask the model to list candidates from memory without reading the repository
- Edit all 100 files immediately and inspect them afterward
- Use bounded exploratory reads and rank candidates before asking to edit
- 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?
- Run focused tests and revise based on actual failures
- Delete the edge-case tests to make the build green
- Ask the model whether it believes the refactor is correct
- 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?
- Tell the model to be much smarter without specifying constraints
- Trust an invented benchmark instead of running one
- State the measured bottleneck and acceptance target
- 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?
- Revise the specific error-handling branch and rerun the relevant test suite
- Ignore the failing case because normal inputs pass
- Revert unrelated files at random to trigger a different model answer
- 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?
- Review the diff, simplify repeated logic and retest
- Accept all generated code if the original bug disappears
- Remove source-control diff inspection from the workflow
- 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?
- Claim success because most tests passed
- Ask for a completely different task to distract from the failure
- Use the assertion failure to fix and retest the affected path
- 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.