Skip to content

[codex] Guard data location relinks by session IDs#75

Draft
ehennestad wants to merge 4 commits intodevfrom
codex/guard-datalocation-relink
Draft

[codex] Guard data location relinks by session IDs#75
ehennestad wants to merge 4 commits intodevfrom
codex/guard-datalocation-relink

Conversation

@ehennestad
Copy link
Copy Markdown
Collaborator

Summary

  • Add a reusable validateDataLocationRelink guard for in-place DataLocationModel updates.
  • Reuse the guard from updateSessionDatalocations before mutating the metatable.
  • Add an optional DataLocationModelApp commit validator and wire it from NANSEN.app.
  • Avoid saving the metatable when a data-location update fails.

Root Cause

Editing the DataLocationModel from NANSEN.app could redefine how session IDs are extracted, while the app still tried to update existing table rows in place. Since session IDs are the table identity key, changing that definition makes exact matching impossible and previously caused the operation to silently leave data locations stale.

Validation

  • git diff --check passes.
  • MATLAB and mlint were not available in the shell, so runtime validation still needs to be done in MATLAB.

end

detectedDataLocationIdx = find(folderCounts > 0);
if numel(detectedDataLocationIdx) == 1
countLines{i} = sprintf(' %s: %d', ...
dataLocationNames{i}, folderCounts(i));
end
countList = strjoin(countLines, sprintf('\n'));
for i = 1:numPreview
previewLines{i} = sprintf(' %s', sessionIDs{i});
end
preview = strjoin(previewLines, sprintf('\n'));
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Test Results

133 tests  ±0   133 ✅ ±0   23s ⏱️ +5s
  7 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit ed268ca. ± Comparison against base commit d2fe7b4.

♻️ This comment has been updated with latest results.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants