Skip to content

test(channels): expose label guard regressions - #207195

Merged
vincentkoc merged 1 commit into
mainfrom
test-channel-label-guard-proof-20261128
Nov 28, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test-channel-label-guard-proof-20261128

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Three label tests pass even when their named guard is removed: the runtime-label test supplies no runtime metadata, the hashtag fixture cannot append an ID, and the existing-ID fixture also triggers a different guard.

User Impact

No product behavior changes. The existing tests now detect unintended runtime labels and duplicate conversation-ID suffixes.

Why This Change Was Made

Seed a scoped runtime catalog and confirm the ID is admitted before checking generated-only label lookup. Give the hashtag case an appendable ID, and remove the competing marker from the existing-ID fixture. Preserve all 12 cases and restore the catalog spy after its case.

Evidence

  • Adding a runtime-label fallback passes the original four ID cases and fails the repaired case; restoring the owner passes all four cases in 25.90 seconds.
  • Removing either conversation-label guard passes the original eight cases and fails the corresponding repaired case. The restored owner passes all eight cases in 1.32 seconds.
  • Scoped format, lint, channel test types and diff checks pass. Independent preservation reviews are clear.
  • Net 16 test lines added; production unchanged.
  • Local ClawSweeper reviewed the complete committed range 501ee91..ba77ffa with no findings.
  • Exact-head native suite and review-artifact validation pass.
  • Exact-head CI 46104106628 and completed-hosted native preparation passed; signed head unchanged.

@vincentkoc vincentkoc self-assigned this Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 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.

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 28, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 28, 2026 03:42
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR strengthens channel-label tests so runtime metadata and overlapping conversation-label guards cannot conceal regressions.

Example: Removing the hashtag guard while resolving #general with From slack:channel:123.

  • Before: The original C123 fixture still passed because its ID was not appendable.
  • After: The revised fixture detects the incorrect #general id:123 result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, focused test repair with appropriate unit-level evidence and no actionable correctness findings.
Proof confidence 🦐 gold shrimp (3/6) No user-visible behavior changes; source inspection, reported guard-mutation checks, and successful exact-head CI are appropriate evidence for these test-fixture repairs.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Existing tests can remain green after regressions introduce runtime-derived approval labels or redundant conversation-ID suffixes.
Reason: Each repaired fixture exposes a distinct credible failure while preserving all existing cases and production behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs three ineffective test fixtures with focused changes and no production regression found; the maintainer-authored guard also applies.

Reviewed head: ba77ffa76630d4123e081259b75616a260a07475

Before merge

None.

Findings

None.

Agent review details

How this fits together

Channel helpers turn message context and channel identifiers into conversation and approval labels; these tests exercise their existing contracts.

flowchart LR
  A[Runtime channel catalog] --> C[Channel ID helpers]
  B[Generated channel metadata] --> C
  C --> D[Approval display labels]
  E[Message context] --> F[Conversation label resolver]
  F --> G[Finalized inbound context]
Loading

Technical review

Best possible solution:

Retain these focused fixture repairs within the existing channel-helper suites.

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

Source inspection confirms all three masking conditions; the PR reports mutation checks showing the original fixtures pass and repaired fixtures fail when their intended guards are broken, but no tests were run during this read-only review.

Is this the best way to solve the issue?

The patch uses existing production owners, independent expected outputs, and scoped cleanup without adding production seams or parallel implementations.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Hashtag conversation-label fixture keeps the original intent (d42ef2a: The original case explicitly protected hashtag labels from appended IDs; the new numeric input makes that stated contract effective.)
  • Existing conversation-ID fixture keeps the original intent (6639bbb: The earlier refactor generalized address-like conversation IDs; removing the competing marker preserves that contract while isolating the contains-ID guard.)
  • Generated-only channel label lookup keeps the original intent (refactor(approvals): simplify resolver plumbing #120923: Approval labels use generated metadata to avoid runtime filesystem discovery while preserving built-in labels and unknown-channel fallback.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff changes only two test files: appendable hashtag input, an existing-ID input without the competing marker, and a scoped runtime catalog spy restored in finally. (src/channels/ids.test.ts:33, ba77ffa76630)
  • Distinct conversation-label guards: Numeric IDs qualify for suffixing; base.includes(id), the existing id: marker, and hashtag prefixes independently suppress it, confirming why both original fixtures masked their named regressions. (src/channels/conversation-label.ts:50, ba77ffa76630)
  • Generated-label ownership: Label lookup reads generated metadata while ID normalization admits runtime catalog entries; refactor(approvals): simplify resolver plumbing #120923 established this split to avoid runtime discovery for approval labels. (src/channels/ids.ts:41, 54ae94530cc8)
  • Current main still has the weaker fixtures: Fetched main retains C123, Family id:room-123@example, and the unseeded runtime-label case, so this test improvement remains distinct work. (src/channels/conversation-label.test.ts:43, b5023a7aaa85)
  • Exact-head CI: The linked pull-request workflow completed successfully for the reviewed head; channel checks, test types, lint, and openclaw/ci-gate also report success. (ba77ffa76630)
  • History inspection limitation: Local historical blob reads failed with lazy fetching disabled; GitHub commit patches supplied the relevant fixture and generated-label provenance instead. (src/channels/ids.ts, 54ae94530cc8)

PR surface

Tests +16. Total +16 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 21 5 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 21 5 +16

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 27, 2026, 11:08 PM ET / November 28, 2026, 04:08 UTC.

@vincentkoc
vincentkoc merged commit 6104e46 into main Nov 28, 2026
200 of 201 checks passed
@vincentkoc
vincentkoc deleted the test-channel-label-guard-proof-20261128 branch November 28, 2026 07:37
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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