Skip to content

Mapper: an Auto Match run keeps going after you leave the project #2830

Closed
OpenConceptLab/oclmap
#114

Description

@paynejd

Leaving a project while Auto Match is still running (for example, going to the project list) unmounts MapProject, but nothing stops the run. abortRef is set only by Stop and by a 403.

  • The run keeps spending match operations and AI calls.

  • Its state updates are dropped, but it keeps writing refs (candidates, row logs). When it finishes, it schedules an autosave (scheduleAutoSave('auto_match')) on the page's leftover scheduler. That save combines state frozen at unmount (matches, decisions, analysis) with the live refs, so the stored project is inconsistent.

  • Decide the behavior: stop the run when the user leaves (set abortRef on unmount, perhaps after a confirm), or keep it running and save its results consistently.

  • Either way, nothing spends quota after the user leaves unless we mean it to.

Found in review of OpenConceptLab/oclmap#75 (#2829). It predates that PR.

🤖 Generated with Claude Code

Activity

  1. added this to the P2 · Mapper: Beta milestone on Sep 27, 2026
  2. self-assigned this
    on Sep 27, 2026
  3. ocl-automation commented on Sep 28, 2026

    @ocl-automation
    Collaborator

    Automated Triage — 2026-09-28

    Dimension Score
    Complexity 3
    Scope 2
    Clarity 3
    Dependency 2
    Risk 3

    Decision: decision/human-review
    Type: type/bug
    Signals: signal/small-scope

    Fixing this requires deciding whether to abort the run on unmount or make its completion save consistent, and then wiring that into MapProject.jsx and autosave.js — a few files but no unresolved external blocker since #75/#2829 already merged. Clarity is middling because the behavior decision is explicitly left open; risk is moderate since an unbounded run wastes AI quota and can leave stored project state inconsistent, but it isn't a data-loss or security issue.


    Generated by ticket-triage pipeline v3. Model: anthropic/claude-sonnet-5 (openrouter).

  4. snyaggarwal commented on Oct 6, 2026

    @snyaggarwal
    Contributor

    I think we should show a dialog that automatch is running do you want to leave? with "abort and leave" and "Stay" actions.
    And on unmount we should abort immideatly (current abort waits for graceful stop) and record the automatch run

  5. added 2 commits that reference this issue on Oct 26, 2026
  6. snyaggarwal commented on Oct 26, 2026

    @snyaggarwal
    Contributor

    Update: fixed in two PRs.

    Still true: requests already sent when the user leaves still finish on the server. Their results are dropped.

    🤖 Generated with Claude Code

  7. added a commit that references this issue on Oct 26, 2026
  8. added 2 commits that reference this issue on Oct 26, 2026
  9. added 2 commits that reference this issue on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/mapperMapping toolssignal/small-scopeLimited to a small part of the codebasestage/triagedAI triage complete — scored and classifiedtype/bugSomething is broken

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions