Skip to content

Write a deleted command runner again, new queue commands, tighter doc test - #14

Merged
necessarylion merged 2 commits into
mainfrom
low-fixes-148-239
Nov 6, 2026
Merged

necessarylion merged 2 commits into
mainfrom
low-fixes-148-239

Conversation

@mydoxie

@mydoxie mydoxie commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
  • [239] runner: another dox can delete .dart_tool/dox/commands.dart between the exists check and the read. This run crashed then. Done: the cache path no longer checks first. It reads the file, and when the read fails it writes the file again from the cache. Test added (runner deleted, cache kept).
  • [239] stub test: the doc comment test flagged any <, even a < b. Done: it now flags only a tag like <String> or </p>.
  • [148] --step 2 (with a space): already works on main, with a test (confirm_drop_test.dart). Nothing to do.
  • [148] --batch N: skipped. Migrator.rollback in dox_migration (dox-orm repo) has no batch option, and bin/migrate.dart does not read --batch. That must land in dox-orm first. Then the CLI only needs to pass --batch on, like --step.

Tests: dart format, dart analyze --fatal-infos, dart test (143 passed).

  • [queue] New queue:clear [queue], queue:restart and queue:prune-failed [--hours=N]. They run bin/queue.dart clear|restart|prune-failed, like the other queue:* commands. The queue:work help now lists --backoff, --max-jobs, --max-time and --memory (passed on as is). Test cases added. These commands need dox_queue with Job options, worker limits, queue commands, fake fixes dox-queue#18 to run; with an older dox_queue, bin/queue.dart does not know them.

…nt test

Another dox can delete .dart_tool/dox/commands.dart between the check
and the read. This run crashed then. Now a missing runner is written
again from the cache.

The stub doc comment test now flags only a tag like <String>, not any
'<' like 'a < b'.
They run bin/queue.dart clear, restart and prune-failed from dox_queue.
The queue:work help now also lists --backoff, --max-jobs, --max-time
and --memory.
@mydoxie mydoxie changed the title Write a deleted command runner again, tighter doc comment test Write a deleted command runner again, new queue commands, tighter doc test Nov 6, 2026
@mydoxie

mydoxie commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Bot review

Blocking: none.

Non-blocking:

  • queue:clear help says "Delete all waiting jobs". In dox-queue#18 the Redis clear also deletes delayed and reserved (running) jobs. A clearer text: "Delete the jobs of a queue (default queue: default)", like the dox-queue README.
  • queue:restart only works when the workers share a cache store (not memory). The help could say so in a few words. Optional.
  • queue:prune-failed --hours 48 (with a space) is 2 args, so maxArgs: 1 rejects it. --hours=48 works. Fine, the help shows --hours=N.

Checked:

  • Runner fallback: only FileSystemException on the read is caught. Then the file is written once with _writeAtomic. A write error (like no write permission) still throws, so real errors are not hidden. No loop. A wrong runner text was already rewritten before this PR.
  • A missing runner used to start a full discovery. Now it is written from the cache. Same result, less work.
  • New queue commands go through runQueue -> Process.start with a list of args. No shell string.
  • Doc test regex <[A-Za-z/] still catches <String> and </p>.
  • CHANGELOG under ## Unreleased, no version bump. README updated.
  • Local, with sibling overrides: dart format 0 changed, dart analyze --fatal-infos no issues, dart test 143 passed.

@necessarylion
necessarylion merged commit 6a9a6d3 into main Nov 6, 2026
1 check passed
@necessarylion
necessarylion deleted the low-fixes-148-239 branch November 6, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants