Skip to content

test: make suppression inventory independent of line numbers - #139769

Merged
steipete merged 1 commit into
mainfrom
codex/plugin-lifecycle-brittle-tests
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/plugin-lifecycle-brittle-tests

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The suppression inventory fails after unrelated line insertions, forcing updates such as #139747 even when no suppression changed.

Why This Change Was Made

Compare each suppression's filename and exact directive text. Ordered array equality preserves all 17 entries and duplicate counts, while the inventory still reports line numbers for diagnostics.

User Impact

No production changes. New or changed directives and unchecked casts still fail. This independent extraction from #135599 changes one test file; production and test LOC deltas are both zero.

Evidence

Both inventory tests, formatting, and fresh independent P2 review passed. An initial local scan hit the existing 120-second deadline under heavy host load. After the concurrent review finished, the identical command passed in 11 seconds without source, deadline, or coverage changes. Exact-head CI remains the landing gate.

@clawsweeper

clawsweeper Bot commented Sep 6, 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 2:49 AM ET / 06:49 UTC.

ClawSweeper review

What this changes

The suppression inventory test compares filenames and directive text without fixed line numbers, preventing unrelated line insertions from failing the check.

Merge readiness

✅ Ready for maintainer review

The change remains useful because current main still compares fixed line numbers. The updated body resolves the previous review’s follow-up, and no actionable patch defect was found. Maintainer-authored, protected work remains open.

Priority: P3
Reviewed head: 1d6309027294077cdeb40c6bedf4a5e5369a179d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, sound test improvement with the prior documentation follow-up resolved and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored change affects only inventory assertions and has no production behavior or material authority change requiring real-setup proof; the reported test runs are supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored change affects only inventory assertions and has no production behavior or material authority change requiring real-setup proof; the reported test runs are supplemental validation.
Evidence reviewed 6 items Verified introduced change: The merge-base-to-head diff changes only the inventory comparison and its expected strings. Ordered equality retains all 17 entries, including three identical directives in one file; both zero-cast assertions remain unchanged.
Current main still has line-sensitive equality: The fetched main revision still compares filename, line number, and directive text, so the proposed maintenance improvement is not already implemented there.
Diagnostic and scanner contracts remain intact: Read the complete test, scanner, and repository-file helper. The scanner retains line numbers, deterministic file/line ordering, AST detection, and existing scan boundaries. This comparison-only patch does not depend on the Codex runtime or protocol.
Findings None None.
Security None None.

How this fits together

OpenClaw’s suppression inventory scans repository TypeScript files for unchecked casts and expected type errors. Its test enforces the allowed directives, while the report supplies locations for diagnostics.

flowchart LR
  A[Repository TypeScript files] --> B[Suppression scanner]
  B --> C[Findings with diagnostic locations]
  C --> D[Reject unchecked casts]
  C --> E[Compare filenames and directive text]
  D --> F[Inventory test result]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the directive inventory strict about filenames, exact text, order, and multiplicity while retaining line numbers solely in diagnostic output.

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

Yes, from source: inserting a line before an existing directive changes the scanner’s location and fails main’s exact comparison despite unchanged directive content; the merged resync provides a concrete prior example. This review did not execute that scenario.

Is this the best way to solve the issue?

Yes. Removing location from equality addresses incidental line drift while preserving directive content, ordering, duplicate counts, and unchecked-cast enforcement.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2a488546aabe.

Labels

Label justifications:

  • P3: This is a bounded test-maintenance improvement that removes sensitivity to unrelated line insertions without changing production behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored change affects only inventory assertions and has no production behavior or material authority change requiring real-setup proof; the reported test runs are supplemental validation.

Evidence

What I checked:

  • Verified introduced change: The merge-base-to-head diff changes only the inventory comparison and its expected strings. Ordered equality retains all 17 entries, including three identical directives in one file; both zero-cast assertions remain unchanged. (test/scripts/type-suppression-inventory.test.ts:64, 1d6309027294)
  • Current main still has line-sensitive equality: The fetched main revision still compares filename, line number, and directive text, so the proposed maintenance improvement is not already implemented there. (test/scripts/type-suppression-inventory.test.ts:72, 2a488546aabe)
  • Diagnostic and scanner contracts remain intact: Read the complete test, scanner, and repository-file helper. The scanner retains line numbers, deterministic file/line ordering, AST detection, and existing scan boundaries. This comparison-only patch does not depend on the Codex runtime or protocol. (scripts/type-suppression-inventory.ts:17, 1d6309027294)
  • Previous follow-up resolved: The captured current body describes only the inventory change and relevant validation, resolving the previous request to remove browser-disclosure and history-fixture claims. It reports both inventory tests passing after a load-related timeout; those runs were not independently repeated. (1d6309027294)
  • Related maintenance and feature history: Main history lists Peter Steinberger’s inventory maintenance and scanner optimizations. The supplied GitHub context verifies fix(test): resync suppression inventory line numbers after #139651 #139747 merged a line-number resync, which repairs one occurrence without preventing recurrence. feat: manage and reload plugins without restarting the Gateway #135599 remains an open umbrella explicitly being split into independent changes. (test/scripts/type-suppression-inventory.test.ts, 5b7e42bc899e)
  • Inspection and validation limits: Source and introduced-diff inspection succeeded, and git diff --check passed with a clean final checkout. GitHub refresh and missing historical/release-object retrieval failed because GitHub DNS resolution was unavailable; no release inclusion or exact source-line introduction is claimed. No tests or target scripts were executed. Supplied checks include failures whose cause is not established here. (1d6309027294)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-06T05:13:40.310Z sha e69d8494668815ff0e91b280ccc3297ddd260fa9 :: blocked before merge. :: none
  • reviewed 2026-09-06T05:49:09.108Z sha 3e0f6f6d8def9817a58c4c70297a37a092a4cb79 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-06T06:27:50.644Z sha 1d63090 :: needs changes before merge. :: none

@steipete
steipete force-pushed the codex/plugin-lifecycle-brittle-tests branch from e69d849 to 8039e58 Compare September 6, 2026 05:16
@steipete
steipete marked this pull request as ready for review September 6, 2026 05:18
@steipete
steipete force-pushed the codex/plugin-lifecycle-brittle-tests branch from 8039e58 to 3e0f6f6 Compare September 6, 2026 05:42
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 6, 2026
@steipete steipete changed the title test: stabilize suppression inventory and browser disclosures test: repair stale fixtures and brittle assertions Sep 6, 2026
@steipete
steipete force-pushed the codex/plugin-lifecycle-brittle-tests branch from 3e0f6f6 to 1d63090 Compare September 6, 2026 06:22
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed app: web-ui App: web-ui gateway Gateway runtime size: S labels Sep 6, 2026
@steipete steipete changed the title test: repair stale fixtures and brittle assertions test: make suppression inventory independent of line numbers Sep 6, 2026
@steipete
steipete merged commit 44b53ff into main Sep 6, 2026
221 of 223 checks passed
@steipete
steipete deleted the codex/plugin-lifecycle-brittle-tests branch September 6, 2026 07:41
@steipete

steipete commented Sep 6, 2026

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

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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