Skip to content

perf(ci): skip baseline inventory when line-cap debt is empty - #189909

Merged
vincentkoc merged 1 commit into
mainfrom
perf-ci-line-cap-empty-debt-next100-20261101
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf-ci-line-cap-empty-debt-next100-20261101

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

An under-cap repair has no historical line-cap debt to compare, but the ratchet still enumerates the full baseline tree. Gate that inventory on the same nonempty violation set already used by rename/debt collection. Head checks and over-cap historical debt checks stay intact.

Validation:

  • All 13 owner cases pass on Node and Bun, including over-cap debt, rename, real partial-clone and guarded lint execution paths.
  • Restoring the original inventory owner makes both under-cap regressions fail: it performs one unused inventory call where zero are required.
  • Matching tooling/scripts test types, type-aware lint, formatting and diff checks pass. Independent structured review is clean; trusted-source proof used the qualified local fallback after the remote backend was unavailable.

The frozen baseline inventory contains 61,827 paths / 2,961,525 bytes. Under-cap repairs now avoid that unused command; these are inventory sizes, not a timing or billing estimate.

Tooling: +2 lines for the missing ownership guard. Tests: +22. No new configuration or public API.

The published CLI was also run against a disposable Git repository with a three-line limit and a five-line baseline. Reducing the file to three lines exited 0. Git’s trace recorded zero full baseline inventories. Growing the same file to six lines exited 1 with the five-to-six-line violation, and the trace recorded exactly one recursive baseline inventory. The CLI used its declared oxlint 1.88.0.

@clawsweeper

clawsweeper Bot commented Nov 1, 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.

@vincentkoc vincentkoc self-assigned this Nov 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 1, 2026 01:00
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Nov 1, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR skips the baseline Git tree inventory when changed files have no line-cap violations.

Example: A file shrinks from five counted lines to three under a three-line cap.

  • Before: The check succeeds but still inventories the baseline tree.
  • After: The check succeeds without that inventory.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct optimization with passing CI and useful owner-boundary regressions; behavior evidence remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling PR is outside the ordinary contributor proof gate; supplied evidence covers in-process real Git/oxlint regressions and reported base failures, without a shipped CLI trace of the changed inventory behavior.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Developers and CI enumerate the full baseline tree even when all changed sources already satisfy their line caps.
Reason: Removing an unused Git subprocess and its inventory is useful at minimal complexity, follows prior optimization intent, and has maintainer-authored direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR removes demonstrably unused work, preserves line-cap enforcement, and has no actionable correctness findings.

Priority: P3
Reviewed head: 1bf9c0d5d3c91fba6a54c0b77f7e31198c4cc2ae

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied CLI trace demonstrates the changed under-cap path omitting the baseline inventory.
Agent review details

How this fits together

The development and CI line-cap checker measures changed sources with oxlint, compares remaining violations against historical allowances, and reports growth.

flowchart TD
 A[Changed Git paths] --> B[Measure current sources]
 B --> C{Over cap}
 C -->|Yes| D[Read baseline inventory and debt]
 D --> E[Compare allowances]
 C -->|No| F[Report success]
 E --> F
Loading

Technical review

Best possible solution:

Use the existing violation set to gate baseline inventory while retaining current-source validation and historical allowances for over-cap files.

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

Current main unconditionally inventories the baseline after measuring head violations, even though an empty violation set leaves no historical paths to consume; no target code was executed during this review.

Is this the best way to solve the issue?

The guard is the smallest complete fix in the existing owner and preserves the historical comparison whenever it can affect the result.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 04d6904c734a.

Provenance checked

  • Baseline inventory and historical debt keeps the original intent (c1f00ed: The original checker inventories baseline paths to distinguish existing historical allowances from new files; the later optimization in perf(tooling): skip unused historical blobs in line-cap checks #173340 made historical reads conditional on remaining violations.)
  • Regression fixtures keeps the original intent (c742bdc: The partial-clone fixture protects against unnecessary historical hydration; this patch retains that assertion and adds observation of the remaining unused inventory.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Smallest complete production change: The introduced patch gates only the baseline inventory on after.size; head measurement precedes the guard, and over-cap files retain historical source loading and rename handling. (scripts/check-line-cap-ratchet.mts:215, 1bf9c0d5d3c9)
  • Current main still performs the inventory: The affected files are unchanged between the introduction base and fetched main; main still inventories the tree unconditionally. (scripts/check-line-cap-ratchet.mts:214, 04d6904c734a)
  • Existing optimization intent: perf(tooling): skip unused historical blobs in line-cap checks #173340 deferred historical blobs and rename detection until violations remained; this PR extends that same intent to the leftover inventory operation. (scripts/check-line-cap-ratchet.mts:212, c742bdc9b338)
  • Focused regression coverage: Existing real Git and oxlint fixtures now observe inventory work for ordinary and partial-clone under-cap repairs, with an over-cap positive control; the body reports both under-cap assertions fail when the original inventory is restored. (test/scripts/check-line-cap-ratchet.test.ts:28, 1bf9c0d5d3c9)
  • Current-head CI: The reviewed head has successful openclaw/ci-gate, baseline-ratchet, changed-test, lint, and typecheck checks; cancelled review or dispatch checks do not establish a patch failure. (1bf9c0d5d3c9)
  • Review policy and history scope: Read root, scripts, and test AGENTS.md and applied the performance, test-value, and simplification rules; no maintainer-notes directory exists. Available history establishes the original checker and subsequent optimization; follow-history traversal encountered an unavailable older object. (AGENTS.md, 1bf9c0d5d3c9)

Likely related people:

  • Peter Steinberger: Raw commit c742bdc adds scripts/check-line-cap-ratchet.mts:179 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c742bdc9b338; files: scripts/check-line-cap-ratchet.mts)
  • Vincent Koc: Raw commit 58ad97d adds scripts/check-line-cap-ratchet.mts:130 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 58ad97d91b79; files: scripts/check-line-cap-ratchet.mts)

PR surface

Tests +22, Other +2. Total +24 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 23 1 +22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 1 +2
Total 2 26 2 +24

Review metrics

Metric Value Why it matters
Production versus test delta Production +3/-1; tests +23/-1 The small production guard is supported by instrumentation added to existing regression fixtures without new production machinery.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This removes unnecessary developer and CI work without changing runtime behavior or repairing an urgent workflow failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed October 31, 2026, 9:14 PM ET / November 1, 2026, 01:14 UTC.

@vincentkoc
vincentkoc merged commit 2da3204 into main Nov 27, 2026
179 of 181 checks passed
@vincentkoc
vincentkoc deleted the perf-ci-line-cap-empty-debt-next100-20261101 branch November 27, 2026 07:58
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 27, 2026
…restoration-ci-189390-20261127

* commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  fix(agents): skip the bootstrap ritual in one-shot runs (#206477)
  fix(test): preserve stack coordinates in redacted failure reports (#152384)
  fix(gateway): return consistent unavailable response guidance (#191933)
  fix: preserve emphasis in Markdown table row labels (#205349)
  fix(nextcloud-talk): keep webhook spool helpers private (#206470)
  perf(plugins): overlay native receipts once per visible root (#206464)
  fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129)
  perf(config): retain one snapshot for unchanged validation results (#206465)
  refactor(test): reuse canonical secret fixture cleanup (#189492)
  refactor(subagents): own descendant Stop cancellation (#206444)
  refactor(subagents): keep announce cleanup action type private (#206407)
  ...
vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (2115 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (923 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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