Config/Compaction: expose safeguard preserve and quality settings#25557
Config/Compaction: expose safeguard preserve and quality settings#25557jalehman merged 7 commits intoopenclaw:mainfrom
Conversation
| recentTurnsPreserve: compactionCfg?.recentTurnsPreserve, | ||
| qualityGuardEnabled: compactionCfg?.qualityGuard?.enabled, | ||
| qualityGuardMaxRetries: compactionCfg?.qualityGuard?.maxRetries, |
There was a problem hiding this comment.
postIndexSync config is exposed but never consumed
The config field agents.defaults.compaction.postIndexSync is added to types, schema, help, and labels, but it's not actually read or passed to the runtime anywhere. Either wire it up or remove it from this PR.
Check where memory index sync should happen after compaction and pass this value through.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/pi-embedded-runner/extensions.ts
Line: 85-87
Comment:
`postIndexSync` config is exposed but never consumed
The config field `agents.defaults.compaction.postIndexSync` is added to types, schema, help, and labels, but it's not actually read or passed to the runtime anywhere. Either wire it up or remove it from this PR.
Check where memory index sync should happen after compaction and pass this value through.
How can I resolve this? If you propose a fix, please make it concise.85b0790 to
cc731b9
Compare
cc731b9 to
106b53d
Compare
ea5f9ec to
a58abce
Compare
a58abce to
45a95d3
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
45a95d3 to
a61669e
Compare
|
Rebased #25557 onto latest Scope cleanup in latest commits (
Local verification:
@greptile-apps please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c99260a0aa
ℹ️ 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({ | ||
| enabled: z.boolean().optional(), | ||
| maxRetries: z.number().int().nonnegative().optional(), | ||
| maxRetries: z.number().int().min(0).max(3).optional(), |
There was a problem hiding this comment.
Avoid rejecting existing qualityGuard maxRetries values
Capping agents.defaults.compaction.qualityGuard.maxRetries at 3 in schema validation introduces a config-compatibility regression: configs that previously set any non-negative value (accepted before and effectively clamped at runtime) will now fail validation during config load/startup instead of running with the same clamped behavior. This only affects installations that already have maxRetries > 3, but for those users it is a hard boot/config error rather than a no-op tuning value.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR exposes two new compaction safeguard config knobs — Key changes:
Confidence Score: 4/5
|
|
Follow-up in 3e2af97:
Local verification:
@greptile-apps please review |
|
@jalehman Hi Josh, it's me again :-) |
1c14d9a to
ea99040
Compare
|
Merged via squash. Thanks @rodrigouroz! |
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
…enclaw#25557) Merged via squash. Prepared head SHA: ea99040 Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com> Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com> Reviewed-by: @jalehman
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
agents.defaults.compaction.recentTurnsPreserveagents.defaults.compaction.qualityGuard.enabledagents.defaults.compaction.qualityGuard.maxRetriesSecurity Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
pnpm vitest run src/agents/pi-extensions/compaction-safeguard.test.tspnpm tsgoExpected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/config/types.agent-defaults.ts,src/config/zod-schema.agent-defaults.ts,src/config/schema.help.ts,src/config/schema.labels.tsRisks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.Stack: rebased after #25556 merge; no remaining stack dependency.