Skip to content

fix(config): correct compaction mode help text; repair main lint + qa-lab flake - #124656

Merged
steipete merged 4 commits into
mainfrom
codex/autoqa-compaction-mode-help
Aug 16, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/autoqa-compaction-mode-help

Conversation

@steipete

@steipete steipete commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three things, bundled per the broken-CI-is-your-job default:

  1. Config help contradicts shipped behavior: schema help for agents.defaults.compaction.mode told operators to Keep "default", but applyCompactionDefaults has written mode: "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.
  2. Flaky qa-lab assertion (hit this PR's CI): the matrix stalled-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 fires first the loop takes one residual deadline-clamped sleep. Assertion now protects the real invariant (bounded exit, ≤1 clamped sleep).
  3. Red main check-lint (hit this PR's CI): 5524092 introduced (options.interactive ?? process.stdin.isTTY) === true in scripts/check-changed.mts, rejected by the type-aware no-unnecessary-boolean-literal-compare lane. 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

  • applyCompactionDefaults at src/config/defaults.ts:546 ships mode: "safeguard"; docs already agree.
  • qa-lab harness test: 5/5 local reruns green after the assertion repair; sleepImpl typed so check-test-types passes (TS2493 fixed).
  • oxlint --type-aware scripts/check-changed.mts clean after the boolean fix; failing lane log: run 31955832138.
  • Codex autoreview (branch mode): clean.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 15:04
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 11:51 AM ET / 15:51 UTC.

ClawSweeper review

What this changes

Updates 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 readiness

⚠️ Ready for maintainer review - 2 items remain

No 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
Reviewed head: f993104a1d21460c4a32228014e00f693fdb8f7c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned maintenance patch with no discrete correctness finding; exact-head CI remains the normal landing check.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a repository-maintainer PR; the external-contributor real-behavior-proof gate does not apply, and the PR body records focused local QA and lint evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a repository-maintainer PR; the external-contributor real-behavior-proof gate does not apply, and the PR body records focused local QA and lint evidence.
Evidence reviewed 6 items Runtime default and contract: Current main materializes an unset compaction mode as "safeguard", and the focused config test asserts that behavior.
Branch help matches the owner behavior: The PR-head help text describes safeguard as the effective unset default and default mode as an explicit opt-out, matching runtime materialization and the public compaction documentation.
QA assertion follows the bounded owner path: The harness bounds each probe by the remaining deadline and only sleeps for the remaining budget; the PR test permits at most one such residual sleep, capped at 25 ms.
Findings None None.
Security None None.

How this fits together

Configuration 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]
Loading

Before merge

  • Resolve merge risk (P1) - Current main already contains the identical script cleanup, while this PR is behind main; refresh the branch and confirm exact-head CI on the resulting merged change before landing.
  • Complete next step (P2) - This maintainer-labeled PR needs normal exact-head landing review; there is no narrow automated repair to perform.
Agent review details

Security

None.

PR surface

Source 0, Tests +9, Other 0. Total +9 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 11 2 +9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 3 13 4 +9

Review metrics

Metric Value Why it matters
Production versus test delta production +2/-2 (net 0); tests +11/-2 Production changes are two replacements with no new configuration surface or runtime-default change; test growth records the bounded timing invariant.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is a small configuration-help correction plus CI/test reliability maintenance, without evidence of an active user-facing outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a repository-maintainer PR; the external-contributor real-behavior-proof gate does not apply, and the PR body records focused local QA and lint evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Available blame ties the compaction default, Matrix probe test, and harness owner path to this contributor; current main also records this contributor on the independent script lint repair. (role: current-main feature author and recent area contributor; confidence: high; commits: 81d44365ae2e, 5f561999a9d8; files: src/config/defaults.ts, src/config/schema.help.agents.ts, extensions/qa-lab/src/live-transports/matrix/substrate/harness.runtime-internals.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh against current main and verify that the script overlap is a no-op in the merge result.
  • Wait for all required checks on the exact refreshed head to complete successfully.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-16T15:10:09.752Z sha 7bdcfa15b5e1e6ac5045fa7f474ce4d276a9adc0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-16T15:22:32.012Z sha dc2157e8023dc388a043412e010366b8ffebbfff :: needs maintainer review before merge. :: none
  • reviewed 2026-08-16T15:35:48.789Z sha 9e22978da77b721e64401711b5b0e3684807b73e :: needs maintainer review before merge. :: none

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.
@steipete
steipete force-pushed the codex/autoqa-compaction-mode-help branch from 9e22978 to f993104 Compare August 16, 2026 15:45
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Aug 16, 2026
@steipete steipete changed the title docs(config): correct compaction mode help text default claim fix(config): correct compaction mode help text; repair main lint + qa-lab flake Aug 16, 2026
@steipete
steipete merged commit 43e9101 into main Aug 16, 2026
225 checks passed
@steipete
steipete deleted the codex/autoqa-compaction-mode-help branch August 16, 2026 15:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
…-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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant