master<-dev#1442
Merged
Merged
Conversation
* Optimize GetStationsByLineIdList with HashMap indexing and lightweight query - Pre-index lines by station_g_cd into a HashMap for O(1) lookup, replacing the O(n×m) linear scan in update_station_vec_with_attributes - Add get_by_station_group_id_vec_no_types that skips station_station_types and types JOINs when train type data is unused (line_group_id is None) - Add quality/performance-first guideline to AGENTS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Use explicit skip_types_join flag instead of line_group_id for no-types optimization - Add skip_types_join parameter to update_station_vec_with_attributes to decouple the optimization from line_group_id semantics - Only pass true from get_stations_by_line_id_vec (GetStationsByLineIdList), keeping all other callers on the full query to preserve station type data - Update ConfigurableMock get_by_station_group_id_vec_no_types to strip type fields (line_group_cd, pass, sst_id, type_cd, type_id, type_name, color, direction, kind) mirroring production behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Run cargo fmt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Move update_station_vec_with_attributes out of public trait into inherent impl - Remove update_station_vec_with_attributes from QueryUseCase trait to keep the skip_types_join optimization detail private to QueryInteractor - Remove the method from the gRPC controller mock (no longer needed) - Add has_train_types and train_type clearing to the ConfigurableMock get_by_station_group_id_vec_no_types to match production behavior where line_group_cd=NULL makes has_train_types=false - Add regression test for skip_types_join=true path verifying that lines, company, and station_numbers are still enriched correctly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix line.station referencing unenriched station clone Move line.station assignment after station_numbers and train_type are set so the cloned station embedded in the line is fully populated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix station.line.station.train_type not enriched in get_stations_by_line_group_id_vec The train_type enrichment loop was updating station.train_type and station.lines[*].station.train_type but missed station.line.station.train_type. Also improve skip_types_join test to seed stations_by_group with actual type fields and verify they are stripped by the no_types code path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.