Repository navigation
feat(engine): task.save lists the capabilities a task's steps need in requires (#2818) - #2963
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the diff, the staged AGENTS.md and metadata, and the surrounding code: Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared with main (merge base ced7c3d to PR head 91c6522): 5 files changed, all modified. Size before 441.3 KB, size after 446.1 KB, change +5.2 KB.
|
…nores requires (opengeos#2818) The byte-identity test also runs a float and a non-ASCII string through the new writer.
Code reviewI found no bugs, security problems or AGENTS.md violations in the changed code. I posted no inline comments: the only remaining points are small quality items, listed below. I could not compile or run the tests (no shell here), so the claim that the suite passes rests on the PR description, not on my run. BugsNone found. Confidence: high (the code is read, not compiled). What I checked:
SecurityNone found. No new input parsing, paths or secrets. The task walk uses existing bounded checks ( PerformanceNone worth raising. The walk runs once per save, over a handful of steps and about 26 checks. Quality
AGENTS.mdNone found. Checked against the rules that apply:
Earlier review threadsOne earlier concern was left alone: the Change sizeCompared with
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Closes #2818 (the writer; the reader was #2867).
task.savenow writesrequireswith the capabilities the task's steps need, found through the walk a project uses for its tasks (COMMAND_CAPABILITIESandtable-export-order, throughcommand_uses), so amodel.runstep with its graph inline and a script line are covered. A task whose steps need nothing is written byte for byte as before (the task is serialized as a struct, so its keys keep their order).project_capabilities.rs:task_capabilities(steps), next to the table it reads. The project's own code is left as it is.items.rs: the task's file is the task plusrequireswhen it is not empty, as a model's file is (model::to_file).docs/maintaining.md: a task file lists and checksrequires; models inside a task's steps leave the exception.Why the writer ships in the release that carries the reader (0.9.0), not one after: a RustGIS older than #2867 ignores the key, exactly as it reads today's files (
Taskdoesn't deny unknown fields), so nothing it reads changes.Reaches: the desktop app and the browser (Save Task), the command line, Python, the Assistant, MCP, scripts and plugins (
task.save). Undo: not applicable (a file).Not in this PR: the presentation and notebook readers, which #2818 allows separately.
Testing
crates/engine/src/tests/task_files.rs: a task that needs nothing is written with the same bytes as before and a task withrequireskeeps its keys in order (both failed with the first version, which sorted the keys); a step, the same step twice, a script line, a table export order and an inline model graph each list their capability once, and equal what a project holding the same task saves; a saved task imports and one whoserequiresis edited to an unknown name is refused by name. Without the writer, the listing test fails; the rest pin what already held.checks.shonrustgis-engine: fmt, clippy, nextest (9599 passed), doctests, layers, schema, all exit 0.git merge-treeagainst feat(layout): a layout's page takes a colour #2950 and feat(layout): section lines on a map frame (#2863 part 1) #2872 (both touch files near this one): no conflict.UI evidence
No visible UI change.
Related issue
Closes #2818.
Summary by CodeRabbit
New Features
requireslist when their steps need specific capabilities. The list covers capabilities used by commands, inline model tools, and table-export settings, with each capability listed once. Tasks with no requirements keep the existing file format.Documentation