Skip to content

fix(irc): drop the never-read mentionPatterns config key - #119356

Merged
obviyus merged 2 commits into
openclaw:mainfrom
ayaangazali:fix/irc-drop-dead-mention-patterns
Aug 28, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
ayaangazali:fix/irc-drop-dead-mention-patterns

Conversation

@ayaangazali

Copy link
Copy Markdown
Contributor

What Problem This Solves

channels.irc.mentionPatterns is accepted by the IRC config schema and read by nothing.

It is declared in two places and never used anywhere else:

  • extensions/irc/src/config-schema.ts:56 - mentionPatterns: z.array(z.string()).optional()
  • extensions/irc/src/types.ts:59 - mentionPatterns?: string[]

A repo-wide search for the key outside those two files returns no reader in extensions/irc/src and none in core. It has been dead since the key was introduced in the original "feat: IRC - add first-class channel support" commit, it is not mentioned in docs/channels/irc.md, and no commit ever wired it into inbound.ts or monitor.ts.

Two things make it worse than a merely unused field.

It cannot work through the core path either. IRC's inbound calls core.channel.mentions.buildMentionRegexes(config as OpenClawConfig) (extensions/irc/src/inbound.ts:287) with no options object, so resolveMentionPatternPolicy never receives a provider and cannot look up channel policy at all.

And the name collides with a different core concept. Core's channels.<channel>.mentionPatterns is the scoping policy object {mode, allowIn, denyIn}, and isMentionPatternsPolicyConfig explicitly rejects arrays. So an operator who copies the documented policy form into IRC gets a validation error, and one who guesses the array form gets silence. Either way the setting does nothing.

Mention patterns for IRC already come from the global mechanism, messages.groupChat.mentionPatterns (and the per-agent agents.entries.*.groupChat.mentionPatterns), which IRC picks up through buildMentionRegexes. So the channel-local key is redundant as well as inert.

Why This Change Was Made

Removing the key is the smaller and more honest fix than wiring a second, IRC-only pattern list that would duplicate the global one.

Because the key was accepted by a shipped schema, removing it alone would turn a loading config into a failing one. Root AGENTS.md requires a matching openclaw doctor --fix migration for exactly that case, so this PR adds one to IRC's existing doctor contract rather than only deleting the field.

The migration extends what is already there instead of introducing a parallel surface. extensions/irc/doctor-contract-api.ts already exported legacyConfigRules and normalizeCompatibilityConfig for the streaming alias migration, so the retired-key rules compose onto that list and the strip runs after the alias normalization on the same config. It uses the shared stripRetiredChannelKeys helper with scope: "root-and-accounts", the same helper Telegram uses for its retired tuning knobs, so root and every accounts.<id> are covered by one call.

Production LOC is net negative on the schema side (two declarations removed) and the config surface shrinks: docs/.generated/config-baseline.counts.json channel count goes 3692 to 3688.

User Impact

channels.irc.mentionPatterns is no longer accepted. An operator who has it set gets a clear message naming the supported replacement, and openclaw doctor --fix removes the key for them at both root and account scope. Nobody loses behavior, because the key never had any.

This is a removed config surface, so it is upgrade-sensitive by nature. The migration is the mitigation, and the proof below walks the exact upgrade path an affected operator hits.

Evidence

All CLI output below is from a full rm -rf dist && pnpm build, so none of it is a stale-dist reading.

Starting config, with the retired key at both scopes:

{ "channels": { "irc": {
  "host": "irc.libera.chat", "nick": "openclaw-bot",
  "mentionPatterns": ["\\bopenclaw\\b"],
  "accounts": { "work": { "nick": "openclaw-ops", "mentionPatterns": ["\\bops\\b"] } } } } }
  1. Config load now refuses it, at both scopes:
- channels.irc: invalid config: must not have additional properties: "mentionPatterns"
- channels.irc.accounts.work: invalid config: must not have additional properties: "mentionPatterns"
  1. openclaw doctor --fix reports both rules:
- channels.irc: channels.irc.mentionPatterns was accepted but never read; configure mention
  patterns with messages.groupChat.mentionPatterns. Run "openclaw doctor --fix".
- channels.irc.accounts: channels.irc.accounts.<id>.mentionPatterns was accepted but never
  read; configure mention patterns with messages.groupChat.mentionPatterns. ...
  1. The key is gone from the file at both scopes, and the surrounding settings survive:
"irc": {
  "host": "irc.libera.chat",
  "nick": "openclaw-bot",
  "accounts": { "work": { "nick": "openclaw-ops", "dmPolicy": "pairing", "groupPolicy": "allowlist" }, ... }
}
  1. openclaw config get channels.irc then loads cleanly.

Worth saying plainly: my first attempt at this migration did not work. I registered the hooks on the channel plugin's doctor: adapter block, and this exact CLI walkthrough showed doctor --fix failing with the same validation error instead of repairing the config. The doctor contract registry loads doctor-contract-api.* from the plugin root (src/plugins/doctor-contract-artifact.ts:18), not that adapter block, so the migration never ran. Moving it to doctor-contract-api.ts is what made step 2 work. Recording it because the schema-only half of this PR would have looked fine in tests while stranding real configs.

Tests: node scripts/run-vitest.mjs extensions/irc gives 20 files / 144 tests passing, including 2 added cases that assert both new rules match only when the key is present and that the strip clears root and account scope while preserving neighboring fields.

Gates: generate-bundled-channel-config-metadata.ts --check clean, check-extension-package-tsc-boundary.mjs exit 0, oxlint clean on the changed files, git diff --check clean. Metadata and config-doc baseline regenerated with the repo generators, not by hand.

AI-assisted: written with AI assistance. I read the schema, the IRC inbound mention path, the core policy resolver, the doctor contract registry, and the existing IRC doctor contract myself, and ran the build, the CLI walkthrough, and the tests locally.

@ayaangazali
ayaangazali marked this pull request as ready for review August 4, 2026 21:56
Copilot AI lite review requested due to automatic review settings August 4, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: irc size: S labels Aug 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 5:54 PM ET / 21:54 UTC.

ClawSweeper review

What this changes

The PR removes IRC’s unused root- and account-level mentionPatterns array setting, migrates saved occurrences with Doctor, and removes the now-obsolete shared schema wrapper.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness finding: this is a coherent owner-boundary repair for an IRC setting that current main accepts but never reads. It remains necessary; a maintainer must accept the intentional Doctor-backed retirement of a previously accepted saved setting before merge.

Priority: P2
Reviewed head: 13c65969953490690a1a132a0668b9ca4e6f8276
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a well-scoped, proof-backed repair with a real compatibility decision still reserved for maintainers.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed production owner is the IRC schema and Doctor contract; supplied built-CLI evidence shows the after-fix sequence from strict rejection through Doctor repair to a successful config read at both scopes, and the final generated-baseline-only commit does not alter that path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed production owner is the IRC schema and Doctor contract; supplied built-CLI evidence shows the after-fix sequence from strict rejection through Doctor repair to a successful config read at both scopes, and the final generated-baseline-only commit does not alter that path.
Evidence reviewed 7 items Current main retains the defect: The fetched main/base schema still accepts the IRC string-array key, while the strict schema applies the same account base to root and named accounts.
Runtime owner does not consume the key: IRC passes only the full configuration to shared mention construction; that resolver reads agent-level or messages.groupChat patterns, not an IRC-local array.
Canonical policy has a different shape: Provider-scoped mention policy is an object and the core schema keeps global group-chat mention patterns as a string array, so retaining an IRC-specific array would preserve a competing inert configuration surface.
Findings None None.
Security None None.

How this fits together

The IRC plugin validates saved channel configuration before receiving inbound messages, while shared mention matching reads agent or global group-chat patterns. Doctor loads the IRC plugin’s compatibility contract to repair retired settings before strict validation.

flowchart LR
A[Saved IRC configuration] --> B[Doctor compatibility contract]
B --> C[Strict IRC schema]
C --> D[IRC inbound message]
D --> E[Shared mention matching]
E --> F[Agent or global group-chat patterns]
Loading

Decision needed

Question Recommendation
Should OpenClaw retire the previously accepted but inert IRC mentionPatterns key through this Doctor-backed compatibility transition rather than continue silently accepting it? Accept the Doctor-backed retirement: Merge the strict-schema removal and targeted migration so affected operators receive a repair path instead of a silently ineffective setting.

Why: The implementation is mechanically sound, but removal changes a shipped configuration contract and requires maintainer intent about the upgrade behavior.

Before merge

  • Resolve merge risk (P1) - Existing IRC configurations containing this formerly accepted key will fail strict validation until Doctor removes it.
  • Resolve merge risk (P1) - Production code grows by net 21 lines for the compatibility migration; that cost is justified only if maintainers accept retiring the inert setting rather than retaining silent acceptance.
Agent review details

Security

None.

PR surface

Source +21, Tests +65, Generated 0. Total +86 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 7 45 24 +21
Tests 4 77 12 +65
Docs 0 0 0 0
Config 0 0 0 0
Generated 3 16 16 0
Other 0 0 0 0
Total 14 138 52 +86

Review metrics

Metric Value Why it matters
Configuration surface 1 removed at root and account scope Previously saved IRC settings require the included Doctor cleanup before strict validation.
Production versus tests production +45/-24 (net +21); tests +77/-12 (net +65); generated +16/-16 The production growth is the compatibility migration and diagnostics; tests cover both removed-key scopes and preservation.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/irc/doctor-contract-api.ts, unknown-data-model-change: extensions/irc/doctor-contract-api.ts, unknown-data-model-change: src/config/bundled-channel-config-metadata.generated.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the Doctor-backed retirement (recommended)
    Approve the removal only with the included migration as the supported upgrade path for saved IRC configurations.
  2. Pause for a compatibility decision
    Keep the PR open if maintainers intend to preserve an accepted IRC-local configuration surface instead.

Technical review

Best possible solution:

Retire the inert IRC key with the current root-and-account Doctor migration, leaving agent and global group-chat mention patterns as the only supported configuration path.

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

Yes at source level: current main accepts the IRC array while inbound mention matching has no reader for it. The supplied built-CLI transcript also demonstrates the fixed strict-validation and Doctor-repair sequence, though this review did not execute contributor code.

Is this the best way to solve the issue?

Yes, conditional on maintainer acceptance of the compatibility transition: deleting the inert local setting and migrating it at the plugin Doctor owner avoids introducing a second mention-pattern source of truth.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The PR fixes a silent but optional IRC configuration failure with limited blast radius.
  • merge-risk: 🚨 compatibility: It removes a previously accepted saved IRC configuration key and changes the upgrade path to require Doctor migration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed production owner is the IRC schema and Doctor contract; supplied built-CLI evidence shows the after-fix sequence from strict rejection through Doctor repair to a successful config read at both scopes, and the final generated-baseline-only commit does not alter that path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the IRC schema and Doctor contract; supplied built-CLI evidence shows the after-fix sequence from strict rejection through Doctor repair to a successful config read at both scopes, and the final generated-baseline-only commit does not alter that path.

Evidence

What I checked:

  • Current main retains the defect: The fetched main/base schema still accepts the IRC string-array key, while the strict schema applies the same account base to root and named accounts. (extensions/irc/src/config-schema.ts:58, 5b605da38946)
  • Runtime owner does not consume the key: IRC passes only the full configuration to shared mention construction; that resolver reads agent-level or messages.groupChat patterns, not an IRC-local array. (extensions/irc/src/inbound.ts:198, 13c659699534)
  • Canonical policy has a different shape: Provider-scoped mention policy is an object and the core schema keeps global group-chat mention patterns as a string array, so retaining an IRC-specific array would preserve a competing inert configuration surface. (src/channels/mention-pattern-policy.ts:47, 13c659699534)
  • Migration is owned and reachable: The IRC Doctor contract detects both scopes and strips only direct retired keys through the shared root-and-accounts helper; the manifest declares config repair and the Doctor flow loads bundled contracts before persisting repairs. (extensions/irc/doctor-contract-api.ts:24, 13c659699534)
  • Focused regression coverage: Tests assert strict rejection at root and account scope plus direct migration, neighbor preservation, and no-op behavior. (extensions/irc/doctor-contract-api.test.ts:63, 13c659699534)
  • History and non-supersession: The substantive repair is d65c9be; its parent/base retains the same relevant IRC schema, inbound, and type blobs. Feature history identifies the original IRC introduction, although this partial clone could not retrieve its historical blob after DNS failed. (extensions/irc/src/config-schema.ts:58, d65c9beae0ba)

Likely related people:

  • steipete: Recent feature history includes IRC Doctor migration, contract refactoring, and channel-account configuration work. (role: recent IRC configuration and Doctor-contract contributor; confidence: high; commits: 4a05a087, 8cb53c7b, 4426f8d; files: extensions/irc/doctor-contract-api.ts, extensions/irc/src/config-schema.ts, src/config/types.irc.ts)
  • Vignesh: The IRC feature history begins with the first-class IRC support commit. (role: original IRC feature contributor; confidence: medium; commits: fa906b26add7; files: extensions/irc/src/config-schema.ts, extensions/irc/src/inbound.ts)
  • ayaangazali: Prior IRC strict-schema work and the current repair commit cover this configuration boundary. (role: recent IRC schema repair contributor; confidence: high; commits: d2c9e747, d65c9beae0ba; files: extensions/irc/src/config-schema.ts, extensions/irc/doctor-contract-api.ts)

Rank-up moves

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

  • Confirm the Doctor-backed retirement policy and wait for required exact-head checks to complete green.

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 (28 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-26T23:52:35.413Z sha f062949c15813b51145bc36875a3697d0c094f35 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T01:43:53.508Z sha e9aa0e5f3d3c4a0c3f90886e98e9860e5caebccd :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T03:51:39.091Z sha 6d13e25f2e35c9faa400845508bc162a2e28d270 :: needs changes before merge. :: [P1] Restore the retired-key change before updating its generated hash
  • reviewed 2026-08-27T05:56:40.436Z sha 6663e65d8278f643a61b8aad69ad88df1782cf39 :: needs changes before merge. :: [P1] Restore the retired-key implementation before updating generated artifacts
  • reviewed 2026-08-28T00:24:36.640Z sha 4fc9550aeed3d3efc117df0638dceb2199595c0c :: needs changes before merge. :: [P1] Restore the retired-key implementation before updating generated artifacts
  • reviewed 2026-08-28T04:33:46.067Z sha 94738a5324b1a1cd23a012bc00f2a8cd3ab354fb :: needs real behavior proof before merge. :: [P1] Restore the retired-key implementation before updating its attestation
  • reviewed 2026-08-28T16:45:09.417Z sha b848596f75527738b7453486b3284d0cadee59c7 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T20:51:17.068Z sha 9f77615016c8b36debb45d45bd8a2b84ef2f42a6 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. and removed 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 Aug 4, 2026
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Fixed, and the finding was right: removing only the extension-local field left src/config/types.irc.ts:60 still exposing channels.irc.mentionPatterns as a string array through ChannelsConfig, so typed callers could emit a value the strict schema now rejects.

The declaration is gone along with its now-unused ChannelMentionPatternsConfig import. I kept the Omit<CommonChannelMessagingConfig, "mentionPatterns" | "replyToMode"> in place rather than removing the key from the omit list, since dropping it there would have made IRC inherit the common mention-patterns policy object, which the schema also does not accept. Omit plus no re-declaration is what actually matches the shipped schema.

Also added the rejection coverage you asked for, in extensions/irc/src/config-schema.test.ts: one case asserting the retired key is refused at both channels.irc.mentionPatterns and channels.irc.accounts.<id>.mentionPatterns, and one asserting the same config still parses once the key is removed, so the test fails if the strictness ever regresses in either direction.

Verification on the rebased head: extensions/irc 20 files / 146 tests passing, tsgo -p tsconfig.core.json clean, tsgo -p test/tsconfig/tsconfig.extensions.test.json clean, check-extension-package-tsc-boundary.mjs exit 0, metadata generator --check clean, git diff --check clean.

Thanks for catching the core half. I had grepped extensions/irc/src and stopped there, which missed the src/config declaration entirely.

@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from 0c72259 to 16ca2da Compare August 4, 2026 23:17
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 4, 2026
@ayaangazali

Copy link
Copy Markdown
Contributor Author

check-dependencies was mine, and it is fixed on the new head.

Root cause: ChannelMentionPatternsConfig in src/config/types.channel-messaging-common.ts existed only to provide the <true> array-sugar variant that IRC used. Retiring the IRC declaration removed its last consumer, so the type was left exported and referenced by nothing, and the Knip export scan in deadcode:dependencies flagged it. Dropping the orphan is the correct completion of the removal rather than a workaround; MentionPatternsPolicyConfig is still imported in that file and still used by the common shape, so only the sugar wrapper went.

Verified locally on the new head:

deadcode:unused-files   -> Knip production and full-tree scans passed with 0 entries
deadcode:dependencies   -> exit 0
tsgo -p tsconfig.core.json -> clean
extensions/irc          -> 146 tests passing

Worth noting this is the second thing the removal pulled with it, after the core types.irc.ts declaration you flagged. Deleting an accepted config key reaches further than the schema file, and both follow-ups came from gates rather than from my own reading, which is a fair signal that I under-scoped the original diff.

@ayaangazali

Copy link
Copy Markdown
Contributor Author

build-artifacts is red here too, and at this point there is enough cross-PR data to be specific rather than hand-wavy about it.

Three of my open PRs are now failing that job, with completely unrelated diffs, all in the same suite with the same errors:

PR what it changes failing suite
#119326 core embedded agent runner history resolver src/tui/tui-pty-local.e2e.test.ts
#119356 (this one) IRC schema/types/doctor plus a core type removal same
#119357 a QQBot slash-command response string same
gateway request timeout for chat.history
gateway request timeout for sessions.create
Test timed out in 150000ms

The failing log for this PR contains zero references to extensions/irc, and tui-pty-local.e2e.test.ts is the only failing file in it.

I also ran that suite locally on the #119326 branch, and it passes 21/21. The durations are the interesting part:

87695ms   83840ms   77887ms   62386ms   57870ms   53942ms

Those are per-test durations on an unloaded local machine against CI's 150000ms cap. The slowest single test is already using about 58% of the budget with nothing competing for the box, so on a contended runner it tips over. That matches the failure signature exactly: timeouts and 30s gateway RPC waits, never an assertion.

To be clear about the premise, since it was raised: build-artifacts is genuinely green on main (runs 30955211486, 30953366239, 30953312453 all success), so this is not pre-existing in the sense of "main is red". It is a timing-marginal suite that passes on a quiet runner and fails on a busy one, which is why it hits PRs and not main pushes.

Not pushing a speculative commit, and I cannot rerun jobs myself (gh run rerun needs admin). A rerun on any one of the three should show it.

The parts of this PR I can verify are green locally: extensions/irc 146 tests, deadcode:unused-files and deadcode:dependencies both clean after the orphaned-type fix, tsgo -p tsconfig.core.json clean, boundary check exit 0.

@ayaangazali

Copy link
Copy Markdown
Contributor Author

Answering rather than pushing, because there is now a clean result that settles this.

The red check here is still pointing at run 30960716338 on the unchanged head 68d78e2d140, which is the same run from yesterday. No newer run had been triggered, so there was nothing new in the log.

The decisive new evidence: #119357 just went build-artifacts = SUCCESS on a rerun, with no change whatsoever to the code that job had been failing on. Same job, same repo, same suite, green on a fresh run. Combined with what I already posted:

  • all failures in that job are src/tui/tui-pty-local.e2e.test.ts, "TUI PTY real backends > with shared Gateway fixture", failing as gateway request timeout for chat.history / sessions.create at timeoutMs: 30000 and Test timed out in 150000ms
  • the identical failure hit three unrelated diffs: this PR (IRC schema and types), fix(agents): honor account-scoped history limits instead of silently ignoring them #119326 (core embedded agent runner), and fix(qqbot): honor the configured upgradeUrl in /bot-upgrade #119357 (a QQBot command string). No single change spans all three
  • extensions/irc appears zero times in this PR's failing log, and that suite is the only failing file in it
  • I ran the suite locally and it passes 21/21, with per-test durations of 87695ms, 83840ms, and 77887ms against the 150000ms cap. One test consuming about 58% of the budget on an idle machine is what tips over on a contended runner

I am deliberately not pushing anything here. This PR is at ready for maintainer look with no outstanding findings, the diff is what you already reviewed, and a commit whose only purpose is to retrigger CI would just churn the head you are looking at. I cannot rerun the job myself (gh run rerun returns "Must have admin rights to Repository"), so a rerun of build-artifacts is the ask.

Worth raising separately: that suite's timing margin will keep producing red on unrelated PRs until it is either given more headroom or split. Happy to file it as its own issue with the numbers above if that is useful rather than noise.

Local state on this head is unchanged and green: extensions/irc 146 tests, deadcode:unused-files and deadcode:dependencies clean, tsgo -p tsconfig.core.json clean, boundary check exit 0.

@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto main (b8f6086411c) — the branch had gone CONFLICTING.

The only conflict was src/config/bundled-channel-config-metadata.generated.ts, which is generated output, so I took main's copy and re-ran the generator rather than hand-merging the JSON blobs:

node --import tsx scripts/generate-bundled-channel-config-metadata.ts --write

Verified after regenerating:

  • the irc entry no longer carries mentionPatterns (this PR's change survived the merge)
  • the other 11 channels that legitimately declare it are untouched
  • scripts/generate-bundled-channel-config-metadata.ts --check exits 0, so the committed output matches what the generator produces

No source changes in this push — the four original commits are unchanged, this is only the merge plus regenerated output. That also puts the PR on a fresh CI run rather than the stale 30960716338 result the checks were still pinned to.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 7, 2026
@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from fdc88bf to f3b782e Compare August 9, 2026 17:08
@clawsweeper clawsweeper Bot added the rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. label Aug 14, 2026
@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch 3 times, most recently from a75c3e2 to 9bfd4e0 Compare August 16, 2026 22:03
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main; the branch was 50 commits behind. Both red checks look environmental rather than ours, and here is the evidence rather than an assertion.

Security High (process-exec-boundary). The job is 289 lines and ends at checkout cleanup, having produced no scan output at all. Its only annotation is:

Debugging artifacts are unavailable since the 'init' Action failed before it could produce any.

So the analysis never started. Across my open PRs the Security High suite runs seven checks each; six pass everywhere, and the single failure lands on a different member per PR with no code annotations. That is an init flake, not a finding.

checks-node-changed-extensions-config-27 and -2. One failure out of 2784: extensions/qa-lab/src/test-file-scenario-command-lifecycle.test.ts > settles within a bound after the leader writes its final result with inherited stdio open, asserting expected true to be false on a POSIX process-lifecycle timing bound. This PR touches only extensions/irc/**, src/channels/plugins/config-schema.test.ts, and the generated config baseline, with zero files under qa-lab, so it cannot reach that path. My change selects that shard, it does not cause the failure.

The rebase re-runs both lanes on a current base. Happy to dig further if either reproduces on the new head.

AI-assisted.

@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from 9bfd4e0 to 58ac975 Compare August 17, 2026 17:16
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 17, 2026
@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch 2 times, most recently from 638fcf2 to 3258367 Compare August 18, 2026 02:32
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (46e44baf460). This branch had picked up the recurring conflict in the generated config baseline (docs/.generated/config-baseline.counts.json and config-baseline.sha256); it is now 0 commits behind and merge-clean.

The baseline was not hand-merged. I reset both generated files to main and re-ran both generators, so the artifacts match what CI regenerates:

node --import tsx scripts/generate-config-doc-baseline.ts --check                  clean
node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check      clean

Local proof at head 3258367188e:

src/cli/config-cli.test.ts   190 passed
extensions/irc                19 files, 145 passed

On the red marks: check-lint, check-lint-core-5 and check-docs are failing here, and I do not believe any of them are this branch. All three die during pnpm install before their actual check step runs (::error::pnpm install failed, then Process completed with exit code 1), with no rule violations or docs drift reported. check-lint and check-lint-core-5 are also currently red on main itself (for example 44b41d5686d). This branch touches no package.json, pnpm-lock.yaml or pnpm-workspace.yaml.

I also think I made that worse: I pushed nine rebases within about a minute, so nine fork CI runs hit dependency install at once. That was my mistake in batching, not a change in the code. Happy to re-push to re-trigger if you would rather see a clean run.

AI-assisted.

@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch 2 times, most recently from dc4ad4f to 7bd9ab5 Compare August 18, 2026 18:16
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 18, 2026
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (0 behind, merge-clean). The remaining checks-node-compact-small-10 red is a harness timeout, and I think I can point at the exact line rather than just calling it flaky.

Failing cases:

FAIL gateway-server src/gateway/server.chat.gateway-server-chat.test.ts > gateway server chat
  > handles chat send and history flows
  > marks a running webchat session failed when restart drain overlaps dispatch rejection
AssertionError: expected +0 to be 1

The assertions are downstream of an unhandled harness error in the same job:

::error file=src/gateway/test-helpers.server.ts,title=Unhandled error,line=673,column=14::Error: timeout
 ❯ Timeout.<anonymous> src/gateway/test-helpers.server.ts:673:14

That is the WebSocket message wait in test-helpers.server.ts, which rejects with a bare Error: timeout on a fixed bound:

// enough to avoid flaky RPC timeouts, but still fail fast when a response
// never arrives.
timeoutMs = 10_000,

The shard recorded the whole file at 32657ms. Locally on this head the same file is 55 passed (55) at about 19s of test time, so a single RPC wait crossing 10s on a loaded 4-vCPU hosted shard is not a stretch. The count assertion then reads +0 because the awaited message never arrived, not because the chat path is wrong.

This branch only deletes the never-read mentionPatterns key from the IRC config surface. It touches nothing under src/gateway.

On the fix shape, I did not want to just push a bigger number. Raising a timeout is one of the things this repo's AGENTS.md explicitly lists as masking a root cause, and timeoutMs here is shared by every gateway test, so widening it changes failure latency across the suite. The load-tolerant-bound or drive-the-lifecycle-deterministically shape suggested in #123653 for the cron equivalent would apply, but that is a shared-harness decision I would rather not make unilaterally inside an unrelated config PR. Happy to open it separately if you want it pursued.

AI-assisted.

@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from 7bd9ab5 to d89fe72 Compare August 18, 2026 22:40
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 18, 2026
@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from d89fe72 to d48b3b2 Compare August 19, 2026 00:10
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (19c916be139), 0 behind and merge-clean.

The check-lint and check-docs red on the previous head was not this branch. Both lanes run oxfmt --check, and it was failing repo-wide on .agents/skills/openclaw-release-validation/SKILL.md, which drifted in with #126055. That is fixed on main now by #126060, so this rebase picks the repair up and those lanes should go green.

Verified at this head, both generated-artifact gates clean and the suites this PR owns passing. Nothing about the change itself moved; same diff, newer base.

AI-assisted.

@ayaangazali
ayaangazali force-pushed the fix/irc-drop-dead-mention-patterns branch from d48b3b2 to cff8393 Compare August 19, 2026 02:37
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (784676537c9), 0 behind and merge-clean.

The jump to ten red checks on the previous head, including check-test-types and check-additional-extension-package-boundary, was a stale base rather than anything in this branch. My earlier rebase landed on main during a window where this was broken:

src/agents/subagents/announce/subagent-announce-direct-delivery.ts(85,5):
error TS2353: Object literal may only specify known properties, and
'resolveGatewayContext' does not exist ...
[tsgo] FAILED (exit 1)

main has since fixed it (#126040 and #126062 bound those dispatches to the Gateway instance, and that file now carries the comment "No resolveGatewayContext: this dispatch is bound to the Gateway instance"). I confirmed the current tip is clean by running the same lane on a pristine checkout of main, which exits 0, and again on this rebased head:

node scripts/run-tsgo-core-test-shards.mjs    exit 0

So this push simply moves the branch past that window. Nothing about the change itself moved; same diff, newer base.

AI-assisted.

@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased head is 0 behind and merge-clean, and the previous batch of red cleared.

The one remaining red, checks-node-compact-large-9, is in src/agents/cli-runner/claude-live-process-approval.test.ts with AssertionError: expected false to be true. This branch deletes the never-read mentionPatterns key from the IRC config surface and touches nothing under src/agents.

Measured at this head:

node scripts/run-vitest.mjs src/agents/cli-runner/claude-live-process-approval.test.ts
11 passed (11)

I could not reproduce it, and there is no path from an IRC config key to the Claude live-process approval flow. Not pushing a speculative change.

AI-assisted.

The IRC schema accepted channels.irc.mentionPatterns and the type declared
it, but nothing in the IRC runtime ever read it, so operators could set a
mention allowlist that silently did nothing.

Restored after an earlier rebase of this branch resolved a conflict in
extensions/irc/src/config-schema.ts in favour of main and reverted the
removal, leaving the PR carrying only generated-baseline churn.
@obviyus

obviyus commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @ayaangazali!

Proof: Exact current main accepts the retired IRC mentionPatterns array at both root and account scope. Exact head 13c659699534 rejects both scopes, Doctor reports and removes both keys, preserves neighboring IRC settings, and then reads the repaired config successfully. The focused IRC suite passes 166 tests.

  • Bug: IRC accepted channels.irc.mentionPatterns, but the IRC runtime never read it, so the setting failed silently.
  • Fix: The strict IRC schema and exported types remove the key, and the IRC Doctor contract migrates saved root and account config to the supported global mention-pattern setting.

Example

Before After
channels.irc.mentionPatterns loads but has no effect. Config loading rejects the retired key, and openclaw doctor --fix removes it from root and account config.

Maintainer decision

  • Ayaan accepts this Doctor-backed compatibility transition.
  • The latest stable and extended-stable tags accept the key, so Doctor migration is required before strict validation.
  • Downgrade is safe because the migration only deletes an inert key; older releases accept the repaired config.

Review metrics

Surface Added Changed Removed Why it matters
Config settings 0 0 1 at root and account scope Existing saved IRC config needs the included Doctor migration.
Generated channel paths 0 0 4 The generated baseline records the strict schema contraction.
Production lines 45 0 24 Net +21 is the required compatibility migration; obsolete schema and wrapper paths are deleted.
Test lines 77 0 12 Net +65 protects strict rejection, both migration scopes, preservation, and the canonical policy schema.
Generated lines 16 0 16 Net zero generator output refresh.

CI attribution

  • Exact-head CI run 33209508745 fails only because five jobs rebuild the same Control UI bundle at 347130-347161 gzip bytes, above the 347037-byte startup limit.
  • The PR changes no ui/ file and removes generated config surface, so it cannot cause this startup growth.
  • Main run 33210478207 fails the same build-artifacts Control UI startup gzip check at 347431 bytes.
  • Breaking base commit: 7d354ce23c4ebd58e10f42cab0a40769cdcb8a66 is the last UI change in the merged base sequence that crossed the shared startup limit.
  • All exact-head type, config metadata, docs, security, lint, and boundary checks passed.

Final gates

  • Fresh exact-head CI run 33213949066 is green after main landed the unrelated Control UI budget repair.
  • Local ClawSweeper passes on 13c659699534: patch correct, zero findings, security cleared, zero owner decisions, and zero Rank-up moves.
  • The latest hosted ClawSweeper move is satisfied: Ayaan accepts the Doctor-backed retirement, and required exact-head checks completed green.

Local verification

node scripts/run-vitest.mjs extensions/irc src/channels/plugins/config-schema.test.ts src/config/zod-schema.core.test.ts
node scripts/run-vitest.mjs src/cli/config-cli.test.ts src/commands/doctor/shared/channel-legacy-config-migrate.test.ts
pnpm test:serial src/plugins/doctor-contract-declarations.test.ts src/plugins/doctor-contract-closure-guard.test.ts
node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check
node --import tsx scripts/generate-config-doc-baseline.ts --check
node --import tsx scripts/check-deadcode-exports.mts
  • Falc0n did not run a local build or typecheck. Exact-head hosted CI passed those lanes, and the PR body retains the successful built-CLI rejection and Doctor migration walkthrough for the byte-identical tree.

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

Labels

channel: irc docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants