Skip to content

Recursive-delete: two of four "DeletedPaths" exception-Data writers spell the bare literal instead of DeletedPathsDataKey #7348

Closed

Description

@systemorph

Incidental finding while working MeshWeaver core issue 1198 (area:mesh). Not blocking that work and not actively harmful today, but it is a latent defect and it already produced one wrong claim in a code comment.

WHAT: In MeshWeaver core, the recursive-delete pipeline attaches the list of paths it removed to the failing exception's Data dictionary under the key "DeletedPaths". The key has a declared constant, DeletedPathsDataKey, in src/MeshWeaver.Mesh.Contract/MeshExtensions.cs line 3156. Four sites write that key. TWO of them go through the constant (MeshExtensions.cs line 3813, the commit stage's TimeoutAtStage arm; and line 4288, the drain-pass fold). TWO spell the bare literal instead: MeshExtensions.cs line 4340 (the max-pass branch) and src/MeshWeaver.Mesh.Contract/HierarchicalPathDeletion.cs line 83.

WHY IT MATTERS: renaming or re-scoping the constant would leave the two literal writers silently writing to the old key, so the reader at MeshExtensions.cs line 3953 would stop seeing their contribution. The failure mode is a partial-deleted count that under-reports with no error and nothing to grep, which is exactly the class of defect issue 1198 exists to close.

HOW I FOUND IT, because the instrument is part of the finding: I grepped for the CONSTANT name to inventory the writers, concluded there were two, and wrote that into a code comment. A Copilot review on pull request 5170 caught it and named both literal sites. So the divergence is already demonstrably capable of misleading a reader who uses the obvious search.

SUGGESTED FIX: route the two literal sites through the constant. HierarchicalPathDeletion is in the same assembly and namespace as the constant's declaring class, so this is a visibility change at most (the constant is currently private). Its XML doc at line 66 also states the key as a literal in prose and would want the same treatment.

WHAT I DID NOT ESTABLISH: I did not check whether any other exception-data key in this repo has the same split (I only enumerated this one key). I did not check for literal spellings of DeleteStageDataKey or DeleteUnansweredDataKey, the two sibling keys read in the same handler. I did not measure any production impact; nothing is broken today because all four spellings agree.


Triage context

Origin: https://memex.systemorph.com/Feedback/_Submissions/fb-85c9928a9539b8d5a5ad4518c0e48109

filed by the triage agent on behalf of the submitter (no name provided) via systemorph-com


Triage routing: filed in Systemorph/MeshWeaver — agent: Systemorph/MeshWeaver — The feedback names files under src/MeshWeaver.Mesh.Contract in "MeshWeaver core" (issue 1198, pull request 5170); the fleet's triage records place core issues and PRs in Systemorph/MeshWeaver (e.g. PR #6286, issue #7332), so the core repository Systemorph/MeshWeaver owns this finding..

Activity

  1. added
    bugSomething isn't working
    sev:LLow - cosmetic, rare edge case, or developer-only
    on Oct 27, 2026
  2. rbuergi commented on Oct 27, 2026

    @rbuergi
    Contributor

    Still valid on main (1fa6e09). The two bare-literal writers are still there:

    • src/MeshWeaver.Mesh.Contract/MeshExtensions.cs:5794 — ex.Data["DeletedPaths"] = (IReadOnlyList<string>)acc; (max-pass branch)
    • src/MeshWeaver.Mesh.Contract/HierarchicalPathDeletion.cs:86 — ex.Data["DeletedPaths"] = ...

    The constant is MeshExtensions.cs:3658 (private const string DeletedPathsDataKey). The comment at MeshExtensions.cs:5111 now records the split, but the code is unchanged.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsev:LLow - cosmetic, rare edge case, or developer-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions