Repository navigation
Lint five manifest mistakes that kept costing worker attempts - #157
Open
Poncho1112 wants to merge 1 commit into
Open
Poncho1112 wants to merge 1 commit into
Poncho1112 wants to merge 1 commit into
Conversation
Each rule comes from a mistake that cost real worker attempts in one
operator's runs, recorded when it happened:
- a Claude task whose engine_args end on a list flag (--allowedTools,
--add-dir, ...) swallows the spec Ringer appends after engine_args, and
every attempt dies in seconds with "Input must be provided either through
stdin or as a prompt argument". lint warns and offers the `=` form or the
README's argument order. `run` refuses the task only when the engine's
args_template puts {spec} after {engine_args}, which is when the swallow
actually happens;
- a check with an unbalanced quote (an apostrophe ending a single-quoted
bash -c string early); heredocs are skipped;
- a codex task whose expect_files sit outside its task directory with no
writable_roots;
- `git status --porcelain` without --untracked-files=all, which collapses an
untracked directory into one line and breaks ownership comparisons;
- bash-only syntax (pipefail, [[, <<<) in a check that runs under /bin/sh,
outside a quoted bash -c argument.
The README's variadic-flags paragraph now mentions the per-task case.
Tests: tests/test_lint_footguns.py (12) covers each rule, the look-alikes
that must stay quiet, and run refusing or proceeding by args_template
order. Full suite: 296 tests, all passing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five lint rules, each from a manifest mistake that burned real worker attempts in one operator's runs. They were recorded at the time, and each one kept recurring because nothing caught it before spawn.
claudetask whoseengine_argsend on--allowedTools,--add-dir,--disallowedTools,--mcp-config, ...{engine_args}becomes one more list value; every attempt, retry included, dies in seconds withInput must be provided either through stdin or as a prompt argumentshlex.split(check)fails (heredocs are skipped)bash -c '...'ends the string early; the check dies with a syntax error against correct workwritable_rootsexpect_filesare absolute paths outside its task directory, with nowritable_rootsinengine_argsgit status --porcelain/--shortwithout--untracked-files=alldir/line, so file-level ownership checks fail honest work/bin/shpipefail,[[,<<<outside a quotedbash -cargument/bin/sh(dash on Debian/Ubuntu):set: Illegal option -o pipefailAbout rule 1 and the README. The README already says "Watch for variadic CLI flags… put
{spec}before that flag" forargs_template. This rule catches the same hazard when it arrives through a task'sengine_args.=form, or anargs_templatewith{spec}first.validate_manifest_engineshas the config, sorunrefuses the task only when that engine'sargs_templateputs{spec}after{engine_args}, which is when the swallow really happens. An engine set up the way the README recommends runs normally.All other findings are warnings, like the existing lint output.
Tests
tests/test_lint_footguns.pyhas 12 tests covering each rule's positive case and the look-alikes that must stay quiet: the=form, a later scalar flag such as--effort max, other engines, a quoted heredoc containing an apostrophe,writable_rootsgiven, relative or in-task paths, worktrees mode,-uall, andbash -cwrapping. It also coversrunrefusing before any worker starts when the order is fatal, and proceeding when it isn't.RINGER_NO_SELF_UPDATE=1 python3 -m unittest discover -s testspasses all 296 tests.This is independent of #154, #155 and #156.
🤖 Generated with Claude Code