Skip to content

ITEP- 91475: Fix REID schema initialization failure#1412

Open
daddo-intel wants to merge 11 commits intomainfrom
fix/ITEP-91475-reid-schema-initialization-fail
Open

ITEP- 91475: Fix REID schema initialization failure#1412
daddo-intel wants to merge 11 commits intomainfrom
fix/ITEP-91475-reid-schema-initialization-fail

Conversation

@daddo-intel
Copy link
Copy Markdown
Contributor

@daddo-intel daddo-intel commented May 8, 2026

📝 Description

This PR updates the controller’s VDMS ReID schema initialization to avoid a known failure mode when probing schema metadata, and adds/extends tests around SceneController publishing behavior and ROI (DATA_REGION) functional expectations.

Changes:

Refactors VDMS schema initialization to attempt AddDescriptorSet first and only probe metadata on non-success responses.
Hardens sendQuery() response parsing to tolerate unexpected non-dict payloads.
Adds new unit tests for SceneController publish paths and strengthens functional ROI validation to require repeated non-empty DATA_REGION updates while an object remains inside a region.

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

Comment thread controller/src/controller/vdms_adapter.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the controller’s VDMS ReID schema initialization to avoid a known failure mode when probing schema metadata, and adds/extends tests around SceneController publishing behavior and ROI (DATA_REGION) functional expectations.

Changes:

  • Refactors VDMS schema initialization to attempt AddDescriptorSet first and only probe metadata on non-success responses.
  • Hardens sendQuery() response parsing to tolerate unexpected non-dict payloads.
  • Adds new unit tests for SceneController publish paths and strengthens functional ROI validation to require repeated non-empty DATA_REGION updates while an object remains inside a region.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/sscape_tests/scenescape/test_scene_controller.py Adds unit tests covering publishDetections and related publish* methods (scene/regulated/region/external).
tests/functional/tc_mqtt_sensor_roi.py Updates ROI sensor functional flow to track in-region state for validating DATA_REGION update behavior.
tests/functional/common_scene_obj.py Subscribes to DATA_REGION and adds assertions to validate repeated non-empty region updates while inside ROI.
controller/src/controller/vdms_adapter.py Changes VDMS schema initialization flow (attempt-first creation) and makes sendQuery() more defensive.

Comment thread controller/src/controller/vdms_adapter.py
Comment thread controller/src/controller/vdms_adapter.py
Comment thread tests/functional/tc_mqtt_sensor_roi.py Outdated
Comment thread tests/functional/common_scene_obj.py
@saratpoluri
Copy link
Copy Markdown
Contributor

@copilot Fix all code review comments

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot Fix all code review comments

Implemented all outstanding review feedback in commit 4f67c5f.

  • Updated ensureSchemaInner docstring to match actual behavior.
  • Updated VDMS schema tests for AddDescriptorSet-first flow, including success, fallback verification, and mismatch paths.
  • Fixed ROI functional handling so exit-only DATA_REGION events are processed and state is cleared correctly.

UI screenshot: N/A (no UI changes in this update).

@saratpoluri saratpoluri enabled auto-merge (squash) May 11, 2026 00:41
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.

5 participants