Repository navigation
feat: Add 'reversibility' and 'item count' to action classification - #298
Conversation
|
Decisions I made, that are worth a look:
|
lukasdotcom
left a comment
There was a problem hiding this comment.
For file share editing/creating/deleting the item count should also use the count of files in the folder if it is a folder like in copy_file IMO.
julien-nc
left a comment
There was a problem hiding this comment.
Code looks good. A few comments/questions.
| async def form_size(form_id): | ||
| """Deleting a form takes every submission it collected along with it.""" | ||
| payload = await nc.ocs('GET', f'/ocs/v2.php/apps/forms/api/v3/forms/{form_id}/submissions') | ||
| submissions = payload.get('submissions') if isinstance(payload, dict) else None | ||
| if submissions is None: | ||
| raise ValueError(f'Could not read the submissions of form {form_id!r}') | ||
| return 1 + len(submissions) |
There was a problem hiding this comment.
nit: seems like we can use a hack here to make this less compute intensive
passing limit = 1 here still gives us the count of all the submissions without actually hydrating the submission objects. The key filteredSubmissionsCount has the count.
https://github.com/nextcloud/forms/blob/fa6bbd7dea20a2c7ed7766e8c86282de848c3388/lib/Controller/ApiController.php#L1277
|
just an idea, not sure if it's worth pursuing, for changes like table title updates, we could make them reversible in the true sense by fetching the old title before making the change. |
That's not the sense of reversible that is meant here, I think. it's not about whether the agent can revert the action on its own, but whether it's possible to revert (the consequences of) the action in general. I think the consequences of any simple title change are negligible, because it's usually quite easy to restore the title by hand, even if there is no explicit undo functionality. |
|
fair enough. |
|
Blockers:
|
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Epistemologically, the information is exposed at the time he share is created, even if the share can be deleted, the information was leaked already. Hence, irreversible. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
API doesn't offer that Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
API doesn't offer that Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…ERSIBLE Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…ved threshold getters Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
568d92d to
04fb1d2
Compare
Reversibility and item coutn are now two more dimensions of the tool action classification, each with its own admin threshold.
How it decides
New admin settings (defaults in brackets):
One bhevior change: The deletion gate now uses the reach of the deletion itself. Before, it used the wides radius in the whole batch. For example: Deleting a priovate note while also sharing sopmething with a group is now judged on the note's reach. I think that makes more sense.
🤖 AI (if applicable)