Skip to content

fix(component) Renamed check date to status_change_date#66

Open
scanoss-qg wants to merge 2 commits intomainfrom
FixRenameCheckDate
Open

fix(component) Renamed check date to status_change_date#66
scanoss-qg wants to merge 2 commits intomainfrom
FixRenameCheckDate

Conversation

@scanoss-qg
Copy link
Contributor

@scanoss-qg scanoss-qg commented Mar 13, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Added status change date field to component status API responses to track when component status is updated.
    • Improved API schema consistency by reorganizing status and error fields for better clarity.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

📝 Walkthrough

Walkthrough

The changes rename the check_date field to status_change_date in VersionStatus, add a new status_change_date field to ComponentStatus, and renumber error-related fields in both messages across protobuf definitions, swagger schema, and the changelog.

Changes

Cohort / File(s) Summary
Protobuf Definitions
protobuf/scanoss/api/components/v2/scanoss-components.proto, protobuf/scanoss/api/components/v2/scanoss-components.swagger.json
Renamed check_date to status_change_date in VersionStatus; added status_change_date field to ComponentStatus; renumbered error fields (error_message and error_code) from positions 5–6 to 6–7 in both messages.
Documentation
CHANGELOG.md
Added version 0.32.1 entry documenting the check_datestatus_change_date rename and ComponentStatus field additions, plus a new compare link entry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • eeisegn

Poem

🐰 With whiskers twitching, fields align,
status_change_date shines so fine,
Old check_date hops away with grace,
Error fields find their rightful place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming check_date to status_change_date across the component-related proto and API files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch FixRenameCheckDate
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
protobuf/scanoss/api/components/v2/scanoss-components.proto (2)

181-185: ⚠️ Potential issue | 🟡 Minor

Example JSON contains stale field name check_date.

The openapiv2_schema example still references check_date instead of the renamed status_change_date. This will generate misleading API documentation.

🔧 Proposed fix
-      example: "{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"check_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } }" ;
+      example: "{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"status_change_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\", \"status_change_date\": \"2026-02-01\" } }" ;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@protobuf/scanoss/api/components/v2/scanoss-components.proto` around lines 181
- 185, Update the OpenAPI example JSON inside the option
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) json_schema to use
the renamed field "status_change_date" instead of the stale "check_date" value;
locate the example string under that option in scanoss-components.proto and
replace the "check_date" key within the "version_status" object with
"status_change_date" so the generated API docs reflect the current proto field
name.

236-240: ⚠️ Potential issue | 🟡 Minor

Example JSON contains stale field name check_date.

Same issue as above — the ComponentsStatusResponse example still uses check_date instead of status_change_date, and is missing status_change_date in the component_status object.

🔧 Proposed fix
-      example: "{\"components\": [{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"check_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } } ] }" ;
+      example: "{\"components\": [{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"status_change_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\", \"status_change_date\": \"2026-02-01\" } } ] }" ;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@protobuf/scanoss/api/components/v2/scanoss-components.proto` around lines 236
- 240, The example JSON in the openapiv2 schema uses the stale field name
"check_date" and omits "status_change_date"; update the example string so any
occurrence of "check_date" is replaced with "status_change_date" and ensure the
component_status object includes a "status_change_date" property (matching the
field used by ComponentsStatusResponse/component_status in the proto), keeping
the same date format as the other dates so the example aligns with the actual
proto field names.
protobuf/scanoss/api/components/v2/scanoss-components.swagger.json (2)

673-690: ⚠️ Potential issue | 🟡 Minor

Example data contains stale check_date field and missing status_change_date in component_status.

The example at lines 679-689 still references check_date in version_status (line 683) and is missing status_change_date in component_status. This creates inconsistency with the schema definitions which correctly use status_change_date.

The example should be updated to:

  • Replace "check_date": "2026-02-01" with "status_change_date": "2026-02-01" in version_status
  • Add "status_change_date": "..." to component_status
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json` around
lines 673 - 690, Update the example object in v2ComponentStatusResponse: in the
nested version_status replace the stale field "check_date" with
"status_change_date" (preserving the date value), and add a "status_change_date"
property to component_status with an appropriate date string; ensure the field
names exactly match the schema's "status_change_date" for both version_status
and component_status so the example aligns with the model.

789-808: ⚠️ Potential issue | 🟡 Minor

Example data contains stale check_date field.

Same issue as above — the v2ComponentsStatusResponse example at line 799 still uses check_date instead of status_change_date, and the component_status object is missing the new status_change_date field.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json` around
lines 789 - 808, The example for v2ComponentsStatusResponse uses the deprecated
field "check_date" and omits the new "status_change_date"; update the example
object inside the "example" for v2ComponentsStatusResponse so that in
"version_status" you replace "check_date" with "status_change_date" (keeping the
same date value) and add a "status_change_date" field to the "component_status"
object (with an appropriate example date), ensuring the example matches the
schema keys "version_status" and "component_status" and removes any remaining
"check_date" occurrences.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@protobuf/scanoss/api/components/v2/scanoss-components.proto`:
- Around line 181-185: Update the OpenAPI example JSON inside the option
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) json_schema to use
the renamed field "status_change_date" instead of the stale "check_date" value;
locate the example string under that option in scanoss-components.proto and
replace the "check_date" key within the "version_status" object with
"status_change_date" so the generated API docs reflect the current proto field
name.
- Around line 236-240: The example JSON in the openapiv2 schema uses the stale
field name "check_date" and omits "status_change_date"; update the example
string so any occurrence of "check_date" is replaced with "status_change_date"
and ensure the component_status object includes a "status_change_date" property
(matching the field used by ComponentsStatusResponse/component_status in the
proto), keeping the same date format as the other dates so the example aligns
with the actual proto field names.

In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json`:
- Around line 673-690: Update the example object in v2ComponentStatusResponse:
in the nested version_status replace the stale field "check_date" with
"status_change_date" (preserving the date value), and add a "status_change_date"
property to component_status with an appropriate date string; ensure the field
names exactly match the schema's "status_change_date" for both version_status
and component_status so the example aligns with the model.
- Around line 789-808: The example for v2ComponentsStatusResponse uses the
deprecated field "check_date" and omits the new "status_change_date"; update the
example object inside the "example" for v2ComponentsStatusResponse so that in
"version_status" you replace "check_date" with "status_change_date" (keeping the
same date value) and add a "status_change_date" field to the "component_status"
object (with an appropriate example date), ensuring the example matches the
schema keys "version_status" and "component_status" and removes any remaining
"check_date" occurrences.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 50747e25-ff8c-41ff-9f26-980c8ecf273b

📥 Commits

Reviewing files that changed from the base of the PR and between 50c337c and fe26e12.

⛔ Files ignored due to path filters (1)
  • api/componentsv2/scanoss-components.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (3)
  • CHANGELOG.md
  • protobuf/scanoss/api/components/v2/scanoss-components.proto
  • protobuf/scanoss/api/components/v2/scanoss-components.swagger.json

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