Repository navigation
fix(engine): a saved step that imports a model or a task, or opens a notebook, from its text requires what it requires - #3619
Conversation
…om its text requires what it requires
…what its steps require
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the full diff (3 files, about 305 added and 29 removed lines), the changed walk in Bugs: none found. The walk matches what each command reads: Security: none found. Performance:
Quality:
AGENTS.md: no rule break found. The change adds tests for both clean and lossy input, and the PR description covers the surfaces it reaches. The twin routes are covered: Earlier concerns left alone: 0 (no prior threads). Change sizeCompared with
|
Code reviewI found no new bugs, security issues, or AGENTS.md breaks in this PR. I read the full diff, the three changed files, and the code it depends on: the Bugs: none found.
Security: none found. Performance: nothing new beyond the notebook memory and time concern already raised (see below). Quality: nothing new beyond the duplicated task loop already raised (see below). Confidence: low. I did not find another point worth a comment. AGENTS.md: no breaks found.
Twins checked:
Already raised, left alone (2 concerns):
Change sizeCompared with the base branch, the whole PR: merge base 256cd30 to PR head fcf62a4.
|
Pull request was converted to draft
📖 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
A saved step that imports a model or a task, or opens a notebook, from its text (
model.import,task.import,notebook.open) now requires what that document requires.Before, no capability read the
textordataof these commands. A saved step could import a model or a task, or add a notebook, that uses a setting an older release doesn't know (percent slope, a colorbar's text size, …), and the saved outer document didn't require it, so the older release took the step and could drop the setting without a word.databeforetext; apathnames a file, which has its own header):model.import: a file the command takes (model::check_file) requires what themodel.newit runs requires for that graph or those steps;task.import: a task the command reads requires what its steps require;notebook.open: a notebook the command parses, whose code cells are commands, requires what their lines require. Markdown cells and another language's cells require nothing. The lines are parsed once, not once per check, one command at a time.datathat can't be decoded, the step requires every capability a release knows. What is kept of a text read is now keyed by its kind too, since the same text is another document to another command.Surfaces: saved tasks, models, scripts and notebooks of the desktop and web apps,
rustgis-cli, Python, the Assistant and MCP. Nothing visible changes; a document saved with such a step may carry more entries in itsrequiresheader, so an older release refuses it instead of dropping settings.Not in this PR: a style, layer or map given inline (#3589), and steps given inline to
task.new,task.addStepandtask.editStep.Testing
crates/engine/src/tests/capabilities_inline_project.rsandproject_capabilities.rs, written first and seen failing (each step required nothing): a model with a graph, a web tool with steps and a task, bytextand bydata; a.rgisnband a Jupyter notebook of RustGIS commands; a project opened by a notebook cell; the history and a project's notebooks; refused files, Markdown and Python cells and apathrequiring nothing; undecodabledata, the depth limit and the byte budget; one text read as a notebook and as a project.cargo fmt --check, clippy onrustgis-engine, doctests, the layering check andcargo xtask schema --checkpass.nextest: all ofrustgis-enginepasses; 8 failures are in other crates (7 inrustgis-geolibre,line_strokes_editor_edits_one_classin therustgis-ui-eguismoke tests) and fail the same onmain(256cd3095) without this change. That full run was before the last commits (task.import, reading a notebook one command at a time, comment wrapping); after the code ones, the capability tests,hostile_params_never_panic, clippy and fmt passed again.UI evidence
No visible UI change.
Related issue
Closes #3476
Summary by CodeRabbit