Skip to content

fix(test): restore the main test-line budget after warm reload changes - #196432

Merged
steipete merged 2 commits into
mainfrom
steipete/perf-micro-main-red-test-lines-196385-20260919
Nov 10, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/perf-micro-main-red-test-lines-196385-20260919

Conversation

@steipete

@steipete steipete commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the main security-fast test-line ratchet failure introduced by #196385 and increased by #196416.

User Impact

Restores the test-line budget with zero spare headroom. No runtime behavior or test coverage changes.

Why This Change Was Made

#196385 added 30 test lines against 21 lines of available headroom, leaving nine unallocated lines. Its warm-frame yielding, latest-history, composer identity, cancellation, and one-shot-port lint coverage protect distinct boundaries; deleting them to satisfy the counter is not justified. Later #196305 removed one test line, reducing the remaining warm-reload debt to eight.

#196416 added 36 lines (23 in child-memory tests and 13 in supervisor tests) but allocated only 33. Correct that allocation by three and add the remaining eight for warm reload. #196423 added and allocated exactly 252 lines and needs no correction. The shared scalar stays unchanged.

This exact 11-line reconciliation is maintainer-authorized. Production/test LOC delta: 0; allocation metadata net: +4 lines. Checked overlapping open work: #196212 changes separate mention tests and #194489 changes the scalar; neither edits these records.

Evidence

Current comparison base: 568d89f3a4e82d13ecca4ed602c46a04bda322f0.

  • Original reproduction on ea3eb71a0263: actual checker failed against 26ad45c77d4b96c55271850ab583d0f17b473ea3 (delta +318) and e27557203a52 (delta +252): 6,615,748 lines / 6,615,736 ceiling; over by 12.
  • Main advanced before landing: fix(diagnostics): batch CPU profiles to avoid repeated startup stalls #196422 added and allocated 92 lines; fix(agents): allow silent native completion fallback #196305 removed one test line. The old 12-line grant correctly fails against new main: allocation credit 12 exceeds allowed ceiling growth 11. The initial merge was stopped before dispatch.
  • Final patch: comparisons against the original base, current main, and current main's parent all pass at 6,615,839 lines / 6,615,839 ceiling; zero slack.
  • Existing ratchet suite: 14/14 passed, 5.52 seconds Vitest / 7.17 seconds wrapper wall time. It verifies exact inherited-debt reconciliation and rejection of excess credit; its source and dependencies are unchanged by this refresh.
  • Fresh Codex autoreview of the final local patch against the current comparison base, through P2: scoped-clean, no findings.
  • git diff --check and pnpm check:changed pass.

The executable reproduction is node --import ./scripts/tsx.mjs scripts/check-test-lines-ratchet.mts --base <sha> --no-merge-base. Runtime performance measurements and UI browser proof are inapplicable: only allocation records change. The earlier head's green CI and zero-finding ClawSweeper review are historical evidence; landing requires fresh exact-head results.

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review November 10, 2026 04:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T04:47:00.745733Z 25dca35 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR increases the procfs allocation from 33 to 36 lines and adds eight lines of warm-reload allocation.

Example: The current tree contains 6,615,839 tracked test lines.

  • Before: The effective ceiling is 6,615,828, leaving 11 lines of inherited debt.
  • After: The effective ceiling is 6,615,839, with zero slack.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A minimal, source-verified accounting repair with direct checker output and no open findings; pending CI remains a normal landing gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The actual checker entry point is documented with before/after output: the refreshed 12-line grant is rejected, while the final allocation passes at 6,615,839 lines and ceiling with zero slack across the stated comparison bases; independent read-only accounting confirms the final total.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Contributors adding justified tests inherit main's budget deficit and fail the test-line gate.
Reason: The maintainer-authorized reconciliation restores accurate accounting without weakening tests or changing checker policy.

Merge readiness

✅ Ready for maintainer review

This PR correctly reconciles the remaining 11-line budget deficit without removing regression coverage or creating spare headroom; no findings remain.

Priority: P2
Reviewed head: 25dca3502dfc80dc16c9cd5455163d59cb1ced66

Before merge

None.

Findings

None.

Agent review details

How this fits together

The repository's test-line checker reads tracked test sources, the shared scalar, and allocation records, then reports whether CI's comparison satisfies the budget.

flowchart LR
  A[Tracked test sources] --> D[Test line checker]
  B[Shared scalar] --> D
  C[Allocation records] --> D
  E[Comparison base] --> D
  D --> F[CI budget result]
Loading

Technical review

Best possible solution:

Retain the exact 11-line reconciliation and complete the existing exact-head CI gates.

Do we have a high-confidence way to reproduce the issue?

The reported checker failure matches the source rules and independently verified 11-line main deficit; this read-only review did not execute the checker.

Is this the best way to solve the issue?

The two record edits are the smallest complete repair using the existing allocation owner, preserving distinct coverage and the shared scalar.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 568d89f3a4e8.

Provenance checked

  • Procfs regression allocation keeps the original intent (e275572: Allocate coverage for oversized procfs records, cgroup accounting, and supervisor behavior; the merged test growth totals 36 rather than the recorded 33.)
  • Independent allocation and inherited-debt accounting keeps the original intent (4c6f043: Permit approved exact debt reconciliation while bounding grants so they cannot create extra headroom; separate allocation records preserve independent merging.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Other +4. Total +4 across 2 files. Added test files: 0.

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

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: canonical
Canonical: #196432
Summary: This PR owns the inherited allocation deficit also encountered by a separate agent-runtime repair.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Inherited budget debt blocks otherwise valid test-growing contributions, with no runtime user impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-10T04:36:16.258Z sha 2852f29d4a9cd957038f3fe695325633f3c9fa8c :: needs maintainer review before merge. :: none

Reviewed November 9, 2026, 11:50 PM ET / November 10, 2026, 04:50 UTC (Revision 2).

Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar.
Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
@steipete
steipete force-pushed the steipete/perf-micro-main-red-test-lines-196385-20260919 branch from 2852f29 to 25dca35 Compare November 10, 2026 04:44
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The previous review had zero findings/open items. Before merge, main #196305 removed one test line, reducing inherited debt from 12 to 11. I stopped the merge before dispatch, refreshed onto main 568d89f, and reduced the warm allocation from nine to eight (config/test-lines-allocations/warm-chat-transcript-mount.txt:4). The procfs correction remains +3 (config/test-lines-allocations/procfs-readfile-buffer.txt:3).

The old grant fails on the refreshed base with "allocation credit 12 exceeds allowed ceiling growth 11". The final patch passes against original base, current main, and current main parent at 6,615,839 / 6,615,839, zero slack. pnpm check:changed and fresh Codex autoreview through P2 pass. The body contains the final evidence; fresh exact-head CI is running. No runtime or test source changed.

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@steipete
steipete merged commit 644ff7d into main Nov 10, 2026
89 of 91 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-red-test-lines-196385-20260919 branch November 10, 2026 04:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

RomneyDa pushed a commit that referenced this pull request Nov 10, 2026
#196432)

* fix(test): reconcile warm reload and procfs test-line debt

Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar.

* fix(test): account for the latest main test-line offset

Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.

(cherry picked from commit 644ff7d)
RomneyDa added a commit that referenced this pull request Nov 10, 2026
…esults (#196266)

* improve(tool-search): show input signatures for MCP tools in search results

tool_search rendered input "unknown" for every MCP tool, so models called
tool_describe before almost every MCP call. Render the same bounded,
structure-only signature used for OpenClaw tools from the MCP input schema.
Client tools keep "unknown" because Code Mode lists them in its system prompt
from the same compact entries.

Remote schemas can carry huge literals, so string literals longer than the
hint budget are rejected before serialization. Code Mode prompt construction
skips MCP entries before compaction; it never listed them.

Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>

* improve(tool-search): show input signatures for MCP tools in search results

Worked on by:
- @jalehman
- @GrahamMcBain

Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e

* fix(test): restore the main test-line budget after warm reload changes (#196432)

* fix(test): reconcile warm reload and procfs test-line debt

Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar.

* fix(test): account for the latest main test-line offset

Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.

(cherry picked from commit 644ff7d)

* test(agents): align host-denial proof with immediate failure settlement

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
openclaw#196432)

* fix(test): reconcile warm reload and procfs test-line debt

Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar.

* fix(test): account for the latest main test-line offset

Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…esults (openclaw#196266)

* improve(tool-search): show input signatures for MCP tools in search results

tool_search rendered input "unknown" for every MCP tool, so models called
tool_describe before almost every MCP call. Render the same bounded,
structure-only signature used for OpenClaw tools from the MCP input schema.
Client tools keep "unknown" because Code Mode lists them in its system prompt
from the same compact entries.

Remote schemas can carry huge literals, so string literals longer than the
hint budget are rejected before serialization. Code Mode prompt construction
skips MCP entries before compaction; it never listed them.

Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>

* improve(tool-search): show input signatures for MCP tools in search results

Worked on by:
- @jalehman
- @GrahamMcBain

Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e

* fix(test): restore the main test-line budget after warm reload changes (openclaw#196432)

* fix(test): reconcile warm reload and procfs test-line debt

Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar.

* fix(test): account for the latest main test-line offset

Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.

(cherry picked from commit b67d29e)

* test(agents): align host-denial proof with immediate failure settlement

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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