Skip to content

feat(sanity): add checkers to validate next/prev token refers to another one#242

Merged
ktro2828 merged 1 commit into
mainfrom
feat/sanity/next-prev-reference
Dec 3, 2025
Merged

feat(sanity): add checkers to validate next/prev token refers to another one#242
ktro2828 merged 1 commit into
mainfrom
feat/sanity/next-prev-reference

Conversation

@ktro2828

@ktro2828 ktro2828 commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

What

This pull request adds six new reference checkers to the sanity validation framework, each enforcing that certain fields referencing other records are either empty or valid references. These new checkers cover next and prev relationships in Sample, SampleAnnotation, and SampleData schemas. The documentation is updated to reflect these new rules, and the checkers are registered for use in the framework.

New reference checkers for record relationships

  • Added REF016 to ensure Sample.next refers to another record unless it is empty.
  • Added REF017 to ensure Sample.prev refers to another record unless it is empty.
  • Added REF018 to ensure SampleAnnotation.next refers to another record unless it is empty.
  • Added REF019 to ensure SampleAnnotation.prev refers to another record unless it is empty.
  • Added REF020 to ensure SampleData.next refers to another record unless it is empty.
  • Added REF021 to ensure SampleData.prev refers to another record unless it is empty.

Documentation and registration

  • Updated docs/schema/requirement.md to document all six new reference rules.
  • Registered all new checkers in the t4_devkit/sanity/reference/__init__.py for framework usage.

@github-actions github-actions Bot added documentation Improvements or additions to documentation new-feature New feature or request labels Dec 2, 2025
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 force-pushed the feat/sanity/next-prev-reference branch from 1250007 to 3de1998 Compare December 3, 2025 03:54
@github-actions

github-actions Bot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4080 3373 83% 50% 🟢

New Files

File Coverage Status
t4_devkit/sanity/reference/ref016.py 100% 🟢
t4_devkit/sanity/reference/ref017.py 100% 🟢
t4_devkit/sanity/reference/ref018.py 100% 🟢
t4_devkit/sanity/reference/ref019.py 100% 🟢
t4_devkit/sanity/reference/ref020.py 100% 🟢
t4_devkit/sanity/reference/ref021.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
t4_devkit/sanity/reference/init.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 3de1998 by action🐍

@ktro2828 ktro2828 marked this pull request as ready for review December 3, 2025 03:56
Copilot AI review requested due to automatic review settings December 3, 2025 03:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds six new reference validation checkers (REF016-REF021) to ensure that next and prev fields in Sample, SampleAnnotation, and SampleData schemas either are empty or contain valid references to other records of the same type.

  • Added checkers REF016-REF021 to validate bidirectional linked-list relationships
  • Registered all new checkers in the reference module's __init__.py
  • Updated documentation to describe the new validation rules

Reviewed changes

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

Show a summary per file
File Description
t4_devkit/sanity/reference/ref016.py Validates Sample.next references
t4_devkit/sanity/reference/ref017.py Validates Sample.prev references
t4_devkit/sanity/reference/ref018.py Validates SampleAnnotation.next references
t4_devkit/sanity/reference/ref019.py Validates SampleAnnotation.prev references
t4_devkit/sanity/reference/ref020.py Validates SampleData.next references
t4_devkit/sanity/reference/ref021.py Validates SampleData.prev references
t4_devkit/sanity/reference/init.py Registers the new checker modules
docs/schema/requirement.md Documents the new validation rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ktro2828 ktro2828 merged commit 01320ef into main Dec 3, 2025
5 checks passed
@ktro2828 ktro2828 deleted the feat/sanity/next-prev-reference branch December 3, 2025 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation new-feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants