Repository navigation
ci: allow up to 400 net test lines per PR without an allocation record - #197602
Conversation
Gate the test-line budget on the change's own net delta against its comparison base. Up to 400 net lines need no record; records that the change adds or raises cover the excess. Remove the shared scalar ceiling, inherited-debt reconciliation, --prune and the merged allocation records that the delta gate makes inert. Co-authored-by: obviyus <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Deleting 2,648 records in one PR crashes actions/labeler (write EINVAL). The records give no credit under the delta gate, so they can be removed separately. Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces the aggregate test-line ceiling with a 400-line allowance per change and allocation records covering additional growth. Example: A PR adds 400 net test lines without an allocation record.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review The prior finding is resolved, and this maintainer-authored PR has no remaining actionable findings; exact-head CI is still pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe repository checker receives a Git comparison base, measures net test-source newline growth and changed allocation credit, and returns a pass or actionable failure to local checks and CI. flowchart TD
A[Local checks and CI] --> B[Resolve comparison base]
B --> C[Count net test lines]
B --> D[Compare allocation records]
C --> E[Apply 400 line allowance]
D --> E
E --> F[Pass or actionable failure]
Technical reviewBest possible solution: Retain the simpler per-change checker and its updated policy documentation under the normal CI gates. Do we have a high-confidence way to reproduce the issue? This is an intentional validation-policy change; current-main source and the linked allocation finding establish the reported contributor friction. Is this the best way to solve the issue? The existing checker remains the sole decision owner, and the diff removes obsolete aggregate machinery without introducing parallel policy or state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c4a8dcd0eb61. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -174, Docs -15, Other -65. Total -254 across 7 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 12, 2026, 2:41 AM ET / 07:41 UTC (Revision 2). |
Co-authored-by: obviyus <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The per-PR allowance (#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
The per-PR allowance (#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
The per-PR allowance (#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
Integrate main 4eb318d to pick up the test-line owner repair in #197602 after CI run 43186299836 rejected six added fixture lines under the old shared scalar ceiling. The ONNX test delta is byte-identical. The real synthetic native integration passes with its original timeout, along with the repaired budget gate, root typechecks and focused lint. Fresh Codex review found no actionable issue through P2. Preserve the previous failed CI and investigated local timeouts in the PR evidence.
Preserve the upstream test-growth policy and dynamic dependency roots: #196370 #197250 #197602 Remove only the superseded task-owned 128-line grant. Keep the original 157-line record, upstream Doctor allocation and retired scalar deletion. The staged checker against 0626eb5 passed: net +157, allowance 400, allocation credit 157. The measured workload remains frozen at 79f5aeb.
openclaw#197602) * ci: allow up to 400 net test lines per PR without an allocation record Gate the test-line budget on the change's own net delta against its comparison base. Up to 400 net lines need no record; records that the change adds or raises cover the excess. Remove the shared scalar ceiling, inherited-debt reconciliation, --prune and the merged allocation records that the delta gate makes inert. Co-authored-by: obviyus <[email protected]> * ci: keep merged test-line allocation records Deleting 2,648 records in one PR crashes actions/labeler (write EINVAL). The records give no credit under the delta gate, so they can be removed separately. Co-authored-by: obviyus <[email protected]> * ci: drop records restored from a newer main Co-authored-by: obviyus <[email protected]> * docs(testing): cite the incidents behind the test-line allowance Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: obviyus <[email protected]>
…#197655) The per-PR allowance (openclaw#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
…#197656) The per-PR allowance (openclaw#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
…#197657) The per-PR allowance (openclaw#197602) gives credit only for records a PR adds or raises, so merged records no longer affect the check. Split into three PRs because CI passes the changed-path list in one env var, and one string over 128 KiB makes the check jobs fail to start (E2BIG). Co-authored-by: obviyus <[email protected]>
… merging main Main's Dreaming enablement and failed-read fixes pushed memory-panel-state.ts and memory-panel.test.ts over their line caps together with this PR's additions. Move the wiki.get reply normalization into wiki-page-preview.ts and the slot-owner tests into memory-panel.slot-owner.test.ts, unchanged. Since openclaw#197602 allows 400 net test lines per PR, the allocation record now only covers the remaining 117 of the PR's +517.
Problem
scripts/check-test-lines-ratchet.mtscompared the whole tree with a shared scalar ceiling plus everyconfig/test-lines-allocations/*.txtrecord. Any net test-line growth needed a ledger record, including the one or two regression tests the rootAGENTS.mdrequires for a fix. This blocked several recent PRs with "Allocate…" findings (#197528, #197474, #197471, #197519) and forced a 502-line allocation on #197501.Solution
Net test lines: +401; allowance: 400; allocation credit: 0.and thenDelete or consolidate tests to remove 1 lines, or add a justified config/test-lines-allocations/<change>.txt record of 1 …The delta gate makes the rest of the old design unnecessary, so this PR removes it:
config/test-lines-baseline.txtand the total-tree count--prune. Nothing calls it; CI already rejects it. It now fails with a clear error and does not do nothing silently.All callers were checked:
ci.yml(release fast lane andchecks-fast-baseline-ratchets),scripts/ci-baseline-ratchets.mts,scripts/ci-main-push-checks.sh,changed-path-facts.mjsandnode-runtime-conformance.yml. They all pass--base, or they classify the allocation path. That path stays valid for new records. Docs updated: the testing skill,writing-tests.md"Cost budget" andlocal-proof.md"test-line budget".The 2,648 merged allocation records now give no credit. This PR keeps them: deleting them all in one PR crashes
actions/labelerwithwrite EINVAL. This happened on both attempts of run 43173827401, and it happened only on this PR. They can be deleted later in smaller batches.Accepted edge case: a
mainpush compares against the previous tip. If one push contains several squash commits, their deltas are added together. Squash merges usually push one commit, and the result is a visible, recoverable failure. This is documented inlocal-proof.md.pr-simplify
ci-workflow-guards).config/test-lines-baseline.txt.Evidence
oxfmt --checkandoxlinton the changed files pass.pnpm test test/scripts/check-test-lines-ratchet.test.ts: 2 passed.ci-workflow-guards.test.ts -t "release fast lane",ci-baseline-ratchets.test.tsandchanged-path-facts.test.tspass.--base origin/main:Test lines OK. Net test lines: -174; allowance: 400; allocation credit: 0.(exit 0)Net test lines: +401; allowance: 400; allocation credit: 0.(exit 1). With a 1-line record added:Test lines OK. Net test lines: +401; allowance: 400; allocation credit: 1.(exit 0)pnpm docs:check-links: 0 broken links.git diff --checkis clean.