Skip to content

Week 2 self-check answer guidance

Use these explanations after a first attempt. They describe the evidence a student should be able to reproduce from the proposal, schema and checks.

Q1

The research artifact names the permission test and its revision; the plan repeats the read-only boundary; the schema constrains the path; and the negative case attempts a write under reports/ and expects an unchanged state.

Q2

The plan phase lost the boundary. Read the current permission test and the export handler, record the paths and unknowns, then write a case that distinguishes an allowed path from a forbidden one before editing.

Q3

For example: “Given a row without id, when export is requested, then no file is written and the result is invalid row: id.” Run it against a fresh temporary directory and check both the result and the directory contents.

Q4

The model can attempt any string. The handler must reject a path outside out/ before writing. The error should name path and say to use an out/<name>.csv path.

Q5

The unknown-field rule is schema-level. The description-level request is not evidence of runtime enforcement unless a visible handler or runtime check supports it; mark that enforcement as unknown.

Q6

Keep the task and acceptance check, the source of each constraint, current file state, the last failed check and tested revision, remaining unknowns, and the next action. After a write, rerun the acceptance case on the new revision.

Q7

Return the refusal under the call's ID as the next tool observation. It should identify the rejected field and the repair, then let the model choose a corrected call. A refusal is an observation about one attempted input; it does not show that the requested outcome was achieved, so the controller must still verify the resulting state.

Q8

Separate the requested behavior from enforcement. Identify the schema rule, the handler check and any runtime boundary you can see. If the source does not show a check, write “cannot tell” and propose the smallest call that would reveal it.

Spaced retrieval

Retrieval 1. Add a research row naming the read-only test and a negative case that attempts the forbidden write; verify both against the current revision.

Retrieval 2. Make the error identify path and the allowed out/ form, then run a valid and invalid call and keep both observations.