Skip to content

Decide Whether IsMediaAndToolsCurrent Has the Tool-Change Sense Inverted #1079

Closed

Description

@ptr727

Question

SidecarFile.Read() marks the sidecar out of date when IsToolsCurrent() is false and SidecarUpdateOnToolChange is on. SidecarFile.IsMediaAndToolsCurrent(), which Update() uses to decide whether to rerun the tools, treats tools as current when IsToolsCurrent() is true or SidecarUpdateOnToolChange is on.

The two read as opposite senses:

  • With the option on, Read() already forced an update, so the or makes Update() skip the tool check.
  • With the option off, Update() reruns the tools whenever the versions differ, which is the case the option is meant to leave alone. Update() only runs when the state or media changed.

Reproduction shape

  1. Set SidecarUpdateOnToolChange: false, process name.mkv, and then upgrade a media tool.
  2. Process again with a change that alters the state.
  3. Update() reruns all tools and rewrites the stored tool versions.

Decision needed

Is this intended, or should IsMediaAndToolsCurrent() use IsToolsCurrent() || !SidecarUpdateOnToolChange?

Found while drawing the process command diagrams, ARCHITECTURE.md "Process Command Logic", suspect branch S11.

Activity

  1. added
    questionFurther information is requested
    pre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
    decisionA question waiting on the maintainer, alone or beside whatever else the issue carries
    on Oct 29, 2026
  2. ptr727 commented on Oct 30, 2026

    @ptr727
    OwnerAuthor

    Decision from the maintainer: not intended. Invert the check to IsToolsCurrent() || !SidecarUpdateOnToolChange, so it matches the sense of Read(). With the option off, a tool upgrade then never triggers a tool rerun.

    This issue now tracks that fix on the process-findings handoff track.

  3. removed
    decisionA question waiting on the maintainer, alone or beside whatever else the issue carries
    on Oct 30, 2026
  4. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Claim (backlog burndown round 1): branch feature/1079-tool-change-sense, files PlexCleaner/SidecarFile.cs, new PlexCleanerTests/ToolChangeSenseTests.cs. ARCHITECTURE.md and HISTORY.md are deferred to one final docs pull request by the maintainer's choice, so this group does not touch them.

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

    pre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions