[Factory Experiment] Create run directory on startup with clear error context - #162
Conversation
b22db3b to
bdc2df1
Compare
|
Similar to #164, the factory was unable to see CI failures but I solved it by just prompting it manually instead, which I'm confident the factory would have done automatically if it had access to this github repo (and hence the CI activity on the PR) — or if we had a beefier factory setup that could run |
3b05cab to
dc3ae88
Compare
ejj-agent
left a comment
There was a problem hiding this comment.
AI-generated review draft. This has not been reviewed by a human. Any comments made are non-binding; feel free to ignore them by resolving. This uses the same AI-review process Ethan uses to review his own code.
I found one test coverage gap around the behavior this PR is relying on.
| @@ -137,7 +137,9 @@ impl State { | |||
| /// If a field isn't provided via args/env, we fall back to the state file. | |||
| pub(crate) async fn new(args: Args) -> Result<Self> { | |||
| if let Some(parent) = args.state_file.parent() { | |||
| fs::create_dir_all(parent).await?; | |||
| fs::create_dir_all(parent).await.with_context(|| { | |||
There was a problem hiding this comment.
AI-generated review draft. This has not been reviewed by a human. Any comments made are non-binding; feel free to ignore them by resolving. This uses the same AI-review process Ethan uses to review his own code.
Can we add a regression test where state_file lives under a missing nested directory? The existing state tests use tmpdir.path().join("state.toml"), so they would still pass if the startup path stopped creating /var/lib/intermesh; now that the Docker rootfs no longer pre-creates that directory, the runtime creation is the core behavior this PR depends on.
- Add to calls in State::new() and write_state_file() so directory creation failures produce actionable error messages instead of raw I/O errors - Remove pre-creation of /var/run/ and /var/lib/intermesh/ from the e2e test Dockerfile since the daemon now creates these at runtime
dc3ae88 to
6e77291
Compare
|
Ditto, not sure why Gas Town decided to do more work on this PR all of a sudden, and the commits don't seem related to the review comments… |
Part of an experiment with setting up an automated software factory. Authored by Gas Town on Kilo, using DeepSeek V4 Pro / DeepSeek V4 Flash running on Fireworks. The factory was only fed the content of IM-198, then left completely unsupervised.
Summary
.with_context()tocreate_dir_allcalls inState::new()andwrite_state_file()so directory creation failures produce actionable error messages instead of raw I/O errors/var/run/and/var/lib/intermesh/from the e2e test Dockerfile since the daemon now creates these at runtime/var/run/intermesh/) was already created with proper error context viaAdminServer::bind()Changes
src/state/mod.rs: Add error context wrapping twocreate_dir_allcallsdocker/Dockerfile: Remove two directories from test rootfs mkdir