fix(marker): clean inherited markers on def delete

delete_marker_definition removed the def but left the inherited global-*
copies on every link: it called stop_marker(), which rejects inherited
markers (409), and the ControllerError was swallowed as a warning. The
orphaned copies were in-memory only (_persist_markers filters inherited
markers) so a restart hid the symptom, but during a running session they
were undeletable via either the per-link or project API.

Add the same inherited=True bypass that update_marker already has, and
pass it from the def-delete fan-out so the copies are removed for real.
This commit is contained in:
YueGuobin committed 2026-07-16 00:39:52 +08:00
1 parent 98bcd5eddd
commit cdc27c37a7
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -994,7 +994,7 @@ class Project:
marker_name = f"global-{name}"
if marker_name in link.markers and link.markers[marker_name].get("inherited_from") == name:
try:
await link.stop_marker(marker_name)
await link.stop_marker(marker_name, inherited=True)
except ControllerError:
# A missing compute or broken link shouldn't block the delete.
log.warning(