Skip to content

First measurements and the no-wrapper fallback can still overload the machine #49

Closed

Description

@sourcehawk

Problem

The memory queue of bounding-heavy-commands still lets several agents load the machine together in three cases. A first measurement of a command (--measure with no --memory) takes only the default budget, a quarter of the machine, while the true peak is not known: three sessions can measure three unknown commands together, and on a machine with no hard cap (macOS) nothing stops them. On a machine where the wrapper cannot run, the fan-out skill dispatches the full wave in parallel and no lock makes the subagents take turns. And Ctrl-\ (SIGQUIT) ends the wrapper but not the command, so on macOS the command lives on while its slots count as free.

The skill also records a budget from a measurement that stopped early, such as a test suite that stops at its first failure. That budget is too small, and it stays in the record.

These came from the last automated review of #47, which arrived after the merge.

Expected behaviour

A first measurement runs alone in the queue. With no wrapper, only one subagent at a time can run a heavy command. A stop signal from the terminal ends the command with the wrapper. The record holds a budget only from a run that did its full work.

Acceptance criteria

  • --measure with no --memory takes each slot of the queue, and a second bounded command waits until it ends.
  • --measure with --memory takes the slots of that budget, as before.
  • The wrapper sends SIGQUIT to the command and ends with exit code 131.
  • The skill tells the agent not to record a budget from a run that stopped before its full work, and to measure again at the next full run.
  • For a machine where the wrapper cannot run, the skills tell the orchestrator to dispatch one after the other the subagents that run heavy commands.
  • The README does not say that the queue protects the machine for a command that was never measured on a machine with no hard cap.
  • The tests of the wrapper hold no comment that repeats the name of the test or describes the next line.

Context

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions