Repository navigation
refactor: consolidate final mechanical audit paths - #125165
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 4:19 AM ET / 08:19 UTC. ClawSweeper reviewWhat this changesThe PR reuses Microsoft Teams lightweight setup and directory artifacts, replaces Nostr’s private limiter with the Plugin SDK limiter, and threads one prepared context through models catalog planning. Merge readinessKeep open. This maintainer-labeled PR is a behavior-neutral consolidation, and current main still has the duplicated models-config preparation; source review found no blocking correctness or security defect. Priority: P3 Review scores
Verification
How this fits togetherBundled channels combine lightweight plugin metadata with transport-specific runtime behavior. The models-config pipeline combines configuration, environment, authentication, and plugin metadata into generated model catalogs, while Nostr ingress rate-limits events before costly handling. flowchart LR
A[Config and environment] --> B[Prepared model context]
B --> C[Generated model catalogs]
D[Teams setup and directory] --> E[Teams channel runtime]
F[Nostr incoming event] --> G[Shared ingress limiter]
G --> H[Validated message handling]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -222, Tests +25. Total -197 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one canonical lightweight setup/directory surface and one prepared models-config context, then merge after exact-head required checks complete. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors established paths rather than reporting a user-visible defect. Is this the best way to solve the issue? Yes. Reusing existing lightweight artifacts and the shared SDK limiter removes parallel ownership without adding a configuration or protocol surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d6b2e14f6333. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for
Known proof gap: no live MSTeams or Nostr provider session was run because this is a behavior-neutral ownership refactor with no external API change. Focused owner-boundary tests verify callback identity and fixed-window rate-limit outcomes. |
|
Merged via squash.
|
What Problem This Solves
Three runtime paths still duplicated ownership that already had a canonical lightweight or SDK surface: Microsoft Teams repeated setup and directory policy in its full channel runtime, models.json preparation rediscovered the same config/workspace/agent/environment/plugin facts at multiple layers, and Nostr retained a private fixed-window limiter beside the Plugin SDK owner.
Why This Change Was Made
msteamsSetupPluginandmsteamsDirectoryContractPlugin, then overlay only full-runtime hooks. This follows the lightweight-descriptor pattern and prevents setup/directory policy drift without making the light artifacts depend on the full channel runtime.openclaw/plugin-sdk/webhook-ingressand delete the private limiter.The Nostr limiter has no user-visible throttling delta: both implementations use the same fixed-window threshold and the same valid production settings. The SDK owner prunes expired keys on a bounded cadence instead of scanning every request; an expired key still starts a fresh window immediately, while the memory-entry metric may retain other expired keys until the next prune interval.
User Impact
No configuration or protocol changes. Microsoft Teams setup/directory behavior and Nostr accept/reject thresholds remain unchanged. Models catalog preparation performs each environmental and plugin-metadata resolution once per entry call.
Production LOC: +102/-353 (net -251) | Tests/test support: +93/-39 (net +54) | Total net: -197
Evidence
pnpm test extensions/msteams/src/channel.test.ts— 33 passedpnpm test extensions/nostr/src/nostr-bus.inbound.test.ts— 29 passedpnpm test src/agents/models-config.write-serialization.test.ts src/agents/models-config.runtime-source-snapshot.test.ts src/agents/models-config.provider-policy-registry.test.ts src/agents/models-config.applies-config-env-vars.test.ts src/agents/models-config.uses-first-github-copilot-profile-env-tokens.test.ts— 53 passed across two shardspnpm check:changed— passed all selected core/core-test/extension/extension-test gates.agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output— clean; no accepted/actionable findingsgit diff --check— clean