mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-15 23:32:46 +00:00
Fabro carried its own Sandbox trait long after every implementation became a thin layer over the sandbox driver: one production type implemented it, a delegation macro forwarded it, and each consumer crate kept hand-written fakes of its thirty methods for tests. The trait existed to be mocked, and the mocks pinned behavior that no provider had — canned walk listings that ignored the traversal root, opaque provider paths, activation failures with no lifecycle behind them. There is now one sandbox type. RunSandbox keeps fabro's semantics — path resolution against the run's working directory, the Bash exec policy, git setup and push, credential refresh — as inherent methods over the driver's exec, filesystem, search, and git facets, and every consumer takes Arc<RunSandbox>. The directory, grep, and walk types are the driver's own, re-exported from fabro-sandbox. The exec policy reports the provider's measured duration rather than its own clock. Tests script a sandbox through fabro-sandbox's MockSandbox: a struct of fields (seeded files, the result every command returns, the platform, a runtime directory) that hands out a RunSandbox over the driver's scripted doubles and reads back what the code did — commands, timeouts, environment, term stops, writes, deletes, existence probes. The hand-written fakes in fabro-agent, fabro-acp, fabro-hooks, fabro-workflow, and fabro-server are gone; the one wrapper a git integration test still needs sits at the driver level, hiding a path from a real Host sandbox. The refresh-ahead loop takes the refresh as a closure so its schedule is tested without a sandbox at all. The driver pin moves to the testing-crate stack head, which gained the double behavior these ports needed: retention caps on scripted output, canned walks narrowed to the requested base, upload and download on the memory filesystem, and recorders for deletes, existence probes, and term stops. One test that modelled a provider handing back opaque object paths from a walk is removed: the driver contract has no such thing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| administration | ||
| agents | ||
| api-reference | ||
| changelog | ||
| core-concepts | ||
| examples | ||
| execution | ||
| getting-started | ||
| human-tools | ||
| images | ||
| integrations | ||
| languages | ||
| logo | ||
| reference | ||
| tutorials | ||
| workflows | ||
| .mintignore | ||
| docs.json | ||
| dot-highlight.js | ||
| favicon.svg | ||