Skip to content

fix(logging): unblock production lint suppression checks - #166841

Merged
steipete merged 1 commit into
mainfrom
fix/redaction-lint-tail-spd9
Oct 8, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/redaction-lint-tail-spd9

Conversation

@steipete

@steipete steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes main CI's production-suppression allowlist failure after two new method-capture suppressions raised the count from 78 to 80.

User Impact

No user-visible behavior change. Secret-redaction guards keep their existing mutation checks, and the approved suppression allowlist stays unchanged.

Why This Change Was Made

Capture source and exec explicitly instead of destructuring them. The normal type-aware linter accepts those fully typed captures, which preserve property-read order and the original method identity. No casts, reflective probes, rule overrides, or baseline growth are needed. Combining adjacent null/deduplication guards keeps the oversized file within its existing line-count ratchet without changing pattern resolution.

Evidence

  • Linux type-aware oxlint passed for both explicit-capture changes; the final redact.ts cleanup also passed a bounded single-file type-aware lint check on macOS. Linux boundary lint passed on the final files.
  • The unchanged suppression test passed all three cases; existing redaction and mutation/reentrancy tests passed.
  • Production types and all 27 selected core-test type graphs passed.
  • Whole logging (47 files, 676 cases) and secrets (90 files, 778 cases) configurations passed, plus unit-fast partitions 1/4 and 2/4 (7,792 passing cases, 11 existing skips).
  • P2 review found no actionable findings on the final patch.
  • check-changed passed through types and stopped at the inherited unused readRecommendedModels export in scripts/publish-model-catalog.mts; this patch does not change that file or its imports.

Remaining whole-config proof is incomplete: unit-fast partitions 3/4 and 4/4, tooling, Gateway, infra, commands, and agent configurations. Remote capacity and synchronization failures prevented those runs. No required check was disabled, and no tests or assertions were changed.

Linux proof ran on the patch atop 06a1b56f5c9b; the subsequent rebase preserved the reviewed patch bytes. No ordinary CI dispatches or reruns were used.

Use explicit source and exec captures in the prefilter and vendor guards.
This preserves read order and method identity while allowing type-aware
lint to check the code without expanding the approved suppression tail.

Combine adjacent null and deduplication guards in pattern resolution to
keep the existing line-count ratchet without changing resolution behavior.
@clawsweeper

clawsweeper Bot commented Oct 8, 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.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: efbad70996482cb9fd6d678ab5ae89b3cd0425ca
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/logging/redact-pattern-runtime.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/logging/redact.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@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 Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 8:31 PM ET / October 8, 2026, 00:31 UTC.

ClawSweeper review

What this changes

Replace destructured redaction-pattern captures with explicit property reads and simplify pattern deduplication to remove two lint suppressions without changing masking behavior.

Merge readiness

✅ Ready for maintainer review

The patch remains useful: pinned main still contains the two unapproved suppressions. The changes preserve redaction behavior, and no actionable correctness or security defect was found. Maintainer-authored work remains open.

Priority: P3
Reviewed head: efbad70996482cb9fd6d678ab5ae89b3cd0425ca

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving repair with relevant reported validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored patch changes typed captures in the redaction owners without changing their runtime decisions, so the external-contributor proof gate does not apply. Reported lint and regression results are supplemental; no persisted-data contract changes.
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 patch changes typed captures in the redaction owners without changing their runtime decisions, so the external-contributor proof gate does not apply. Reported lint and regression results are supplemental; no persisted-data contract changes.
Evidence reviewed 8 items Pinned introduced patch: The merge-base-to-head delta removes two unbound-method suppression directives, preserves source-before-exec property reads, and combines equivalent null and deduplication conditions.
Mutation safeguards preserved: The prefilter still compares the current source, executor, flags, and replacement hook against their captured identities. Captured methods are compared rather than invoked without a receiver.
Existing regression coverage: The unchanged tests exercise recompiled shared patterns, changed executors, changed replacement hooks, nested calls, and vendor-candidate refresh. These tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

OpenClaw’s redaction layer receives log records and tool text, resolves secret-matching rules, and masks sensitive values before output. Pattern identity guards prevent optimizations from skipping rules whose behavior has changed.

flowchart TD
  A[Logs and tool text] --> B[Resolve redaction patterns]
  C[Configured and built-in rules] --> B
  B --> D[Check pattern identity]
  D --> E[Scan and mask secrets]
  E --> F[Protected output]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3. Total -3 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 2 5 8 -3
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 5 8 -3

Review metrics

None.

Technical review

Best possible solution:

Keep the existing redaction owner and mutation safeguards while satisfying lint through typed property captures, without expanding the suppression baseline.

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

Yes, at source level: pinned main contains two suppression directives absent from the explicit production allowlist. The PR reports the failing gate and subsequent passing validation; this review did not execute it.

Is this the best way to solve the issue?

Yes. Explicit captures preserve property-read order and method identity, and the combined guard preserves null rejection and deduplication without changing policy or widening the baseline.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4f4d61a73b5e.

Labels

Label changes:

  • add P3: This is a focused lint-maintenance repair with equivalent runtime behavior and no demonstrated user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored patch changes typed captures in the redaction owners without changing their runtime decisions, so the external-contributor proof gate does not apply. Reported lint and regression results are supplemental; no persisted-data contract changes.

Label justifications:

  • P3: This is a focused lint-maintenance repair with equivalent runtime behavior and no demonstrated user-facing regression.
  • 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 patch changes typed captures in the redaction owners without changing their runtime decisions, so the external-contributor proof gate does not apply. Reported lint and regression results are supplemental; no persisted-data contract changes.

Evidence

What I checked:

  • Pinned introduced patch: The merge-base-to-head delta removes two unbound-method suppression directives, preserves source-before-exec property reads, and combines equivalent null and deduplication conditions. (src/logging/redact.ts:230, efbad7099648)
  • Mutation safeguards preserved: The prefilter still compares the current source, executor, flags, and replacement hook against their captured identities. Captured methods are compared rather than invoked without a receiver. (src/logging/redact-pattern-runtime.ts:302, efbad7099648)
  • Existing regression coverage: The unchanged tests exercise recompiled shared patterns, changed executors, changed replacement hooks, nested calls, and vendor-candidate refresh. These tests were inspected, not executed during this read-only review. (src/logging/redact.reentrancy.test.ts:149, efbad7099648)
  • Suppression contract: The production-suppression test requires an explicit allowlist that excludes both removed unbound-method suppressions; the PR leaves that allowlist unchanged. (test/scripts/lint-suppressions.test.ts, efbad7099648)
  • Current-main necessity and merge result: Pinned main retains the destructured captures and suppression directives. The test merge’s raw parents are exactly pinned main followed by the PR head, and its comparison against main contains only the intended logging changes. (src/logging/redact-pattern-runtime.ts:302, 671848142584)
  • Recent area history: Recent merged logging history identifies Peter Steinberger’s redaction optimization work at perf(logging): speed up secret redaction for large text #166701. Commit metadata describes preserving mutable-regex behavior. Older blame and patch-history inspection encountered unavailable blobs and HTTP 403 fetch failures, so exact line introduction is not claimed. (src/logging/redact-pattern-runtime.ts, 05e6660fdbc0)

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.

@steipete
steipete enabled auto-merge (squash) October 8, 2026 00:38
@steipete
steipete merged commit 354f940 into main Oct 8, 2026
126 checks passed
@steipete
steipete deleted the fix/redaction-lint-tail-spd9 branch October 8, 2026 00:39
steipete added a commit that referenced this pull request Oct 8, 2026
…essions"

This reverts commit 652d596. #166841 already removed both unbound-method
suppressions, so the added inventory entries made the exact-list test fail.
RomneyDa pushed a commit that referenced this pull request Oct 8, 2026
…166841)

Use explicit source and exec captures in the prefilter and vendor guards.
This preserves read order and method identity while allowing type-aware
lint to check the code without expanding the approved suppression tail.

Combine adjacent null and deduplication guards in pattern resolution to
keep the existing line-count ratchet without changing resolution behavior.

(cherry picked from commit 354f940)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
…penclaw#166841)

Use explicit source and exec captures in the prefilter and vendor guards.
This preserves read order and method identity while allowing type-aware
lint to check the code without expanding the approved suppression tail.

Combine adjacent null and deduplication guards in pattern resolution to
keep the existing line-count ratchet without changing resolution behavior.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
…essions"

This reverts commit 2ed37e8. openclaw#166841 already removed both unbound-method
suppressions, so the added inventory entries made the exact-list test fail.
steipete added a commit that referenced this pull request Oct 8, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
steipete added a commit that referenced this pull request Oct 8, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
steipete added a commit that referenced this pull request Oct 8, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
steipete added a commit that referenced this pull request Oct 8, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
RomneyDa pushed a commit that referenced this pull request Oct 11, 2026
…166841)

Use explicit source and exec captures in the prefilter and vendor guards.
This preserves read order and method identity while allowing type-aware
lint to check the code without expanding the approved suppression tail.

Combine adjacent null and deduplication guards in pattern resolution to
keep the existing line-count ratchet without changing resolution behavior.

(cherry picked from commit 354f940)
steipete added a commit that referenced this pull request Oct 12, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
steipete added a commit that referenced this pull request Oct 13, 2026
Route the trusted-proxy wizard health fixture through the existing database
worker owner, matching the landed fix in 4366b9e. Retain curl's one-second
request deadline while allowing cold PowerShell startup and cleanup to
finish inside a 30-second child watchdog and 60-second test ceiling.

Apply the exact logging cleanup already landed in 354f940 (#166841): retain
property evaluation order and the original exec method while removing two
obsolete suppressions. Production code shrinks by three lines; the
suppression inventory is unchanged.

Validation: wizard 5/5 and focused logging/suppression 103/103 on each of
Node 24 and pinned Bun; native Windows download/cleanup proof passes;
production types, scoped lint, formatting and P2 local review pass.
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed 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