Skip to content

refactor: keep Teams allowlist sentinel private - #185484

Merged
shakkernerd merged 1 commit into
mainfrom
msteams-private-unmatchable-sentinel-534
Oct 27, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
msteams-private-unmatchable-sentinel-534

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Microsoft Teams fail-closed allowlist sentinel is live production behavior, but its exported alias exists only so one lifecycle test can name that private representation. That makes the production-only unused-export check report a security-sensitive implementation detail that is not part of the plugin's supported surface.

User Impact

There is no user-visible behavior change. When an authored group or team allowlist cannot be resolved, the in-memory monitor configuration still uses the same reserved @thread.unresolved marker so the allowlist matches nothing. The operator's authored configuration remains unchanged, and wildcard, permission, payload, schema, and public plugin contracts are unaffected.

Why This Change Was Made

The existing module already owns the reserved marker and every production projection that uses it. This change removes only the redundant exported alias and has the sender projection use the same private constant directly. The lifecycle test continues through the real monitor-registration path and now asserts the observed reserved marker as an external value instead of importing production internals solely for the assertion.

The complete change is four insertions and four deletions across the existing owner and lifecycle test. It adds no wrapper, compatibility path, configuration, dependency, or test-only seam.

Evidence

The originating production export scan reported MSTEAMS_UNMATCHABLE_ALLOW_ENTRY while the full-tree scan did not, proving that its only external consumer was test code. Source tracing confirmed that no package entry, plugin barrel, manifest, SDK surface, or production caller exports or imports the alias.

On the exact candidate, remote validation covered changed-file lint and types; the complete monitor lifecycle, allowlist owner, and importing test files; and the production, full-tree, and script unused-export scans. The lifecycle case retained its stored-configuration and no-wildcard controls while observing the exact reserved marker.

Hosted CI and independent review continue on the published head.

@clawsweeper

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

@shakkernerd shakkernerd self-assigned this Oct 27, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: msteams Channel integration: msteams size: XS labels Oct 27, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes a test-only exported Teams allowlist sentinel alias and updates the lifecycle assertion to use its existing value.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is minimal and source-verified with passing exact-head CI; supplied execution evidence is limited to tests rather than a new shipped-entry-point run.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored mechanical refactor is outside the ordinary contributor proof gate; source equivalence preserves the marker, and supplied validation covers the monitor lifecycle with mocked dependencies.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction removes an unnecessary test-facing production export without expanding scope or changing supported contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR is a focused, behavior-preserving cleanup with no actionable findings, and the exact-head CI gate now passes.

Priority: P3
Reviewed head: bee253ad29904fc10489bdede1d906e331492543

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Teams plugin projects configured allowlists into in-memory monitor settings; unresolved restrictions retain a reserved marker so message admission remains restrictive.

flowchart LR
  A[Authored Teams configuration] --> B[Allowlist projection]
  B --> C[Private unresolved marker]
  B --> D[Monitor configuration]
  C --> D
  D --> E[Message admission]
Loading

Technical review

Best possible solution:

Keep the sentinel private in its existing projection owner while retaining the lifecycle and admission regressions.

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

Source tracing verifies the test-only external consumer and identical runtime value; no user-facing bug is claimed or reproduced.

Is this the best way to solve the issue?

This is the smallest complete cleanup: remove the redundant alias, use the existing private constant, and preserve an independently specified lifecycle expectation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Teams unresolved-allowlist marker and lifecycle assertion keeps the original intent (9c7f90a: Keep configured but unresolvable allowlists nonempty and unmatchable so they cannot widen access or fall back to open DM settings.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Agustin Rivera: Raw commit 9c7f90a adds extensions/msteams/src/resolve-allowlist.ts:39 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9c7f90a8cd1f; files: extensions/msteams/src/resolve-allowlist.ts)
  • Peter Steinberger: Raw commit b2adfe1 adds extensions/msteams/src/resolve-allowlist.ts:34 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b2adfe1e4b83; files: extensions/msteams/src/resolve-allowlist.ts)

PR surface

Source -1, Tests +1. Total 0 across 2 files. Added test files: 0.

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

Labels

Label changes:

  • add P3: This removes an unnecessary private implementation export without changing user behavior.
  • 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:

  • P3: This removes an unnecessary private implementation export without changing user behavior.
  • 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 October 27, 2026, 1:21 AM ET / 05:21 UTC.

@shakkernerd
shakkernerd merged commit 59b1ddd into main Oct 27, 2026
103 checks passed
@shakkernerd
shakkernerd deleted the msteams-private-unmatchable-sentinel-534 branch October 27, 2026 05:22
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Simplified: kept the Microsoft Teams fail-closed allowlist sentinel private without changing its restrictive behavior.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…to extended stable (#187286)

* fix(msteams): keep unresolved allowlists restrictive instead of collapsing to open (#184989)

* fix(msteams): keep unresolved allowlists restrictive instead of collapsing to open

* fix(msteams): use a non-access-group deny marker for unresolved sender allowlists

* test(msteams): drop marker-representation test covered by handler regression

* test(msteams): drop projection-plus-route cases duplicated by handler admission table

(cherry picked from commit 9c7f90a)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 25265e4b23843946108fe75d6823cd4e3e64cfd7)

* refactor: keep Teams allowlist sentinel private (#185484)

The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.

(cherry picked from commit 59b1ddd)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 52a8609397572a37ae78544c11118704f8711f12)

* fix(msteams): backport restrictive unresolved allowlists to extended stable

OpenClaw-Publication: 0457935b-4ff7-4cd5-bf04-de5a5e46e7f3

* fix: satisfy focused backport lint requirements (#187286)

Co-authored-by: RomneyDa <[email protected]>

* test: resolve Teams config type from runtime API root

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: Agustin Rivera <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
RomneyDa pushed a commit that referenced this pull request Oct 29, 2026
The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.

(cherry picked from commit 59b1ddd)
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…eadcode after backports (#187570)

* refactor: keep Teams allowlist sentinel private (#185484)

The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.

(cherry picked from commit 59b1ddd)

* test: teach the live-wrapper fake Bun to answer --revision

Partial cherry-pick of the test/scripts/test-live.test.ts hunk only.
#173807 (backported as e72f868) made the CI Bun --revision probe
mandatory; the fake Bun fixture must answer it from the checkout pin.

(cherry picked from commit 08dd80a)

* test(ci): expect watchdog exit 124 from wedged run-tsgo

#184639 (backported as d9a91b5) intentionally changed the run-tsgo
watchdog exit from 1 to 124 so CI collectors stop admitting work. Main
realigned this case in run-tsgo-worktree.test.ts (9b14a38); on the
release branch the same watchdog case lives in run-tsgo.test.ts and was
not realigned by the backport.

* test(vitest): keep gateway database-worker routes in canonical order

The beta.5 adaptation of #178415 (23a2bcd) prepended three
integration proofs to gatewayDatabaseWorkerTestFiles. Canonical project
ownership compares that list against sorted discovery, so the
out-of-order entries failed vitest-cli-ownership. Move them to their
sorted positions; routing membership is unchanged.

* refactor: keep Slack reconnect policy private (#181690)

Keeps Slack reconnect policy details module-private while preserving the exact invalid-auth cutoff, reset, and blocked-status behavior.

(cherry picked from commit cd65901)

* fix: keep retired Telegram throttler release private

Telegram hunk of 09f9ec8 (#183086) only. The release-only test
called the private helper directly; its surviving-alias case is already
asserted through releaseRemovedTelegramAccountThrottler, so drop the
duplicate direct call.

(cherry picked from commit 09f9ec8, partial)

* refactor: keep Claude partial-message measurement private

src/agents/cli-output-stream-limits.ts hunk of 28e2774 (#184686) only;
the backport of #184352 left this export without a consumer.

(cherry picked from commit 28e2774, partial)

* refactor: keep managed plugin cache selector private

src/plugins/management-catalog.ts hunk of 2c0c30b (#185269) only;
the backport of #184921 left this export without a consumer.

(cherry picked from commit 2c0c30b, partial)

* refactor(agents): keep requester settle batch callbacks type private

The backport of #181260 (2f7589a) moved RequesterSettleWakeParams
into the state module, leaving RequesterSettleWakeBatchCallbacks exported
only for a test fixture. Main keeps it module-private; type the fixture
through RequesterSettleWakeParams instead.

* refactor(infra): drop unconsumed streaming UTF-8 decoder

The minimal backport of #180861 (8d3183d) added decodeUtf8Chunks as
a prerequisite, but its main consumers (streaming state-migration
importers) were intentionally not backported, so production Knip flags
it. Remove the export and its unit case; decodeUtf8Input is unchanged.

* refactor(scripts): keep pinned Bun CI detection private

The minimal #172625 backport (e6c3639) deferred the dev-tool,
test-runtime and run-format callers that consume isCiEnvironment on main,
so the export has no consumer on the release branch.

* test(update): drop orphaned recovery version-mismatch fixture

The #185692 backport in 39f9bde removed the last consumer of
recoveryVersionMismatch from update-cli.plugin-convergence.test.ts. Main
removed the same fixture in eae9bc4 (#181717).

* test(gateway): type config removal mocks through inline module imports

The release adaptation of #152052 (41aa7a6, de41770) typed its
partial mocks through type-only namespace imports. Knip treats the
secrets runtime namespace as the only consumer of its exports, so the
full-tree scan reported prepareSecretsRuntimeSnapshotRestore and
SecretResolverWarning as unused. Use main's inline typeof import() form.

* refactor(shared): drop unconsumed async-store helper

The backport of #179213 (6d9852d, plus f3fb0e9 registering it
as a wrapper component) took the runWithAsyncStore helper and its test
without the plugin-instance-invocation consumer, leaving
src/shared/async-store.ts unused in production. Remove the helper, its
test and its wrapper-components entry rather than complete a perf change
during beta stabilization.

* chore(knip): model backported perf scripts and Telegram worker fixture

Mirror main's Knip entries for files added by beta.5 backports:
- scripts/perf/{node-event-session-source-measure.mjs,
  stream-dispatch-scope-measure.ts,system-prompt-report-retention.ts}
  as path-invoked script roots (#183931, #183552, #183010);
- the Telegram ingress context Worker fixture loaded by URL (#178909) in
  production ignoreFiles.
Also register scripts/test-security-mail-parser.mjs, the standalone
nodemailer sender-parsing regression added by #187301 (release-only).

* refactor(doctor): keep dashboard migration guard at the repair boundary

Release adaptation of 50b532d (#183153). The backport of #182345
(51f63cb) exported isUnstampedDashboardRoot only for its unit test.
Main made it private and drove the eligibility cases through
repairLegacyDashboardChatTypes using a canonical-repair fixture this
branch does not carry. Keep every accepted and rejected row case, now
asserted through the repair boundary with the branch's session accessor.

* test(agents): hold requester preparation for the settle capacity case after #181260 backport

Backport 2f7589a (#181260) filters delivered child findings from
settle wakes (needsRequesterSettleFindings), so this delivered-row case
no longer reads the child transcript where it injected worker capacity
and failed with 'expected findTranscriptEvent to be called'. Main
realigned the same case in 411b2e6 (#178104): inject capacity at
captureRequesterSessionEntryCurrent and assert the delivered result is
not repeated in the resumed wake. Apply that realignment; the
'Already delivered child results' wording that main also asserts belongs
to #178104's message change, which this branch does not carry.

(adapted from commit 411b2e6)

---------

Co-authored-by: Shakker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: msteams Channel integration: msteams 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