Builder: doSave() writes into a read-only (run) calculation and resets its state to Created
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- backend-api-design
Research direction
Read src/apps/builder/Builder.C around Builder::doSave() and compare its behavior with the read-only check used to disable File > Save. The issue also points to ChemistryTask::fragment() in src/dsm/edsiimpl/ChemistryTask.C, which changes the state to Created. Verify that a read-only calculation cannot be saved through the direct save hook and that its state remains unchanged.
Written by the indexing model from the issue text.
Description
Where: `Builder::doSave()` (src/apps/builder/Builder.C) has no read-only check. File > Save is disabled for a read-only calculation (state Submitted or later, `PropertyTask::isReadOnly`), but a direct caller of `doSave()` still saves the structure through `ChemistryTask::fragment()`, which then sets the state to Created (src/dsm/edsiimpl/ChemistryTask.C, end of `fragment`). A run calculation, with its outputs and properties, becomes an editable, unrun calculation without any question.
Repro (hooks, one program, isolated home):
- Organizer `ECCE_TEST_ORGANIZER`: `examples`, then `start Builder file:///users/local/Examples/Getting_Started/ammonia` (a stored MOPAC run, state Loaded).
- `ECCE_BUILDER_SCRIPT`: `wait 20000`, `savestate` (dirty=0 save_enabled=0: read-only), `save`, `wait 3000`, `savestate`.
- The calculation's `.ecce-meta` now has `state Created`. Any later edit marks it dirty and enables Save.
Today only the `save` script hook reaches this path; the menu, toolbar and Ctrl+S are disabled. Found while diagnosing #1137.
Expected: `doSave()` refuses on a read-only calculation (as the menu does), or the `save` hook goes through the menu's enable state (`savemenu` already does).
- Dominant language
- C
- Stars
- 10
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FriendsofECCE/ECCE
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by defaultOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
FriendsofECCE/ECCE#1245 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
FriendsofECCE/ECCE#1129 ·
-
Organizer: right-click on a calculation — 'Rerun' should be 'Duplicate'; Reset for Rerun missingOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FriendsofECCE/ECCE#1089 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FriendsofECCE/ECCE#336 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 18/100
FriendsofECCE/ECCE#1253 ·
All issues in FriendsofECCE/ECCE
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ESPresense/ESPresense#2680 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ImageMagick/ImageMagick#9134 ·
Maintainers usually reply within 1 day
-
Arch: ARM/AArch64 Doc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RT-Thread/rt-thread#12082 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/nuttx-apps#4108 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
VirtualBox/virtualbox#996 ·
Maintainers usually reply within 6 days