Commit Graph
4 Commits
Author SHA1 Message Date
Chris Tate 2b657e6e3c Format the split tools' output with the tools checkout's oxfmt configuration
The split tools ran oxfmt in the checkout they rewrite. oxfmt looks up
its configuration from that directory and from the formatted files'
directories, and runs an oxfmt.config.ts it finds there, so a branch that
rehome-split rewrites could run code with the maintainer's permissions.
The tools now format through format.mjs, which passes the tools
checkout's .oxfmtrc.jsonc with --config and disables the nested lookup,
so no configuration file of the rewritten checkout is read or run. With
no files to format it does nothing, where oxfmt would format the whole
directory.

The split-tools tests cover split-methods and move-state on a checkout
whose root and src directory commit an oxfmt.config.ts that records it
ran.
2026-10-22 11:12:02 -05:00
Chris Tate bde0b64004 Test that move-state refuses a state file committed as a link outside the checkout
A branch can commit the file a state group writes (or that the config
creates from a template) as a symlink. The split tools resolve every path
they read or write through confine.mjs, so move-state refuses such a file
instead of appending the state through the link. The test covers that
path: the group file is listed under create, exists as a link to a file
outside the checkout, and the tool exits with an error and leaves the
outside file unchanged.
2026-10-22 05:36:03 -05:00
Chris Tate d244b84931 Keep the split scripts' reads and writes inside the worktree 2026-10-21 03:47:21 -05:00
Chris Tate 71e3dc5b80 Keep shorthand-property imports in split methods and treat extends as a value use in split modules 2026-10-21 03:21:11 -05:00