Question 160
A synchronous endpoint has a three-second deadline. Its retry policy can wait ten seconds. What must be reconciled?
- Only the timeout of the last attempt.
- Only the average response time of successful requests.
- The total retry and timeout budget with the endpoint deadline.
- Only the maximum number of attempts, ignoring backoff duration.
Explanation
Correct Answer
C:Per-attempt settings must fit the overall request contract; otherwise recovery guarantees an unacceptable response delay.
Incorrect Answers
A:The endpoint deadline includes earlier attempts and backoff, so a final-attempt limit does not bound the entire retry sequence.
B:An average success metric does not enforce the maximum time a failing request can spend in retries.
D:Attempt count alone does not bound total elapsed time when each attempt and delay consumes the endpoint deadline.
Question 161
A tool opens a temporary file and then raises an exception. Which implementation ensures resource cleanup?
- A context manager or finally block covering the resource lifecycle.
- Cleanup code only after a successful return.
- An assumption that exceptions delete all files.
- A prompt asking the model to remember cleanup.
Explanation
Correct Answer
A:Cleanup must execute on failure as well as success so interrupted operations do not leak handles or temporary resources.
Incorrect Answers
B:That path is skipped when an exception exits earlier.
C:Exceptions alter control flow but do not automatically remove arbitrary filesystem resources.
D:The resource is owned by application code; cleanup should not depend on a later model decision.
Question 162
A wrapper converts every exception into “model failed,” losing its original cause. What improves debugging?
- Keep the exception message but discard its type and causal chain.
- Copy the complete raw request into every error log for context.
- Preserve structured error category and safe causal context.
- Catch every failure and return the same empty result object.
Explanation
Correct Answer
C:The caller needs to distinguish serialization, network, authorization, and generation failures without leaking sensitive details.
Incorrect Answers
A:Messages alone can be inconsistent or ambiguous across layers. Structured categories and safe causal context support reliable diagnosis.
B:The request may contain secrets or private data. Diagnosis should retain relevant sanitized evidence instead of indiscriminate payload logging.
D:That removes distinctions needed for recovery and can make a failed call indistinguishable from a valid empty result.
Question 163
A regression test fetches a changing public webpage each run. Why might results vary without a code change?
- The changing webpage should be treated as an immutable regression fixture.
- An unchanged application commit guarantees identical regression inputs.
- Every variation proves a production regression.
- The test input itself can change.
Explanation
Correct Answer
D:A moving external source prevents isolation of application changes; use controlled fixtures when testing stable behavior.
Incorrect Answers
A:External content can change independently of application code, so the test may compare different inputs between runs.
B:The fetched page is outside that commit and can change independently. Reproducible comparison requires controlling the external fixture too.
C:Different inputs can legitimately produce different outputs, so changes need a controlled comparison.
Question 164
A worker reads a prompt before deployment and its schema after deployment, producing a mixed version. What avoids this?
- Choose whichever file was modified most recently.
- Load one coherent versioned configuration snapshot per request.
- Read each setting repeatedly at arbitrary points.
- Disable schema checks.
Explanation
Correct Answer
B:The request should use components from the same compatible release rather than observing a partially updated configuration.
Incorrect Answers
A:Recency alone does not prove the files belong to a compatible release.
C:Repeated independent reads can increase exposure to mixed versions.
D:Suppressing detection does not make mixed contracts compatible.
Question 165
A tool has tests only for valid inputs and successful responses. Which additions most improve boundary coverage?
- Assertions that every call succeeds.
- More copies of the same successful request.
- Only response-time benchmarks using valid authorized requests.
- Malformed inputs, denied access, timeouts, and downstream failures.
Explanation
Correct Answer
D:These cases exercise the conditions where the wrapper must reject, recover, or preserve safety rather than follow its happy path.
Incorrect Answers
A:That assumption prevents meaningful testing of expected rejection and failure outcomes.
B:Duplicating one case adds little coverage of untested failure behavior.
C:Performance measurements on successful requests do not exercise rejection, timeout handling, or downstream failure boundaries.
Question 166
A job UI receives event version 8 marking a run completed, then a delayed version 7 marking it running. The event contract orders state changes by version. What should the client do?
- Ignore the older state update for that run.
- Apply the most recently arrived event regardless of its version.
- Choose state using local arrival time instead of the event version.
- Delete the completion event because its message arrived first.
Explanation
Correct Answer
A:The lower version describes an earlier state even though it arrived later. Tracking the latest applied version prevents network reordering from moving the UI backward.
Incorrect Answers
B:Arrival time is not event order under this contract. This would incorrectly return a completed job to a running state.
C:Arrival order can differ from causal state order, as the delayed event demonstrates. The event contract explicitly makes version the ordering authority.
D:The higher version remains authoritative. Discarding it would prefer transport timing over the ordering rule supplied by the service.
Question 167
A document assistant gives a factual answer. What interface feature helps a user assess its support?
- Replace references with generic “verified” badges.
- Hide the source version to simplify the screen.
- Show only a larger confidence percentage.
- Show source references that open the relevant underlying passages.
Explanation
Correct Answer
D:Provide the relevant passage or source reference so users can check whether the cited material actually supports the nearby claim.
Incorrect Answers
A:A badge without accessible evidence does not establish the claim’s basis.
B:Removing version information makes stale or mismatched evidence harder to detect.
C:An uncalibrated confidence value does not expose supporting evidence.
Question 168
A user edits an earlier instruction after downstream analysis was generated. What should the application manage explicitly?
- Keep all later answers and silently pretend they used the edit.
- Assume all later answers remain correct regardless of the change.
- Overwrite the earlier text without tracking the branch.
- Which dependent messages are invalidated or recomputed on the edited branch.
Explanation
Correct Answer
D:Later answers may depend on the original text. History editing needs clear dependency semantics to avoid mixing incompatible conversation states.
Incorrect Answers
A:That misrepresents the context from which those answers were generated.
B:A changed instruction can materially alter the required analysis or permitted actions.
C:Untracked mutation makes the resulting transcript’s causal history misleading.
Question 169
A long-running generation is submitted through a web application. What should the initial response provide for later status checks?
- A stable job identifier with a documented status lifecycle.
- A success status before generation completes.
- The model’s system prompt as a tracking token.
- Only an instruction to resubmit until an answer appears.
Explanation
Correct Answer
A:A stable job identifier links later polling or event delivery to the submitted operation. The client can retrieve its outcome without keeping the original connection open or creating a new job.
Incorrect Answers
B:Acknowledging acceptance is different from reporting the completed job’s outcome.
C:Prompt contents do not uniquely identify the submitted execution.
D:Resubmission can create duplicate jobs instead of observing the original operation.
Question 170
A browser disconnects while a backend generation continues. What design avoids accidentally starting another run on reconnect?
- Reconnect to the existing run using its recorded state.
- Assume disconnecting the browser canceled all backend work.
- Erase the run identifier when the screen reloads.
- Create a new generation for every socket reconnect.
Explanation
Correct Answer
A:Connection lifetime and task lifetime differ. A stable run record lets reconnection observe work already in progress.
Incorrect Answers
B:Backend cancellation requires an implemented mechanism, not an assumption about client connectivity.
C:Losing identity makes recovery and correlation unnecessarily difficult.
D:This duplicates work and may create conflicting or repeated side effects.