Skip to content

fix(tools): preserve notes and todos when updates are rejected - #1613

Open
samirhvbr wants to merge 1 commit into
usestrix:mainfrom
samirhvbr:fix/preserve-rejected-tool-updates
Open

samirhvbr wants to merge 1 commit into
usestrix:mainfrom
samirhvbr:fix/preserve-rejected-tool-updates

Conversation

@samirhvbr

@samirhvbr samirhvbr commented Oct 28, 2026 •

Copy link
Copy Markdown

Rejected note and todo updates currently modify fields before validating the rest of the item. For example, changing a note's title alongside empty content returns failure but keeps the new title; an invalid todo status can similarly retain earlier edits. A later successful operation writes those rejected changes to disk.

Validate and mutate a shallow copy, then apply it to the original record only when the whole item is accepted. Successful siblings in todo batches still succeed; rejected records and timestamps stay unchanged.

Closes #1609.

Validation on macOS/Apple Silicon, Python 3.12.14, against upstream 98e3df14:

  • Four public-tool regression cases fail before the change; all 26 notes/todo tests pass after it.
  • Regressions check memory, a later successful save, reload from disk and mixed valid/invalid todo batches, with valid-update controls.
  • Repository-wide Ruff format/lint, Mypy and Bandit pass; git diff --check passes.
  • make check-all stops at the same 940 Pyright errors as unchanged upstream. The 86 diagnostics in the two edited modules also match the baseline after normalizing line numbers.

These are local temporary-file tests. No LLM, cloud account or live scan was used. The full suite stalled in the same provider-test area as unchanged upstream and was interrupted: the patch reached 1,884 passed, 19 failed and 3 xfailed; the base reached 1,879 passed, the same 19 failed and 3 xfailed. Existing failures are in budget/runner tests with stale mocks missing skills or telemetry. This PR does not claim a completed or green full suite.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Updates notes and todos on a copy, then commits only accepted edits.

  • Notes change only after every requested field passes.
  • Todo batches leave rejected records unchanged and update valid siblings.

No actionable issues found. Tests were inspected but not run during this review.

Reviews (1) · Last reviewed commit: "fix(tools): preserve records when an upd..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Rejected note and todo updates mutate records before validation completes

1 participant