Commit Graph

15 Commits

Author SHA1 Message Date
BFlat 09fdc72e8d Saves from two threads at once never collide or mix a project file (#311)
The engine had its own `write_atomic` (used for `craft.json`, the inbox, reports and session files). Its temp file was named by process only, so two threads saving the same file at once wrote into one temp file. One rename then found it gone ("craft.json: No such file or directory"), and the file could end up with two versions mixed ("trailing characters").

The engine now uses the platform crate's `write_atomic`, which already gave each write its own temp file and kept the file's permissions. It also gains the engine's short retry when Windows briefly can't replace a file another program holds open. There is one atomic writer now; docs/pitfalls.md says so.

**Verified:**
- A new engine test: four threads each save one file 50 times and read it back. Every save succeeds, every read is one whole version, and no temp files are left. It fails against the old engine writer (checked) and passes now.
- The existing "file held open for a moment" test still passes.
- `cargo test -p craft-anything-engine` (397), the platform fs tests, clippy on both crates and fmt.

**Not covered:** two saves that overlap can still each start from what was on disk, so the later one wins for fields that aren't the person's (the person's fields are kept, as before). That's separate from the write itself.

Fixes #273
2026-11-02 14:45:46 +07:00
Brandon Thomas da83b81be2 A build stops with a plain message when craft-anything-cli is missing (#226)
A local build by Claude Code, Codex or an ACP agent now checks that craft-anything-cli starts before studying or starting the agent. When it is missing or won't start, the build stops with a plain message and what to do, instead of Claude Code's "MCP tool not found" error. A check that times out lets the build go ahead, and stopping the build ends the check.

Refs #91, #64, #113.
2026-11-02 13:16:39 +07:00
BFlat 3f15887891 The Windows app no longer starts OpenGL, which crashed some Intel drivers before the window opened (#198)
eframe starts every wgpu backend before an adapter is picked, and starting GL loads the system's OpenGL driver; Intel's ig9icd64.dll crashed in it (0xc0000005), so the app vanished with no window or error box. Windows now starts the primary backends only (DX12 with WARP, Vulkan); WGPU_BACKEND still decides when set.

Fixes #196
2026-11-02 08:10:17 +07:00
BFlat 39ca993b20 Pitfall: never type python - with a heredoc (#181)
Strengthens the pitfall about python - heredocs waiting for input.
2026-11-02 05:35:42 +07:00
BFlat 09bb4f3757 Pitfall: merge the commit CI tested, not a head read later (#150)
Adds a pitfall: merge with --match-head-commit set to the commit the green run tested.
2026-11-02 03:52:08 +07:00
BFlat 9d3ea967fb Translate the agent program setting into Chinese (#122)
Both Chinese catalogs get the five strings #117 added, so cargo xtask i18n-coverage passes again on main; pitfalls.md notes the case.
2026-11-02 00:51:01 +07:00
Agapenor 6787ae4852 The Agent console keeps its size instead of growing until its tabs are cut off (#81)
The conversation's history counts the item spacing and the prompt row is top-aligned, so the Agent console's panel no longer grows 17 points a frame until its tabs are cut off.
2026-11-01 23:32:19 +07:00
BFlat 1b54cbf99e The macOS app ships craft-anything-cli beside its executable (#99)
The DMG's app had only craft-anything, so the app couldn't start its MCP server and every Claude Code build failed with no tools. The CLI is now copied into Contents/MacOS, signed like its zip, and run from the finished DMG before release.
2026-11-01 22:56:07 +07:00
muraa-p 793e47ce0f Find the Windows shim, not npm's POSIX script, for a bare program name (#51)
On Windows, which() tries PATHEXT names before the bare name, so npm's .cmd shim is found instead of the extensionless POSIX script beside it (#41).
2026-11-01 18:40:44 +07:00
BFlat b43d1e8d14 Coding agents installed with npm on Windows start instead of "isn't on your PATH" (#23)
npm installs Gemini CLI, Codex and often Claude Code on Windows as .cmd shims. They were found,
but Rust starts only .exe files by bare name, so every build stopped with "gemini isn't installed
or isn't on your PATH". An npm (or pnpm) shim's script now runs with Node directly, so a prompt
with line breaks or over cmd.exe's 8191 characters arrives whole; any other batch file starts by
its full path. The usual Windows install folders (~\.local\bin, npm, bun, cargo) are searched
after PATH.

Fixes #18
2026-11-01 14:34:51 +07:00
Brandon Thomas 7ecce402f9 Try again picks up where a build stopped instead of starting over (#8)
A run with no message was read as a first build, so Try again studied the
original again and gave the builder the first brief, even with its session
saved. A run now carries on when the builder has already worked, and only
runs the check when the builder had finished (awaiting_check in craft.json).

A check that returns an error couldn't look at the build at all, so it gets a
second go, and then the run says the build is finished but couldn't be checked.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:01:22 -04:00
Brandon Thomas 292d5af06e Stop deadlocks as they form and watch every lock for one that never lets go (#5)
* Stop deadlocks as they form and watch every lock for one that never lets go

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Give the stuck-lock banner's test a program of its own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:28:16 -04:00
Brandon Thomas 6a120011a1 Explain failed agent runs, keep a log to open, and stop offering git servers as computers (#3)
* Explain failed agent runs, keep a log to open, and stop offering git servers as computers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix a lock-up: the build's agent setup took the session lock twice in one statement

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:27:44 -04:00
BFlat 62700f5c69 Built by no longer offers a GitHub SSH key as a computer, and finds Claude Code on a Mac opened from the Dock (#4)
SSH hosts that point at a git server (named after one, or with its HostName or User git) are left out of the AIs found on the computer and the remote-machine picker. Programs are looked up and started with PATH plus the usual install folders (~/.local/bin, Homebrew, npm, bun, volta, cargo), which a Mac app opened from the Dock doesn't get.
2026-10-31 23:48:53 +07:00
Brandon Thomas f64ae3bf3c Craft Anything
A native, pure-Rust app that shows anyone how a piece of software works, with
evidence-backed answers, then helps them rebuild it. It ships a desktop app, a
CLI and an MCP server, all driven by one engine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:52:14 -04:00