Skip to content

Agent config & docs to explain how files_manager works e.g. in a test contest #1719

@nathanjmcdougall

Description

@nathanjmcdougall

In #1652, the agent wrote a test but mis-diagnosed why something wasn't working.

The key issue was a lack of understanding of how the files_manager context manager works.

Basically, when entering its context, it will place a lock on all known config files, and then if any are accessed during the context, they will be read. There are atomic writes that take place when exiting the context manager.

This sort of information would be really useful to add to the docstring.

But also, we should let the agent know in the context of testing that it needs to be careful to consider the logic of whether two function calls properly belong in the same files_manager context (so that the atomic writes actually take place before trying to access the files using file system operations, etc.) or whether it is safe to run both commands in the same files_manager context - if they are both using FileManager-style access (which allows the commands to access "uncommitted" changes). In general, running anything via a subprocess requires an atomic write a.k.a. a flush to take place beforehand.

Metadata

Metadata

Labels

agentConfiguration updates for LLM coding agentsdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions