Skip to content

fix: restore main CI max-lines compliance - #120401

Closed
joshavant wants to merge 1 commit into
mainfrom
fix/embedded-runner-test-max-lines
Closed

joshavant wants to merge 1 commit into
mainfrom
fix/embedded-runner-test-max-lines

Conversation

@joshavant

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Resolves a problem where the check-lint CI job fails on main because the embedded-runner registry test file exceeds the max-lines limit.

Why This Change Was Made

Moves the queue and steering cases intact into a concept-owned colocated test suite. This keeps both suites below the ratchet without raising the limit or suppressing the rule; production behavior and coverage are unchanged.

AI-assisted: yes. The patch was independently reviewed with the repository autoreview workflow.

User Impact

There is no runtime or user-visible behavior change. Maintainers regain a passing max-lines check, and the affected tests are organized around clearer lifecycle and queue/steering boundaries.

Evidence

  • node scripts/run-vitest.mjs src/agents/embedded-agent-runner/runs.test.ts src/agents/embedded-agent-runner/runs.queue.test.ts
    • 2 files passed; 50 tests passed.
  • node scripts/check-max-lines-ratchet.mjs --base origin/main
    • Passed; grandfathered suppressions reduced from 988 to 987.
  • OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/embedded-agent-runner/runs.test.ts src/agents/embedded-agent-runner/runs.queue.test.ts
    • Passed with no lint findings.
  • ../../node_modules/.bin/oxfmt --check src/agents/embedded-agent-runner/runs.test.ts src/agents/embedded-agent-runner/runs.queue.test.ts
    • Both files use the expected format.
  • git diff --check
    • Passed.
  • Test declaration comparison: all 46 declarations are preserved across the two suites; parameterized cases still yield 50 passing tests.
  • Autoreview: clean, with no accepted or actionable findings.
  • Production LOC: +0/-0. Tests: +493/-456.

@joshavant
joshavant marked this pull request as ready for review August 8, 2026 00:56
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Aug 8, 2026
@joshavant joshavant closed this Aug 8, 2026
@joshavant joshavant reopened this Aug 8, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 7, 2026, 9:46 PM ET / August 8, 2026, 01:46 UTC.

ClawSweeper review

What this changes

The PR moves embedded-run queue and steering coverage into a colocated test suite to avoid a max-lines CI violation without changing production behavior.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Current main already satisfies the max-lines constraint through the merged lifecycle split, but this protected, currently conflicting PR needs a maintainer decision on whether its alternative queue-focused organization is still worth preserving.

Priority: P3
Reviewed head: c8fbd2c993dd48e0320d975876c6f07455f2070b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The test migration is mechanically sound, but proof is limited to tests and CI and the branch now conflicts with a current-main solution.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR supplies focused tests and green CI, but no after-fix real behavior evidence beyond those mocked or automation checks. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR supplies focused tests and green CI, but no after-fix real behavior evidence beyond those mocked or automation checks. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current main is already below the test-file limit: Current main's run-registry suite is 835 lines, while the test-file max-lines rule is 1,000; the current suite contains the queue/steering cases this branch relocates.
Canonical current-main split: Commit 644ad3b split lifecycle coverage into its own colocated suite, leaving the central CI condition resolved on main.
The branch would replace the current split after rebase: Relative to the PR target base, the head deletes the 397-line lifecycle suite, adds the 490-line queue suite, and rewrites the shared suite; GitHub also reports the PR as dirty.
Findings None None.
Security None None.

How this fits together

The embedded-agent run registry tracks active runs and accepts queued or steering messages while an agent is running. These tests verify that registry boundary before queued input reaches the running agent.

flowchart LR
  A[Incoming user message] --> B[Embedded run registry]
  B --> C[Active run handle]
  C --> D[Queue and steering]
  D --> E[Running agent]
  F[Colocated regression suites] --> B
Loading

Decision needed

Question Recommendation
Should this PR be closed as redundant now that current main is compliant through the lifecycle split, or should the queue-focused test organization replace that canonical layout? Close as redundant: Keep the merged lifecycle-owned split that already brings main below the test-file limit.

Why: Both layouts can satisfy the line limit, but the branch conflicts with a newer merged split and no longer repairs a current CI failure on its own.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR supplies focused tests and green CI, but no after-fix real behavior evidence beyond those mocked or automation checks. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The head is dirty against current main; resolving it requires choosing whether to retain the merged lifecycle-owned split or replace it with this queue-owned alternative.
  • Resolve merge risk (P1) - The branch’s stated baseline reduction is unsupported because it does not modify the max-lines baseline.
Agent review details

Security

None.

PR surface

Tests +37. Total +37 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 493 456 +37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 493 456 +37

Review metrics

Metric Value Why it matters
Production versus test delta production +0/-0; tests +493/-456 The branch is test-only, so its remaining value is limited to whether its suite organization is preferable to the already-merged split.
Max-lines baseline delta 0 changed The unchanged baseline contradicts the claimed suppression reduction and confirms that the branch does not independently ratchet debt down.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the current lifecycle-owned split as the canonical CI repair unless an owner explicitly prefers the queue-focused organization, in which case rebase and revalidate that deliberate replacement.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the current lifecycle-owned split as the canonical CI repair unless an owner explicitly prefers the queue-focused organization, in which case rebase and revalidate that deliberate replacement.

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

No: current main's 835-line run-registry suite is already below the 1,000-line test-file limit, with no new baseline suppression.

Is this the best way to solve the issue?

No: current main already resolves the stated CI problem with a lifecycle-owned split; this alternate organization needs an explicit owner preference before it displaces that layout.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5a79d19ba179.

Labels

Label changes:

  • add P3: This is internal test-suite and CI-policy maintenance with no production behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR supplies focused tests and green CI, but no after-fix real behavior evidence beyond those mocked or automation checks. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is internal test-suite and CI-policy maintenance with no production behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR supplies focused tests and green CI, but no after-fix real behavior evidence beyond those mocked or automation checks. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current-main lifecycle split and the preceding steering refactor on this test surface. (role: recent area contributor; confidence: high; commits: 644ad3bf41c6, fa9626c4e100; files: src/agents/embedded-agent-runner/runs.test.ts, src/agents/embedded-agent-runner/runs.lifecycle.test.ts)
  • joshavant: Has recent merged work in the embedded-runner area in addition to the proposed test split. (role: recent adjacent contributor; confidence: medium; commits: 5cc2fa624925, c8fbd2c993dd; files: src/agents/embedded-agent-runner/runs.test.ts, src/agents/embedded-agent-runner/runs.queue.test.ts)

Rank-up moves

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

  • Rebase onto current main and state whether the queue suite should replace the merged lifecycle suite.
  • Post a redacted terminal capture from the exact head showing the relevant line-ratchet and focused-suite results.

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.

@joshavant joshavant closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant