Repository navigation
fix(config): correct compaction mode help text; repair main lint + qa-lab flake - #124656
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 11:51 AM ET / 15:51 UTC. ClawSweeper reviewWhat this changesUpdates compaction-mode help to describe the effective safeguard default, makes the Matrix QA timeout assertion tolerate one deadline-clamped residual sleep, and simplifies a lint-invalid boolean check. Merge readinessNo blocking findings. The help correction matches the runtime default, the QA assertion tracks the actual deadline-bound behavior, and the script cleanup is already independently present on current main; the remaining config and QA changes are still useful. Priority: P3 Review scores
Verification
How this fits togetherConfiguration help describes settings that runtime materialization applies before agents compact context. The Matrix QA harness probes candidate homeservers under a deadline, while the changed script classifies execution hosts for repository checks. flowchart LR
A[Operator configuration] --> B[Configuration help]
A --> C[Runtime config materialization]
C --> D[Context compaction]
E[Matrix versions probe] --> F[Deadline-bounded harness]
F --> G[QA assertion]
H[Check command inputs] --> I[Execution-host classification]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +9, Other 0. Total +9 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Refresh against main so the script-only overlap is a verified no-op, then land the help correction and deadline-bound QA assertion after exact-head checks are green. Do we have a high-confidence way to reproduce the issue? No live reproduction was run in this read-only review, but the owner loop makes the timing path source-reproducible: an inner probe timeout can precede the outer deadline check and leave one bounded sleep. Is this the best way to solve the issue? Yes. The help text now states the actual runtime default, and the QA assertion protects bounded exit rather than a timer-ordering artifact without altering production behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5f561999a9d8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
applyCompactionDefaults has written mode: "safeguard" for unset configs since dd1b08b, and docs/concepts/compaction.md documents that. The schema help string still told operators to 'Keep "default"' as if it were the shipped default — prompt/config text contradicting shipped behavior. Align the help string with the actual default.
The stalled-versions-probe test asserted sleepImpl is never called, but the inner AbortSignal.timeout (clamped to remainingMs) and the outer deadline timer race at ~timeoutMs: when the inner timer fires first the loop legitimately takes one residual sleep before Date.now() crosses the deadline. Flaked on CI shard changed-extensions-config-27 for an unrelated help-string PR. Protect the real invariant — bounded exit with at most one deadline-clamped sleep — instead of the timer-ordering artifact.
check-test-types rejects indexing an empty-tuple vi.fn mock call (TS2493); give sleepImpl its real (ms: number) signature.
no-unnecessary-boolean-literal-compare (type-aware lane) rejects '(options.interactive ?? process.stdin.isTTY) === true'; both operands are boolean, so use the expression directly. Broke check-lint on main via 5524092; fixed in this landing PR per the broken-CI default.
9e22978 to
f993104
Compare
|
Merged via squash.
|
…-lab flake (openclaw#124656) * docs(config): correct compaction mode help text default claim applyCompactionDefaults has written mode: "safeguard" for unset configs since b3850b3, and docs/concepts/compaction.md documents that. The schema help string still told operators to 'Keep "default"' as if it were the shipped default — prompt/config text contradicting shipped behavior. Align the help string with the actual default. * test(qa-lab): tolerate the residual sleep race in stalled-probe bound The stalled-versions-probe test asserted sleepImpl is never called, but the inner AbortSignal.timeout (clamped to remainingMs) and the outer deadline timer race at ~timeoutMs: when the inner timer fires first the loop legitimately takes one residual sleep before Date.now() crosses the deadline. Flaked on CI shard changed-extensions-config-27 for an unrelated help-string PR. Protect the real invariant — bounded exit with at most one deadline-clamped sleep — instead of the timer-ordering artifact. * test(qa-lab): type the stalled-probe sleep mock parameter check-test-types rejects indexing an empty-tuple vi.fn mock call (TS2493); give sleepImpl its real (ms: number) signature. * fix(scripts): use the interactive flag directly in virtualization probe no-unnecessary-boolean-literal-compare (type-aware lane) rejects '(options.interactive ?? process.stdin.isTTY) === true'; both operands are boolean, so use the expression directly. Broke check-lint on main via c84a2b7; fixed in this landing PR per the broken-CI default.
What Problem This Solves
Three things, bundled per the broken-CI-is-your-job default:
agents.defaults.compaction.modetold operators toKeep "default", butapplyCompactionDefaultshas writtenmode: "safeguard"for unset configs since dd1b08b (docs/concepts/compaction.md already documents this). Operators following the help string would explicitly opt out of the shipped default believing they were keeping it.sleepImplis never called, but the innerAbortSignal.timeout(clamped to remainingMs) and the outer deadline timer race at ~timeoutMs — when the inner fires first the loop takes one residual deadline-clamped sleep. Assertion now protects the real invariant (bounded exit, ≤1 clamped sleep).(options.interactive ?? process.stdin.isTTY) === truein scripts/check-changed.mts, rejected by the type-awareno-unnecessary-boolean-literal-comparelane. Fixed by using the boolean directly.Why This Change Was Made
Help text is part of the product contract; the two CI repairs follow "broken CI is always someone's job; default to making it yours — fix it in the landing PR."
User Impact
Config help now describes the real default. CI unblocked for every PR behind the lint break.
Evidence
applyCompactionDefaultsat src/config/defaults.ts:546 shipsmode: "safeguard"; docs already agree.sleepImpltyped so check-test-types passes (TS2493 fixed).oxlint --type-aware scripts/check-changed.mtsclean after the boolean fix; failing lane log: run 31955832138.