Skip to content

test(terminal): cover C1 control filtering#103439

Merged
steipete merged 1 commit into
mainfrom
codex/test-terminal-c1-controls
Jul 10, 2026
Merged

test(terminal): cover C1 control filtering#103439
steipete merged 1 commit into
mainfrom
codex/test-terminal-c1-controls

Conversation

@steipete

@steipete steipete commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Closes #103435

What Problem This Solves

Fixes a release-proof gap where the C1-control filtering landed in #103274 had no focused regression coverage, so an off-by-one or removal regression could pass the existing terminal buffer tests.

Why This Change Was Made

The test now covers a valid C1 CSI sequence, every residual C1 character from U+0080 through U+009F, and both adjacent boundaries: DEL remains filtered while U+00A0 and tabs remain visible. Production code is unchanged.

User Impact

No runtime behavior changes. Release and future refactor validation now protect the intended terminal.text plain-text contract.

Evidence

  • Rebased exact head: b1c3b899910cf58aaa0d1b0bf29d6bc2b1cb4f6c on current main base 7b03a2ae201ab9c27dc3bc39569e97c9f9582360; original patch-id preserved.
  • Blacksmith Testbox tbx_01kx5tbg2gqvkkkgxrv15bjban: final-head focused gateway proof passed in all four routed projects (4 files, 24 tests).
  • Same Testbox: corepack pnpm check:changed passed (coreTests typecheck, lint, and guards).
  • Mutation proof: temporarily reverting the production C1 filter made the new full-range assertion fail in all four gateway projects (20 existing tests passed, 4 new regression instances failed); restoring the filter returned the suite to green. The mutation branch was never pushed.
  • Broad Testbox run included the touched test successfully. Four unrelated shards failed: an aggregate-only UI custom-element registration collision (focused cron test: 3/3 passed), a stale QA scenario count, stale OpenAI default-model expectations, and Signal monitor mock-delivery failures.
  • git diff --check: passed.
  • Fresh Codex autoreview on the final rebased head: no accepted or actionable findings; patch correct (0.94).
  • Scope: one test file, +9/-1; no production or changelog changes.

The previous exact-head CI failure was unrelated: test/scripts/tsdown-build.test.ts observed an already-dead process-group child. Fresh exact-head hosted checks are rerunning after the rebase.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Jul 10, 2026
@steipete
steipete force-pushed the codex/test-terminal-c1-controls branch from 311b5f1 to 66af534 Compare July 10, 2026 07:11
@steipete steipete self-assigned this Jul 10, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 10, 2026
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 6:53 AM ET / 10:53 UTC.

Summary
Adds focused regression coverage for complete C1 CSI sequences, the residual U+0080–U+009F range, and adjacent DEL, U+00A0, and tab boundaries in terminal buffer text rendering.

PR surface: Tests +8. Total +8 across 1 file.

Reproducibility: yes. Current main implements C1 filtering in renderTerminalBufferText, while its owning focused test lacks C1 sequence, range, and boundary assertions.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #103435
Summary: This PR is the direct candidate fix for the paired regression-coverage issue; the merged runtime PR is implementation provenance rather than a substitute for the remaining test work.

Members:

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

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] The branch is behind current main and should receive the planned final base refresh before merge; live GitHub still reports it mergeable, so this is sequencing rather than a patch defect.

Maintainer options:

  1. Decide the mitigation before merge
    Refresh the branch onto current main and land the focused assertions without production changes, preserving terminal-core as owner of complete ANSI parsing and the gateway renderer as owner of residual control filtering.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The open PR already contains the complete narrow fix; normal base refresh and maintainer landing are the remaining actions, not a separate repair job.

Security
Cleared: The single existing-test-file change adds no dependency, workflow, permission, secret, artifact-download, package-resolution, or executable supply-chain surface.

Review details

Best possible solution:

Refresh the branch onto current main and land the focused assertions without production changes, preserving terminal-core as owner of complete ANSI parsing and the gateway renderer as owner of residual control filtering.

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

Yes. Current main implements C1 filtering in renderTerminalBufferText, while its owning focused test lacks C1 sequence, range, and boundary assertions.

Is this the best way to solve the issue?

Yes. Extending the existing owning test with exhaustive boundary cases is the narrowest maintainable solution and avoids production churn or a duplicate harness.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6eb9a5ada23b.

Label changes

Label changes:

  • add P3: This is a small, test-only reliability improvement that protects existing behavior without runtime or upgrade impact.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled PR changes only regression tests and no runtime behavior; its exact-head focused Testbox and changed-check results are the appropriate evidence.

Label justifications:

  • P3: This is a small, test-only reliability improvement that protects existing behavior without runtime or upgrade impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled PR changes only regression tests and no runtime behavior; its exact-head focused Testbox and changed-check results are the appropriate evidence.
Evidence reviewed

PR surface:

Tests +8. Total +8 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 9 1 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 9 1 +8

What I checked:

Likely related people:

  • steipete: He performed the land-ready review and squash merge for the runtime C1 filter, is a co-author of that landed commit, and is assigned to this paired follow-up. (role: merger and recent area contributor; confidence: high; commits: a3f9f3567f71; files: src/gateway/terminal/buffer-text.ts, src/gateway/terminal/buffer-text.test.ts)
  • lsr911: They authored the merged runtime change that extended terminal buffer filtering through the C1 range protected by this test. (role: introduced behavior; confidence: high; commits: a3f9f3567f71; files: src/gateway/terminal/buffer-text.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@steipete
steipete force-pushed the codex/test-terminal-c1-controls branch from 66af534 to ebb1cfc Compare July 10, 2026 10:58
@steipete
steipete force-pushed the codex/test-terminal-c1-controls branch from ebb1cfc to b1c3b89 Compare July 10, 2026 11:15
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head b1c3b899910cf58aaa0d1b0bf29d6bc2b1cb4f6c:

  • Blacksmith Testbox tbx_01kx5tbg2gqvkkkgxrv15bjban: corepack pnpm test src/gateway/terminal/buffer-text.test.ts passed all four routed projects (4 files, 24 tests).
  • Same Testbox: corepack pnpm check:changed passed core test typecheck, lint, and guards.
  • Mutation proof: excluding U+0080 from the production C1 range failed exactly the four new replicated assertions while the 20 pre-existing tests passed; production was restored byte-for-byte before push.
  • Exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/29088881299
  • Fresh Codex autoreview: no accepted/actionable findings.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 103439: passed the repository hosted exact-head gate.

Known broad-suite gaps are unrelated to this test-only gateway diff: aggregate-only custom-element registration in ui/src/pages/cron/cron-page.test.ts (focused test passes 3/3), stale scenario count in extensions/qa-lab/src/ci-smoke-plan.test.ts, stale default-model expectations in extensions/openai/provider-auth.contract.test.ts, and Signal mock-delivery failures in extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts. The touched gateway test passed in the broad run.

@steipete
steipete merged commit c8655be into main Jul 10, 2026
104 checks passed
@steipete
steipete deleted the codex/test-terminal-c1-controls branch July 10, 2026 11:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

[Bug]: terminal.text C1 filtering lacks regression coverage

1 participant