Repository navigation
Batch command: discover, look, and a help to work from - #264
Merged
Merged
Conversation
…erators An agent given only `essapps-batch --help` spent most of its commands on finding out how the command works: the form of a template, what each parameter takes, how to write a reference, the name of a row source. It could not look at a batch without reducing it (#262). - specs, sources, batches: list the specs bound, the row sources with the parameters each fills, and the batches with rows done, source and Follow. - template SPEC writes a template to fill in: each parameter with whether it is required or its default, what it takes in words, its description, and for an output the bound specs that give one. The type is read with ess.spec.field_types, as the settings form reads it. Required parameters are commented out, so the template as written is refused naming each. template -l LABEL writes the settings of a batch, as the page does. - show -l LABEL writes the table with status, record and failure, without reducing. - -s/--sources is a global option; rows takes a name in it, as reduce --source does. - --json writes a table as a list of objects, one per row. - A reduce that makes a batch and is then refused removes it again, so the same command line works once the template is right. - A value that must be a reference says how to write one. - A wrong package.module:NAME is one line on stderr and exit status 2. - The module docstring, which --help prints, is written for an operator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The commands are a table from name to function (_COMMANDS in cli.py); adding a command is one function and one entry. - template: every parameter is commented out, one with a default showing it; a file in a group is said in its JSON form, which the header lists. - batches counts the rows whose newest result completed (reduced), without comparing requests; show gives the status. - export -l LABEL DIRECTORY exports the rows of a batch as they stand. - sources prints the new RowSource.description; LoKI's sample-runs says how it pairs a transmission run. - Text that names no output is refused where the syntax is known: in a cell (RECORD.OUTPUT) and in a template; the message of ess.spec gives no syntax, but the file refusal names the JSON form. - A missing file, a folder without files.csv, and a -b module that raises on import are messages with exit 2, not tracebacks. - A refused creating reduce says the refusal even if removing the batch is itself refused, and removes only a label without records. - --json writes an empty cell as null; a list of names is a list in JSON and the names separated by a space in a table file. - Help: statuses, exit codes, chaining, and --with made true in every case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
First part of #262: an agent, or a person, can operate batches through
essapps-batchfrom its help and its messages, without reading code.Measured. A fresh agent (Claude Sonnet) got the command, a LoKI folder and the names of the bindings and row sources, and was to reduce I(Q) for six runs, change the Q binning and reduce again. It was not allowed to read source or documentation.
Commands to discover and to look:
-smoved before the command, and--jsonwrites any table as a list of objects.The template says what each parameter takes, from the spec alone: required or its default, the kind of value in the words a person writes, the description (where a spec says its unit), and for an output which bound specs give one of that type. Every parameter is commented out, so a batch made from it does not keep today's defaults as its settings.
A row source has a description, which
sourcesprints. Both test agents doubted LoKI's pairing of two sample runs with one transmission run, and one changed the table by hand; nothing said the rule.Fixes:
reducethat makes a batch and is then refused leaves no batch. Before, the same command line then failed with "the batch exists".RECORD.OUTPUT); a template says the forms that work in a template.MODULE:NAME, a module that raises on import, and a template or table file that does not exist are a message, not a traceback.--helpis written for someone who operates batches: a first session, one template, the status words, the exit statuses, and that one process works on a folder at a time.Checked by a review that ran every form of
reducebefore and after side by side (same output, exit status and folder, apart from the changes above) and each sentence of the help against the code.Not done here: taking rows, removing a batch, Follow and stop as commands (second part). The template reads the types of a spec beside the page's settings form; one shared reading is a follow-up in #262.
To check by hand:
essapps-batch --helpreads as a page one could work from.template loki-iofqcould be filled in by someone who has not seen the spec.🤖 Generated with Claude Code