Skip to content

Mapper: three AI log entries are filed under the open row, not the row they're about #2887

Closed
OpenConceptLab/oclmap
#98

Description

@paynejd

During AutoMatch, the Mapper logs each AI attempt in the row's history. Three of those log() calls don't pass the row index. log() (L1718) then falls back to rowIndex, which is the row open in the side panel, or a null key when no row is open. So the entry lands on the wrong row, not the row the AI was called for:

Line Entry When
L5845 AIRecommendationLimitReached the AI Assistant's response is a quota or preview-limit error
L5852 AIRecommendation with extras.error the AI Assistant answers with detail (a failed analysis)
L5885 AIRecommendationLimitReached the call throws a quota or preview-limit error

The other three AIRecommendation calls (L5794, L5838, L5864) pass __index correctly.

Effect

  • A row's history can show an AI failure or quota stop that happened on another row. Meanwhile the row it really happened on shows nothing.
  • Anything that reads the saved row logs can't tell which row's AI step failed. That includes support questions ("why did this row get no AI analysis?") and scripts that look for rows to re-run.

Fix

  • Pass __index as the second argument in the three calls, as the other three do.
  • At L5845 and L5885, handlePreviewLimitError already gets isSuperseded() ? null : __index. Decide whether a superseded call should log at all, and make the two consistent.
  • Add a test: during a bulk run, every AIRecommendation* entry is recorded under the row being analysed.

Found while writing a script that reads saved row logs to find rows whose AI step failed.

Activity

  1. added this to the P5 · Post-launch milestone on Oct 8, 2026
  2. ocl-automation commented on Oct 8, 2026

    @ocl-automation
    Collaborator

    Automated Triage — 2026-10-08

    Dimension Score
    Complexity 2
    Scope 1
    Clarity 4
    Dependency 1
    Risk 2

    Decision: decision/ai-ready
    Type: type/bug
    Signals: signal/quick-win, signal/low-risk, signal/small-scope, signal/well-specified

    The fix is to pass __index as the second argument in three log() calls in MapProject.jsx, plus a test. The issue gives exact lines and the correct pattern from the other three calls. The only design question, whether a superseded call should log at all, is an implementation choice the issue leaves to the implementer. Risk is low because the effect is misfiled AI log entries, not data loss or a broken feature. The P5 milestone means it is not urgent.


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

  3. added a commit that references this issue on Oct 12, 2026
    885c64b
  4. added
    pipeline/session-doneA session worker opened a PR; remove to allow another run
    and removed
    gate/ai-fast-trackHuman override — skip to worker directly, bypass triage routing
    on Oct 12, 2026
  5. paynejd commented on Oct 12, 2026

    @paynejd
    MemberAuthor

    Octoad's session worker opened OpenConceptLab/oclmap#98 for this ticket. It's ready for review.

    The three AI log entries (two quota stops, one failed analysis) now go on the row the AI analysed, not the open row; a superseded call logs on its own row too; a new test checks every log() call in fetchRecommendation passes the row.

    Codex review passes: 1. Session worker worker-v0.11, recipe lean-loop, flow public>public. Run openconceptlab-ocl-issues-2887-20261012-141032, session ocl-issu-2887-1012-141032-a1e263.

  6. added a commit that references this issue on Oct 13, 2026
  7. added a commit that references this issue on Oct 19, 2026
    9a1a554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/mapperMapping toolsdecision/ai-readyReady for autonomous AI executionpipeline/session-doneA session worker opened a PR; remove to allow another runsignal/low-riskSafe to execute with minimal downsidesignal/quick-winLow complexity, high clarity — easy winsignal/small-scopeLimited to a small part of the codebasesignal/well-specifiedClear requirements and acceptance criteriastage/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