Question 290
A maintainer using GitHub Copilot finds, the following condition is confirmed: A code sample references a package removed from a repository months ago. Which approach is the most defensible?
Explanation
Correct Answer
Select the action "Align dependencies and prompts with the current lockfile". Stale assumptions can persist when context is incomplete. It is the specific match for the scenario in which A code sample references a package removed from a repository months ago.
Incorrect Answers
For the different scenario A model asserts that an external API never changes, "Validate against the API's current changelog and pinned version" could be appropriate. Platform interfaces evolve over time. The present requirement is A code sample references a package removed from a repository months ago, which calls for "Align dependencies and prompts with the current lockfile". Stale assumptions can persist when context is incomplete.
"Provide the source file before relying on the explanation" targets An AI answer confidently explains a private function it has never read. Model inference cannot know hidden implementation details. That differs from A code sample references a package removed from a repository months ago; the required decision here is "Align dependencies and prompts with the current lockfile". Stale assumptions can persist when context is incomplete.
The alternative "Consult version-specific documentation and feature matrix" fits another situation: Copilot names a feature unavailable in the team's installed editor version. General model knowledge does not prove current client support. Here the condition is A code sample references a package removed from a repository months ago; use "Align dependencies and prompts with the current lockfile" instead. Stale assumptions can persist when context is incomplete.