You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrites GetDeepValue in pkg/platform/parameters/parameters.go as one iterative loop over strings.SplitSeq(path, ".") with a type switch on map[string]any and []any.
Removes the private helpers getDeepValueFromMap and getDeepValueFromSlice. Their only caller was GetDeepValue.
Adds 5 table cases to TestGetDeepValue: empty-string key, empty-segment literal key, nil value mid-path, items.+1, items.01.
Why
The recursive version re-joined and re-split the path at each level. The loop removes both and keeps one traversal.
Behavior is unchanged. A throwaway differential test compared old and new over 52,200 root/path combinations, and all matched. The throwaway test was deleted.
Callers cmd/pro/workspace/import.go and pkg/platform/form/form.go are unchanged.
Validation
mise run cli:format: exit 0.
mise run cli:lint:ci: exit 0. Runs golangci-lint config verify and golangci-lint run --new-from-patch over ./..., so caller packages were type-checked by lint.
go test -count=1 ./pkg/platform/parameters/...: pass. pkg/platform/form and cmd/pro/workspace have no test files, so their own tests did not run.
prek run on the two changed files (pre-commit stage): all applicable hooks passed (golangci-lint, golangci-lint-fmt, end-of-file, trailing-whitespace, merge-conflict, large-files, secrets). prek commit-msg stage on the commit message: commitlint and commitizen passed.
Eligible under the auto-refactor policy. Pending coordinator gates: CI, ready, review gates, merge.
Next
None.
Summary by CodeRabbit
Bug Fixes
Deep-value lookups now handle paths through nested maps and slices. Invalid or out-of-range slice indices, missing keys, and unsupported values return nil.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 43489bd9-eb69-46b3-9249-fd6b428a01ff
📥 Commits
Reviewing files that changed from the base of the PR and between c395256 and e4253cf.
📒 Files selected for processing: 2
pkg/platform/parameters/parameters.go
pkg/platform/parameters/parameters_test.go
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
📝 Walkthrough
GetDeepValue now traverses nested maps and slices iteratively. Tests add coverage for empty paths, empty key segments, nil intermediate values, and slice index formats.
GetDeepValue uses iterative map and slice traversal. Tests add cases for empty paths, empty key segments, nil intermediate values, and slice indices with a leading plus sign or zero padding.
The traversal preserves the checked empty-path behavior, and no merge-blocking issue is established.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title is concise, specific, and accurately describes the iterative refactor of GetDeepValue path traversal.
Description check
The description clearly explains the change, rationale, scope, behavior verification, and validation results. It omits several template headings and checklist confirmations, but the substantive inform…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description clearly explains the change, rationale, scope, behavior verification, and validation results. It omits several template headings and checklist confirmations, but the substantive information is mostly complete.
✨ Finishing Touches
✨ Simplify code
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
CodeRabbit docstring-coverage warning: no code change. GetDeepValue retains its existing exported API and repository lint passes; the removed helpers need no documentation. The auto-refactor style policy favors self-documenting code and does not require new docstrings here. CodeRabbit completed review of e4253cf with no actionable comments; Greptile reviewed the same head at 5/5. Local prek also passed on both changed files.
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
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.
Summary
GetDeepValueinpkg/platform/parameters/parameters.goas one iterative loop overstrings.SplitSeq(path, ".")with a type switch onmap[string]anyand[]any.getDeepValueFromMapandgetDeepValueFromSlice. Their only caller wasGetDeepValue.TestGetDeepValue: empty-string key, empty-segment literal key, nil value mid-path,items.+1,items.01.Why
cmd/pro/workspace/import.goandpkg/platform/form/form.goare unchanged.Validation
mise run cli:format: exit 0.mise run cli:lint:ci: exit 0. Runsgolangci-lint config verifyandgolangci-lint run --new-from-patchover./..., so caller packages were type-checked by lint.go test -count=1 ./pkg/platform/parameters/...: pass.pkg/platform/formandcmd/pro/workspacehave no test files, so their own tests did not run.prek runon the two changed files (pre-commit stage): all applicable hooks passed (golangci-lint, golangci-lint-fmt, end-of-file, trailing-whitespace, merge-conflict, large-files, secrets).prekcommit-msg stage on the commit message: commitlint and commitizen passed.CodeRabbit CLI
coderabbit review --agent --committed --base-commit c3952565: Review completed, 0 findings, 2 files reviewed./tmp/cr.log.Auto-merge
Next
Summary by CodeRabbit
nil.