test(omp): close final #1109 path-contract review gap - #1323
Conversation
📝 WalkthroughWalkthroughThis change adds OMP regression tests for home-relative ChangesOMP path contract
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-site/src/content/docs/guides/integrations.md`:
- Around line 19-22: Update the documentation around the named-profile
`PI_CONFIG_DIR` behavior to state that its value is passed to `path.join(home,
value)`: `/custom` and `~/custom` remain under the user’s home directory, and
`~` is not shell-expanded. Keep the existing distinction from
`PI_CODING_AGENT_DIR` unchanged.
In `@src/clients/config-export.ts`:
- Around line 1004-1017: The OMP export filename must match the resolved
destination basename. Update the OMP entry in EXPORT_CLIENTS and related
filename handling to derive the name from EXPORT_CLIENTS.omp.destination(env),
preserving models.yaml only when that is the resolved destination and otherwise
using models.yml; update the OMP-specific assertion in
tests/client-config-export.test.ts:450 accordingly, while the management route
assertion requires no direct change if it already validates the derived
filename.
In `@src/integrations/writer.ts`:
- Line 236: Update the integrations.error.nonLoopback translation in the
affected GUI locale catalogs, including ko.ts, ru.ts, and zh.ts, to remove the
stale claim that manual configuration cannot help and match the current
loopback/tunnel guidance shown by writer.ts. Search all remaining locale
catalogs for the same wording and synchronize them without changing the writer
logic or bypassing the i18n files.
In `@tests/management-client-config-route.test.ts`:
- Around line 180-181: Extend the credential-leakage assertions in the relevant
management-client configuration test to serialize and inspect the complete
response envelope via JSON.stringify(body), ensuring REAL_LOOKING_KEY is absent
from all response fields, including exportHint and destination.
- Around line 32-33: Update the local response envelope type in the management
client-config route test to include mediaType, then in the OMP assertion near
expect(body.format).toBe("yaml"), assert that body.mediaType equals the expected
YAML MIME type.
In `@tests/omp-path-contract.test.ts`:
- Around line 6-14: Create a unique temporary home directory with mkdtempSync()
for the assertion at tests/omp-path-contract.test.ts#L6-L14, wrap the
filesystem-dependent test in try/finally, and remove the directory in finally.
Apply the same isolated-directory and cleanup pattern to
tests/omp-path-contract.test.ts#L16-L27, reusing the generated directory for
each case.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 88ae266f-b34a-494d-8f1c-cec76e5a03b6
⛔ Files ignored due to path filters (3)
devlog/_plan/260806_omp_integration/evidence/omp-dashboard.pngis excluded by!**/*.pngdevlog/_plan/260806_omp_integration/evidence/omp-live-prompt.pngis excluded by!**/*.pngdevlog/_plan/260806_omp_integration/evidence/omp-model-catalog.pngis excluded by!**/*.png
📒 Files selected for processing (38)
docs-site/src/content/docs/guides/integrations.mddocs-site/src/content/docs/ja/reference/cli/agents.mddocs-site/src/content/docs/ja/reference/management-api.mddocs-site/src/content/docs/ko/reference/cli/agents.mddocs-site/src/content/docs/ko/reference/management-api.mddocs-site/src/content/docs/reference/cli/agents.mddocs-site/src/content/docs/reference/management-api.mddocs-site/src/content/docs/ru/reference/cli/agents.mddocs-site/src/content/docs/ru/reference/management-api.mddocs-site/src/content/docs/zh-cn/reference/cli/agents.mddocs-site/src/content/docs/zh-cn/reference/management-api.mdgui/src/app-routing.tsgui/src/components/apikeys-workspace/client-config-clients.tsgui/src/i18n/de.tsgui/src/i18n/en.tsgui/src/i18n/ja.tsgui/src/i18n/ko.tsgui/src/i18n/ru.tsgui/src/i18n/zh.tsgui/src/pages/Integrations.tsxgui/src/pages/integrations/FileIntegrationPage.tsxgui/src/pages/integrations/integration-api.tsgui/src/pages/integrations/overview-clients.tsgui/tests/client-config-panel.test.tsxgui/tests/integrations-overview-rows.test.tssrc/cli/export-command.tssrc/cli/help.tssrc/clients/config-export.tssrc/integrations/registry.tssrc/integrations/writer.tstests/cli-export-command.test.tstests/client-config-export-new-clients.test.tstests/client-config-export.test.tstests/integrations-invariants.test.tstests/integrations-state.test.tstests/integrations-writer.test.tstests/management-client-config-route.test.tstests/omp-path-contract.test.ts
1006f73 to
637711b
Compare
96989f2 to
2418291
Compare
|
Review-thread disposition after rebasing this PR onto current
Fresh CI is running on current head |
Maintainer follow-up for #1109. #1109 is merged; this PR now contains only focused OMP path-contract regression coverage on top of current
dev.Current scope:
PI_CONFIG_DIRvalues stay home-relative under OMP'spath.join(home, value)contractPI_CODING_AGENT_DIRmodels.yamlfiles or parallel runs cannot affect the resultNo production behavior changes. Merge only after fresh current-head CI is green.
Summary by CodeRabbit