Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7545a50e5c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .object({ | ||
| mentionPatterns: z.array(z.string()).optional(), | ||
| historyLimit: z.number().int().positive().optional(), | ||
| historyLimit: z.number().int().min(0).optional(), |
There was a problem hiding this comment.
Regenerate base schema to keep historyLimit aligned
Switching GroupChatSchema.historyLimit to min(0) changes runtime validation, but the generated public schema still has exclusiveMinimum: 0 for the same field(s), so schema-driven consumers (for example config UI/lookup paths built from GENERATED_BASE_CONFIG_SCHEMA) can still reject 0 even though runtime parsing now accepts it. This commit should include regenerated config schema artifacts to keep runtime and public schema contracts consistent.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR aligns Confidence Score: 4/5Safe to merge after regenerating the JSON schema; the Zod change is correct but the generated file is stale. One P1 issue: schema.base.generated.ts still has exclusiveMinimum: 0 for groupChat.historyLimit, contradicting the new Zod validation. This will cause pnpm config:schema:check to fail and IDE validators to reject the newly-allowed value until the file is regenerated. src/config/schema.base.generated.ts — needs regeneration via pnpm config:schema:gen to reflect the min(0) change. Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/config/zod-schema.core.ts
Line: 367
Comment:
**Generated JSON schema not regenerated**
`schema.base.generated.ts` still declares `exclusiveMinimum: 0` for `groupChat.historyLimit` (lines 6113 and 17705), meaning JSON-schema-aware validators (IDE LSP, `pnpm config:schema:check`) will still reject `0` even after this Zod change. Per the repo's drift-detection flow, `pnpm config:schema:gen` must be run and the updated `schema.base.generated.ts` committed alongside this change.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/config/zod-schema.core.regressions.test.ts
Line: 5-7
Comment:
**Misleading test description**
The test name says "disable group history" but `limitHistoryTurns(messages, 0)` returns all messages unchanged (unlimited), matching the established DM convention documented in `pi-embedded-runner.get-dm-history-limit-from-session-key.falls-back-provider-default-per-dm-not.test.ts` ("returns 0 when per-DM historyLimit is explicitly 0 (unlimited)"). Consider naming this `"accepts zero to signal unlimited history"` so the intent is consistent with the rest of the codebase.
```suggestion
it("accepts zero to signal unlimited history", () => {
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(config): allow zero group chat histo..." | Re-trigger Greptile |
| .object({ | ||
| mentionPatterns: z.array(z.string()).optional(), | ||
| historyLimit: z.number().int().positive().optional(), | ||
| historyLimit: z.number().int().min(0).optional(), |
There was a problem hiding this comment.
Generated JSON schema not regenerated
schema.base.generated.ts still declares exclusiveMinimum: 0 for groupChat.historyLimit (lines 6113 and 17705), meaning JSON-schema-aware validators (IDE LSP, pnpm config:schema:check) will still reject 0 even after this Zod change. Per the repo's drift-detection flow, pnpm config:schema:gen must be run and the updated schema.base.generated.ts committed alongside this change.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/config/zod-schema.core.ts
Line: 367
Comment:
**Generated JSON schema not regenerated**
`schema.base.generated.ts` still declares `exclusiveMinimum: 0` for `groupChat.historyLimit` (lines 6113 and 17705), meaning JSON-schema-aware validators (IDE LSP, `pnpm config:schema:check`) will still reject `0` even after this Zod change. Per the repo's drift-detection flow, `pnpm config:schema:gen` must be run and the updated `schema.base.generated.ts` committed alongside this change.
How can I resolve this? If you propose a fix, please make it concise.| it("accepts zero to disable group history", () => { | ||
| expect(() => GroupChatSchema.parse({ historyLimit: 0 })).not.toThrow(); | ||
| }); |
There was a problem hiding this comment.
The test name says "disable group history" but limitHistoryTurns(messages, 0) returns all messages unchanged (unlimited), matching the established DM convention documented in pi-embedded-runner.get-dm-history-limit-from-session-key.falls-back-provider-default-per-dm-not.test.ts ("returns 0 when per-DM historyLimit is explicitly 0 (unlimited)"). Consider naming this "accepts zero to signal unlimited history" so the intent is consistent with the rest of the codebase.
| it("accepts zero to disable group history", () => { | |
| expect(() => GroupChatSchema.parse({ historyLimit: 0 })).not.toThrow(); | |
| }); | |
| it("accepts zero to signal unlimited history", () => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/config/zod-schema.core.regressions.test.ts
Line: 5-7
Comment:
**Misleading test description**
The test name says "disable group history" but `limitHistoryTurns(messages, 0)` returns all messages unchanged (unlimited), matching the established DM convention documented in `pi-embedded-runner.get-dm-history-limit-from-session-key.falls-back-provider-default-per-dm-not.test.ts` ("returns 0 when per-DM historyLimit is explicitly 0 (unlimited)"). Consider naming this `"accepts zero to signal unlimited history"` so the intent is consistent with the rest of the codebase.
```suggestion
it("accepts zero to signal unlimited history", () => {
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c60bfa20e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!this.fts.enabled || !this.fts.available) { | ||
| const fallbackResults = await this.searchKeywordFallback(cleaned, candidates); | ||
| return this.selectScoredResults(fallbackResults, maxResults, minScore, 0); |
There was a problem hiding this comment.
Keep vector search active when hybrid mode is off
When query.hybrid.enabled is false, this.fts.enabled is also false (set from hybrid config), so this new branch always runs and returns searchKeywordFallback(...), bypassing the vector results computed just above. That changes vector-only mode into keyword-only mode for all users who disable hybrid search, which can drop valid semantic matches and return empty results for paraphrased queries that previously worked.
Useful? React with 👍 / 👎.
|
Codex automated review: keeping this open. Keep this PR open. Current main still rejects Best possible solution: Keep this PR open, but ask the contributor to split/drop the unrelated memory-core changes or have a maintainer cherry-pick the scoped config fix: change What I checked:
Remaining risk / open question:
Codex Review notes: model gpt-5.5, reasoning high; reviewed against 4878d3e059ce. |
|
Thanks @samrusani for putting together the config fix here. I am closing this in favor of #65359 (#65359) because that PR is the narrower canonical path for the same Clownfish is not landing this branch as-is because it also includes unrelated memory-core search changes with an unresolved vector-only search regression review comment. I am keeping credit and attribution to this source PR, #65425, in the cluster record so maintainers can carry that forward if they borrow any of the scoped config work. If there is a distinct memory-core fix to pursue, please split it into a separate PR; if this config fix still differs from #65359, reply here and we can reopen or reclassify. |
Allow channels.groupChat.historyLimit to be set to 0 so users can disable group history consistently with the rest of the config schema.
After review:
Validation: