Question 360
Two unrelated applications share one production API credential. One application's deployment account is compromised. What design reduces the blast radius of similar incidents?
- Store the shared key under two environment variable names.
- Give both applications the account owner's master password.
- Use the same key but different prompt prefixes.
- Use separate scoped credentials and identities for each application.
Explanation
Correct Answer
D:Identity separation supports independent revocation, attribution, and access limits across applications. A compromised application can then lose its own access without automatically interrupting or exposing every other service using the provider.
Incorrect Answers
A:Different variable names still reference the same underlying credential and access scope.
B:A broader shared credential increases the impact of either application's compromise.
C:Prompt contents do not partition the permissions associated with a shared credential.
Question 361
An agent's parent process holds a provider key in its environment. It launches an unrelated conversion script that does not need that key. What should the launcher pass to the child?
- The parent environment after removing only variables beginning with SECRET_.
- A renamed copy of the same key variable.
- The entire parent environment because the key is not a command-line argument.
- A minimal environment containing only the child task's required variables.
Explanation
Correct Answer
D:Child processes can inherit sensitive parent variables by default. Explicitly constructing the environment prevents an unrelated script from receiving credentials it does not need.
Incorrect Answers
A:Secret-bearing variables need not use that prefix. A required-variable allowlist more directly prevents unnecessary inheritance by this child.
B:A different name does not change the secret value or the child's ability to read and disclose it.
C:Environment variables are still available to the child. Omitting a secret from argv does not prevent exposure through inherited process state.
Question 362
Usage attributed to a service key rises sharply from an unexpected workload. Which response best combines containment and investigation?
- Raise the spending limit immediately to prevent errors.
- Assume the model became more verbose and take no action.
- Assess the activity, restrict or revoke suspected credentials, and investigate usage records.
- Delete usage logs so the suspicious entries disappear.
Explanation
Correct Answer
C:The response addresses ongoing access and gathers evidence about scope, while replacement credentials can restore authorized service safely.
Incorrect Answers
A:Increasing capacity can worsen an abuse incident before the cause is understood.
B:Unexpected workload attribution requires verification; answer length alone does not explain the access anomaly.
D:Destroying evidence does not stop credential use and impairs incident investigation.
Question 363
A private credential was committed to a repository and later deleted from the current file. Why is deletion alone insufficient?
- Private repositories cannot expose credentials to collaborators or automation.
- Git automatically replaces the deleted credential with a new provider key.
- A deleted line remains active only if the model repeats it.
- Earlier commits or copied artifacts may still contain a usable credential.
Explanation
Correct Answer
D:Removing the current text does not revoke the secret or erase existing copies; credential rotation addresses continued usability.
Incorrect Answers
A:Repository access, logs, clones, and automation can all create additional copies or exposure paths.
B:Version control does not rotate external service credentials.
C:Credential validity is determined by the service, independently of future model output.
Question 364
A tool contract defines x_norm = x/width and y_norm = y/height. A screenshot is 800 by 600 pixels, and the target point is x=400, y=150. Which arguments match the contract?
- x_norm=2, y_norm=4.
- x_norm=400, y_norm=150.
- x_norm=0.5, y_norm=0.1875.
- x_norm=0.5, y_norm=0.25.
- x_norm=0.25, y_norm=0.5.
Explanation
Correct Answer
D:Apply each coordinate's own dimension: 400/800 is 0.5 and 150/600 is 0.25. The calculation uses the explicit normalization rule rather than an assumed display scale.
Incorrect Answers
A:These values invert the required ratios by dividing dimensions by coordinates. The contract specifies coordinate divided by dimension.
B:These are raw pixel coordinates, not the fractions required by the tool. Supplying them violates the stated representation.
C:The vertical value incorrectly divides by the screenshot width. Each axis must use its corresponding dimension under the given contract.
E:This swaps the computed horizontal and vertical fractions. The tool would target a different point even though both values lie in the allowed numeric range.
Question 365
A scheduling tool receives a local time that does not exist because clocks jump forward in the specified timezone. The contract forbids silently shifting user appointments. What should it return?
- A validation result explaining the invalid local time and requesting a valid alternative.
- An empty result with no reason.
- A UTC timestamp produced by ignoring timezone rules.
- A success result after adding one hour without disclosure.
- A success result using the server's timezone.
Explanation
Correct Answer
A:Timezone-aware validation must detect the clock-change gap; the stated policy requires clarification instead of inventing a replacement appointment.
Incorrect Answers
B:The caller needs the specific repairable issue to obtain a valid scheduling input.
C:Ignoring the zone can create a real instant that does not represent the requested local time.
D:An automatic shift violates the explicit contract against silently moving appointments.
E:Changing timezone silently alters the user's requested local appointment and does not resolve their intent.
Question 366
An update tool receives values identical to the record's current values. Its documented behavior is to perform no write. What result best supports accurate agent reporting?
- A failure stating that the record does not exist.
- A claim that a new record was created.
- A successful no-change result distinguishing unchanged state from an applied update.
- A fabricated modification timestamp.
- An instruction to retry until a write occurs.
Explanation
Correct Answer
C:The requested state is satisfied, but the tool should not claim that a mutation occurred when none was necessary.
Incorrect Answers
A:The record exists; no change needed is not a missing-resource error.
B:The operation neither created a new entity nor changed the existing one.
D:Inventing a write timestamp obscures actual backend history and can mislead later audits.
E:Repeated identical requests cannot create a legitimate need to change already matching values.
Question 367
A read-only catalog tool successfully returns zero matches. How should that result be represented to Claude?
- As a timeout so the agent retries indefinitely.
- As a successful purchase confirmation.
- As a successful lookup with an empty result set.
- Omit the tool result entirely.
- As a fabricated closest match without indicating the substitution.
Explanation
Correct Answer
C:An empty set is a valid result of a successful read. Report that no matches were found and consider an authorized query refinement without misclassifying the outcome as an outage.
Incorrect Answers
A:A completed empty lookup does not become a network failure simply because no records matched.
B:A lookup neither found a product nor performed a purchase.
D:Withholding the result prevents the model from understanding the completed lookup and responding appropriately.
E:Inventing a match misrepresents the catalog's actual response.
Question 368
An inventory tool rejects quantity=-3. Which error message is most useful for a corrected call without exposing implementation details?
- "Retry the identical request immediately."
- "Success: quantity accepted."
- A full stack trace containing connection strings.
- "Something went wrong."
- "quantity must be a positive integer; no inventory was changed."
Explanation
Correct Answer
E:This identifies the repairable argument constraint and clarifies that the failed call produced no side effect.
Incorrect Answers
A:Repeating the same invalid quantity cannot satisfy the stated input constraint.
B:A false success prevents correction and misleads the agent about inventory state.
C:Internal traces can expose secrets and distract from the actionable validation issue.
D:A generic message supplies no information about which argument needs correction or whether the operation changed state.
Question 369
A search tool defines distance=0 as an exact match and larger distances as less similar. An adapter sorts results from largest distance to smallest. What is the correction?
- Convert distances to strings and sort them lexicographically.
- Invert the numbers but leave the resulting ranking direction unspecified.
- Keep descending order because every numeric search score is higher-is-better.
- Sort ascending when ranking by this distance field.
- Treat a zero distance as a failed search.
Explanation
Correct Answer
D:The tool's documented metric is a distance, so smaller values represent closer matches. Treating it as a higher-is-better similarity score reverses the intended ranking.
Incorrect Answers
A:Lexical ordering need not match numeric magnitude, for example with values of different digit lengths. Rank by the documented numeric distance.
B:Transforming a score without defining its interpretation can preserve or introduce ordering mistakes. Direct ascending numeric distance implements this contract.
C:Different metrics have different directions. The field's documented semantics, not the generic word score, determine the ordering.
E:The contract explicitly defines zero as an exact match. Reclassifying it as failure reverses the strongest available match signal.
Question 370
A tool paginates a static dataset ordered by created_at. Several records share the page-boundary timestamp, but the cursor stores only that timestamp and the next page uses created_at greater than it. What prevents skipped records?
- Use a unique tie-breaker in both ordering and the continuation cursor.
- Restart from the first page whenever a duplicate timestamp appears.
- Use a client-generated timestamp as the next cursor boundary.
- Drop records with repeated timestamps before pagination.
- Increase the page size by one and keep the timestamp-only cursor.
Explanation
Correct Answer
A:The timestamp alone cannot identify a position within equal-time records. A consistent composite order, such as timestamp plus record ID, lets the next-page predicate continue after the exact last record.
Incorrect Answers
B:Restarting does not establish forward progress through the tied records and can repeatedly return the same page.
C:The cursor must identify position in the dataset's ordering. A new client timestamp can jump past unseen records rather than disambiguate equal creation times.
D:Equal creation times do not imply duplicate records. Deleting those entries would lose distinct data rather than make pagination complete.
E:An arbitrary number of records can share a timestamp. A slightly larger page does not guarantee that every tie fits before a boundary.