Skip to content

Fix test_live nested object file test that passed only by directory order - #635

Merged
guijacquemet merged 1 commit into
mainfrom
claude/fix-test-live-311
Nov 13, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/fix-test-live-311

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Problem

tests/test_live.py::test_a_nested_relative_object_file_inside_the_folder_is_read failed in the full lane (run 43263892651, Python 3.11) with objects is missing required columns: ['x'], and passed locally.

Root cause (test defect, no product change)

_pointed chose the file to re-point with next((folder / "objects").iterdir()), which is filesystem order. The nested test creates objects/well/ before write_fov, so:

  • locally well came first, the manifest replace matched nothing, and the test silently read write_fov's own file (it never exercised the nested path);
  • on the CI runner the written file came first, the manifest really pointed at objects/well/f.csv, and that file held label_id, area but not the session's feature column x.

The reader is correct: it refuses a table without the declared feature.

Change

  • _pointed picks only files and asserts exactly one.
  • The nested file now has the x column, and the test asserts the update holds its 3 objects (not the 5 of write_fov), so it now really checks that the nested relative file is read.

Verified on Python 3.11.15: before the _pointed fix alone the test reproduced the CI error deterministically; after both changes tests/test_live.py passes (40 passed), ruff check and format clean.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com


Generated by Claude Code

…ectory order

_pointed took the first entry of objects/ with iterdir(), which is filesystem order.
The nested-file test made objects/well first, so locally the pick was the directory,
the replace in the manifest was a no-op and the test read write_fov's own file. On the
CI runner the file came first, the manifest was really pointed at the nested file, and
that file had no 'x' column. Pick only files, give the nested file the feature column,
and assert its three objects were read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
@guijacquemet
guijacquemet merged commit 42e1986 into main Nov 13, 2026
4 checks passed
@guijacquemet
guijacquemet deleted the claude/fix-test-live-311 branch November 13, 2026 02:56
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