Skip to content

0.1.12: read PowerShell in the guard, watch a command's own process tree, and keep slot paths across restarts

Choose a tag to compare

@tomw1808 tomw1808 released this 07 Nov 07:55
6a4d027

Acts on the field report in #5: 0.1.11 tested live on Windows 11 and Linux.

Update: /plugin marketplace update flash-agents, update the plugin, then run node install.mjs in the plugin folder. A clone: git pull, then node install.mjs.

Fixed

  • The guard reads PowerShell. It now checks PowerShell writes:

    • cmdlets and their aliases, redirects, comma lists and -Param:value;
    • [System.IO.File] calls anywhere in a line.

    Shells started as programs (bash.exe -c, sh -c, pwsh -Command, cmd /c) are read with that shell's rules. Windows paths are resolved the PowerShell way (drive root, UNC, USERPROFILE, both slashes), and names match in any case. A PowerShell deletion of the workspace, its parent or home gets CRITICAL_PATH, like rm. Verdicts are the same on every host OS.

  • The process watcher measures the command's own tree. CPU and new processes are counted from the process that runs the command down, leaving out bwrap, the dsh runner and other sandbox processes. Background jobs are watched and listed. Sampling needs no progress token, and a quiet warning stays in the result. Commands longer than 300 characters are matched. A worker that ends with a background command still running is named. The held-open warning is gone, because the sandbox already ends a call's children.

New

  • Slot paths stay the same across restarts. A slot lives at <state base>/<digest>/slots/<n>, so absolute paths in build caches stay valid.

    A slot is locked by a file written complete in one step: a hard link, or an exclusive open where there are no hard links. The lock names the owner's pid and command line, so no clock is involved. Only the lock holder moves, empties or deletes a slot. A leftover copy is moved aside and salvaged, never erased, and the sweep never deletes a stable slot.

  • timing in every result: queued, prepare, setup, worker, collect and total, on failures too.

  • Changes to the tools:

    • flash_result takes jobIds, and flash_patch and flash_apply take excludeBase;
    • a job that changed nothing stores no patch;
    • idle runtimes stop after 10 minutes, read-only ones included;
    • reports are written atomically and pruned.
  • .flash-agents.local.json may set stateBase per machine. doctor names where the setting came from and flags an invalid file. clean honours it and a symlinked root.

  • flash_status and the plugin settings: the job listing is shorter, the queue line names idle holders, and the slots setting allows up to 16.

  • AGENTS.md gives every worker on this repository its rules, and the delegate skill has a recipe for a warm SwiftPM build per slot.

Verification

1001 unit tests pass (866 in 0.1.11). The live suite passes 119 of 119 on macOS; it was not run on Linux or Windows for this release. Flash workers built the release, every part had an independent read-only review, and every finding is fixed with a test that fails without the fix.