Skip to content

test(plugins): share account policy inheritance fixtures - #139696

Merged
steipete merged 1 commit into
mainfrom
codex/test-audit-policy-case-data
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-audit-policy-case-data

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

Seven channel plugin suites repeat the same account-policy inheritance fixture rows, making the shared regression inputs harder to maintain consistently.

Why This Change Was Made

Provide four fresh literal rows through the existing channel test-helper surface. Each plugin keeps its own schema parsing, host validation, account resolver and assertions. Omitted properties stay omitted; Telegram and Slack's additional cases remain intact. Document the helper's scope.

User Impact

No plugin runtime or policy behavior changes. Net 122 test/support lines removed, with eight documentation lines added. All 41 existing tests remain selected.

Evidence

All seven suites pass 41/41 before and after with identical full test identities. Runtime fixture comparisons preserve values, property absence and fresh nested allocations; expanded-source comparison confirms unchanged callbacks, assertions and extra cases.

The full changed gate passes, including SDK exports/surface, plugin boundaries, core and extension typechecks, dead exports and lint. Docs formatting/MDX checks, diff checks, deslop and final independent P2 review pass. Cache warmth differs between timing samples; no performance improvement is claimed.

@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 docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web size: M maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 03:48
@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 5, 2026, 11:54 PM ET / September 6, 2026, 03:54 UTC.

ClawSweeper review

What this changes

Shares account-policy test fixtures across seven channel plugins while preserving their independent validation and assertions, and documents the helper.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, maintainer-sponsored cleanup that current main has not incorporated. The fixture extraction preserves all seven suites’ inputs, callbacks, assertions, and additional cases; no actionable defect was found.

Priority: P3
Reviewed head: dd137f5035df8a7ba6e3804a1ed543a935147ee9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with verified source equivalence and useful reported validation.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-support cleanup changes no production behavior or authority boundary; reported before/after suite results supplement the verified source equivalence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-support cleanup changes no production behavior or authority boundary; reported before/after suite results supplement the verified source equivalence.
Evidence reviewed 8 items Introduced scope and preserved tests: The complete pinned introduction patch only extracts fixture literals and changes their imports and call sites. A read-only text comparison confirmed identical fixture literals and identical callbacks plus remaining suites for all seven plugins. No target code or tests were executed.
Fresh allocations and unchanged absence semantics: The factory constructs its literal array, nested objects, and allowFrom arrays on each invocation; empty objects remain empty. Each plugin retains its separate omitted-policy assertions, including the additional Slack and Telegram cases.
Repository-local test boundary: The testing guide explicitly identifies these entrypoints as repository-local and unpublished. Package exclusions also omit channel-test-helpers JavaScript and declarations, so this addition does not expand the shipped third-party plugin API.
Findings None None.
Security None None.

How this fits together

Channel account-policy tests check how account settings inherit or override channel settings. Shared fixtures feed each plugin’s schema parser, host validation, and account resolver before plugin-specific assertions check the result.

flowchart LR
  A[Shared policy fixtures] --> B[Plugin schema parsing]
  B --> C[Host config validation]
  C --> D[Plugin account resolver]
  D --> E[Inheritance assertions]
  B --> F[Omitted-field assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -122, Docs +8. Total -114 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 9 68 190 -122
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 76 190 -114

Review metrics

Metric Value Why it matters
Regression coverage retained 41 cases retained; 0 scenarios removed The extraction preserves 28 inheritance cases, seven omitted-field checks, and six additional Slack/Telegram cases.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR implements one bounded batch of the broader test-audit campaign.

Members:

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

Technical review

Best possible solution:

Keep one fresh fixture factory while retaining each plugin’s independent schema, resolver, and policy assertions.

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

Not applicable: this is fixture deduplication, not a reported runtime defect; the repeated inputs and their preservation are directly verifiable from source.

Is this the best way to solve the issue?

Yes: a fresh literal factory removes duplication without centralizing plugin-specific assertions or adding a shipped API.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is low-risk test maintenance with no change to channel runtime behavior.
  • 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: This maintainer-authored test-support cleanup changes no production behavior or authority boundary; reported before/after suite results supplement the verified source equivalence.

Label justifications:

  • P3: This is low-risk test maintenance with no change to channel runtime 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: This maintainer-authored test-support cleanup changes no production behavior or authority boundary; reported before/after suite results supplement the verified source equivalence.

Evidence

What I checked:

  • Introduced scope and preserved tests: The complete pinned introduction patch only extracts fixture literals and changes their imports and call sites. A read-only text comparison confirmed identical fixture literals and identical callbacks plus remaining suites for all seven plugins. No target code or tests were executed. (src/plugin-sdk/test-helpers/channel-config.ts:17, dd137f5035df)
  • Fresh allocations and unchanged absence semantics: The factory constructs its literal array, nested objects, and allowFrom arrays on each invocation; empty objects remain empty. Each plugin retains its separate omitted-policy assertions, including the additional Slack and Telegram cases. (src/plugin-sdk/test-helpers/channel-config.ts:17, dd137f5035df)
  • Repository-local test boundary: The testing guide explicitly identifies these entrypoints as repository-local and unpublished. Package exclusions also omit channel-test-helpers JavaScript and declarations, so this addition does not expand the shipped third-party plugin API. Public docs: docs/plugins/sdk-testing.md. (docs/plugins/sdk-testing.md:22, dd137f5035df)
  • Current main still contains repeated fixtures: The fetched main revision retains Telegram’s inline inheritance rows, while its shared channel-config helper contains only validateTestChannelConfig. The proposed consolidation remains useful. (extensions/telegram/src/account-policy.test.ts:7, 4e330557ae33)
  • Latest release comparison: The supplied latest release, v2026.9.2, also contains only the validation helper at this path; it does not contain the proposed fixture factory. (src/plugin-sdk/test-helpers/channel-config.ts:4, 3928bad9badf)
  • Maintainer campaign and supplied validation: The provided body and Test audit: reduce redundant test code and full-suite runtime #139428 explicitly describe this as a pending, sponsored test-audit batch. They report 41/41 tests before and after, fixture-equivalence checks, and passing local gates, without claiming a runtime speedup. These execution results are contributor-reported, not independently rerun. (dd137f5035df)

Likely related people:

  • Peter Steinberger: Raw commit 596a86f adds src/plugin-sdk/test-helpers/channel-config.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 596a86fa2989; files: src/plugin-sdk/test-helpers/channel-config.ts)

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 merged commit a05f55d into main Sep 6, 2026
256 checks passed
@steipete
steipete deleted the codex/test-audit-policy-case-data branch September 6, 2026 04:01
@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

channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web docs Improvements or additions to documentation 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: M 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