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. The negative case attempts a write under reports/ and expects the state to stay unchanged.

Q2

The plan phase lost the boundary. Read the current permission test and the export handler, and record the paths and unknowns. Then write a case that tells an allowed path apart 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 three lines of context are a description-level request. Neither is a handler rule. The question offers three labels, but there are only two rules. The request alone does not show that the runtime enforces it. Unless you can see a handler or runtime check that does, 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 name the rejected field and the repair. Then the model can 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 that names the read-only test. Add a negative case that attempts the forbidden write. Verify both against the current revision.

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