Skip to content

feat(ENG-76): add native Slack connections to hosted Cloud - #5651

Draft
lrnt wants to merge 49 commits into
devfrom
feat/eng-76-slack-marketplace
Draft

lrnt wants to merge 49 commits into
devfrom
feat/eng-76-slack-marketplace

Conversation

@lrnt

@lrnt lrnt commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What is this about?

Add OpenWork-managed, read-only Slack search to Cloud, with discovery in Dashboard, connector catalogs, and Library.

What problem does it solve?

Members connect Slack without creating an app or supplying developer credentials. Platform admins can enable selected organizations through existing controls.

What was the situation before?

Configured credentials alone did not make managed Slack available. Members depended on separately configured integrations.

How is this implemented?

  • Add browser-bound personal OAuth, verified workspace identity, rotating grants, and read-only search/thread capabilities.
  • Declare default-off, Cloud-only nativeSlack; reuse organization overrides, deployment defaults, locks, and the emergency stop.
  • Share one personal authorization action and a fixed Den-web callback. Preserve the separate custom-app path and existing connections.
  • Preserve limited access and blocked-account removal. Keep App Home and bot grants separate from member read authority.

What else changed?

  • Regenerate API/SDK, audit and Helm outputs; place unchanged Slack DDL after base migrations.
  • Preserve current Library patterns and newer organization rows when an older admin overview arrives.
  • Add browser input-safety regressions, supported readiness probes, and database-scoped audit checking.

Release note

When your organization enables Slack search, connect your own account to find conversations and read linked excerpts.

Evidence

evals/specs/native-slack-connect.e2e.test.ts — unavailable Slack → selective enablement, discovery, personal consent, isolated reads, and safe account removal.

evals/specs/den-admin-organization-race.e2e.test.ts — late overview erased rows → newer organization rows remain.

Design: P3, P4, P5, P10, P11, S6, C5

lrnt added 15 commits September 30, 2026 15:34
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>
@mintlify

mintlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Oct 14, 2026, 4:35 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Oct 14, 2026 4:36pm UTC
openwork-den Ready Ready Preview Oct 14, 2026 4:36pm UTC
openwork-diagnostics Ready Ready Preview Oct 14, 2026 4:36pm UTC
openwork-landing Ready Ready Preview, v0 Oct 14, 2026 4:36pm UTC

Request Review

Comment thread ee/apps/den-api/src/routes/org/oauth-providers.ts Dismissed
Signed-off-by: Laurent De Marez <laurent@demarez.org>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0872afb
Status: ✅  Deploy successful!
Preview URL: https://78c352d7.openwork.pages.dev
Branch Preview URL: https://feat-eng-76-slack-marketplac.openwork.pages.dev

View logs

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

OpenWork evidence

Status Commit Preview Updated
🟡 Updating evidence 0872afb View run 2026-10-14 16:35:25 UTC

A preview for this commit is being prepared.

diff-warden[bot]
diff-warden Bot previously approved these changes Oct 12, 2026

@diff-warden diff-warden Bot 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.

Warden clearance. Complete security and confidentiality review of 5b246c17e06e75926b3a6a9e4aad0be9e591ad8c found no high or medium security findings and no confidentiality findings. Any new push dismisses this approval. Analysis run

Keep revoked-grant compare-and-set cleanup from dev alongside Slack identity validation, configuration rechecks, and zero-expiry handling. Regenerated API, SDK, Helm and audit outputs remain unchanged.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
@lrnt

lrnt commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Resolved the new dev conflict and pushed ea1ee7c normally. It includes dev through 0a5c000; GitHub reports no merge conflict.

The only textual conflict was token refresh. The resolution preserves both upstream revoked-grant compare-and-set cleanup and Slack's identity/configuration checks, including zero-expiry handling. Live browser/member and locked persistence checks remain intact. A separate read-only safety review found no merge-introduced blocker; it is not a replacement for Warden.

Fresh sequential, cold local tests on this exact merge head, using synthetic providers and disposable databases:

Journey Passed / failed / skipped
pnpm evals:e2e google-revoked-grant --local 1 / 0 / 0
pnpm evals:e2e native-slack-connect --local --engine v1 --surface web 1 / 0 / 0; 37 behavioral checks
pnpm evals:e2e native-slack-connect --local --engine v2 --surface web 1 / 0 / 0; 37 behavioral checks
pnpm evals:e2e den-admin-organization-race --local 1 / 0 / 0; 3 behavioral checks

All exited 0 with placement: local (--local). The Google journey confirms needs_connection after revocation and no retry of the dead grant. Screenshot artifacts remain separate from these functional results.

Also passed: 193 API tests, 25 contract-tooling tests, 9 feature tests, with zero failures/skips; shared-type/database/SDK/web builds; web/app/eval typechecks; eval rules; Helm rendering; and all 704 audit declarations. API/SDK/Helm regeneration produced no drift. The two task-owned disposable services, their volumes, and their private receipt were removed.

Current-head update: Slack and admin-race CI proofs pass; admin-race screenshot review passes. Warden run 38328300242 reports a medium security finding in the admin overview/list request ordering: starting a newer organization read can suppress an older overview 401/403 cleanup when the organization read fails or is aborted. A negative regression and fix are in progress; the finding is not waived. Slack screenshot review and evidence publication remain pending. The protected core journey still needs authorized approval. The PR remains draft. No live Slack connection, production setting, protected approval, PR merge, or force push was used.

lrnt added 2 commits October 13, 2026 15:52
Handle genuine overview 401/403 responses before the stale-data guard, so an aborted or failed newer organization read cannot leave cached admin data visible. Keep stale successful overviews from erasing newer rows.

Reproduced four real denial/transport combinations before the fix. All five focused browser cases and the unchanged Slack V2 journey pass afterward, including client-navigation and reload cache checks.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
Preserve Redis caching for ordinary feature reads while explicit Slack authorization and App Home policy remain database-authoritative. Reproduce and cover stale grants when invalidation fails.

Keep upstream migration 0142 and generate Slack migration 0143 with byte-identical DDL and a combined snapshot. Verify both canonical upgrade paths and fresh bootstrap. Audit coverage stays inside the prepared contract database lifetime.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
@lrnt

lrnt commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Pushed 013af54 normally, including dev through fc48aff. GitHub reports no merge conflict.

Warden finding: reproduced and fixed

The overview's stale-data guard ran before its authorization-denial handlers. A failed or aborted newer organization request could therefore suppress a genuine overview 401/403 and retain cached admin data. The handlers now run first; stale successful overviews still cannot erase newer rows.

Before the product change, the focused suite had 1 passed / 4 failed / 0 skipped. After it, all 5 pass, including both 401/403 × reset/abort combinations and the original late-200 row-preservation case. The tests use actual Den sign-out/admin removal and hold genuine server responses. They also prove that client navigation and full reload cannot restore either admin cache. No fabricated authorization response, weakened assertion, or Warden waiver was used.

Merge safety

  • Keep incoming Redis caching for ordinary feature reads. Explicit Slack authorization uses live database reads, so failed Redis invalidation cannot preserve a revoked grant. A failing regression preceded the fix; all 35 focused Slack/permission/invalidation tests pass and are included in the full API run.
  • Preserve upstream migration 0142; append Slack as 0143_slack_cloud_installations.sql with byte-identical Slack DDL and a generated combined snapshot. Offline history and no-drift checks pass. Disposable upgrade tests from canonical 0141 and 0142, plus a fresh bootstrap, all reach 0143 with exact receipts and zero schema differences. Existing synthetic organization data is preserved. No retained deployment receipts were rewritten.
  • Audit coverage remains inside the prepared contract database's lifetime. API/SDK/Helm/audit outputs were regenerated from merged source.

Final-head verification

Cold local journeys ran sequentially on this exact commit using synthetic providers and task-owned disposable databases. Every command exited 0 and reported placement: local (--local):

Command Passed / failed / skipped
pnpm evals:e2e den-admin-organization-race --local 5 / 0 / 0
pnpm evals:e2e native-slack-connect --local --engine v1 --surface web 1 / 0 / 0
pnpm evals:e2e native-slack-connect --local --engine v2 --surface web 1 / 0 / 0
pnpm evals:e2e google-revoked-grant --local 1 / 0 / 0

Also passed: 261 API tests, 25 contract-tooling tests, 9 feature tests, no failures/skips; shared-type/database/SDK/web builds; web/app/eval typechecks; full eval checks; Helm rendering; all 705 audit declarations. Screenshot artifacts remain separate from functional assertions and need current-head CI judging.

Both task-owned services and their volumes were removed after this head's verification. The PR remains draft.

Warden update: run 38411457713 completed with one high security finding about retired Connect opt-outs and one low confidentiality finding. Exact source comparison with its reviewed base, fc48aff0d, traces the opt-out behavior to upstream #5883 (7fe1289d2); that base's native-provider policy already checks only live organization existence for Google/Microsoft. This PR adds Slack-specific restrictions. No additional Google/Microsoft bypass was identified by the read-only trace, but source attribution is not runtime clearance: preserving or migrating old administrative denies requires maintainer policy review. No waiver or false-positive classification was made.

The confidentiality artifacts provide no item details. Focused independent inspection found no actionable candidate; that count remains unresolved. The protected core journey still requires authorized approval. No live Slack account, production feature setting, PR merge, force push, or approval bypass was used. DESIGN: P1, P4, P10, P11.

lrnt added 3 commits October 13, 2026 16:22
Retain text sign-in and key buttons with wide action slots, while preserving managed Slack consent actions and blocked/limited-access labels. Keep generic sign-in status from duplicating the button label.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
Update the Library sharing journey to open the collapsed custom-app disclosure and use its explicit labels. Retain the real provider sign-in, sharing, and out-of-team isolation assertions; the existing named-connection plugin journey remains unchanged.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
Assert that a member cannot configure the organization's Slack app, then use the supported address flow for the synthetic personal MCP that advertises dynamic OAuth. Preserve the real sign-in, sharing and out-of-team isolation checks and the existing named-connection plugin case.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
@lrnt

lrnt commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Pushed b6ee3b2 normally after merging dev through c3e503f. GitHub reports no merge conflict.

The Library resolution retains upstream readable sign-in/key buttons and wide action slots, plus managed Slack consent actions and blocked/limited-access labels. No security or backend authorization behavior was changed in this follow-up.

The extra sharing regression exposed an obsolete assumption that a member could directly choose the Slack preset. The saved page showed the separate custom-app disclosure and its intentional organization-admin restriction. The test now asserts that restriction, then uses the existing personal-MCP address flow against the synthetic provider that advertises dynamic OAuth. Real sign-in, sharing and out-of-team isolation checks remain; the existing named-connection plugin scenario is unchanged. No product permission was relaxed to make the test pass. One introduced container-text matcher was corrected after its failure was inspected.

Exact-head local journeys

Each command exited 0 with placement: local (--local), ran sequentially in a cold synthetic world, and had no skipped tests:

Command Passed / failed / skipped
pnpm evals:e2e den-library-share --local 2 / 0 / 0
pnpm evals:e2e den-library-row-sign-in --local 1 / 0 / 0
pnpm evals:e2e native-slack-connect --local --engine v1 --surface web 1 / 0 / 0
pnpm evals:e2e native-slack-connect --local --engine v2 --surface web 1 / 0 / 0
pnpm evals:e2e den-admin-organization-race --local 5 / 0 / 0

10 passed / 0 failed / 0 skipped. The Library sign-in journey checks readable controls at desktop and narrow widths, keyboard retry, pending state, real synthetic OAuth, key entry and member isolation. Screenshot artifacts remain separate from functional assertions; new-head CI judging is required.

The merged product also passes 261 API tests and 25 contract-tooling tests with no failures/skips, web/app/eval typechecks, SDK/web builds, full eval rules, Helm rendering, and all 705 audit declarations. Contract regeneration has no drift. The final test-only correction was followed by fresh eval type/rule checks. The migration proof from 013af5464 is unchanged in source; it was not rerun for this Library-only merge.

Both task-owned disposable services and their volumes were removed. The PR remains draft and conflict-free.

Current-head CI/review update: all three functional proofs (Slack, Library sharing and admin-race) and the required-check aggregate pass. Admin-race and Library screenshot reviews pass; Slack screenshot review and evidence publication are still pending.

Warden run 38417887372 completed both reviews on this exact head: zero security findings, one low-severity confidentiality finding. The public artifacts omit the item's text and location. No actionable leak was confirmed by the available local inspections, but the finding is not waived or classified as a false positive. It needs authorized private review.

The protected core journey is waiting on pr-slow-specs; the current account cannot approve that environment. These human gates remain unresolved. No live Slack connection, production setting, PR merge or force push was used. DESIGN: P4, P5, P10, S6, C5.

Remove the added glossary, rollout decisions, research, setup notes, world notes and evidence images. Restore the existing Den web README while retaining required generated API, audit and Helm outputs.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
diff-warden[bot]
diff-warden Bot previously approved these changes Oct 13, 2026

@diff-warden diff-warden Bot 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.

Warden clearance. Complete security and confidentiality review of 2b5b33dac6811698653d6b216f1738e9baad8981 found no high or medium security findings and no confidentiality findings. Any new push dismisses this approval. Analysis run

lrnt added 3 commits October 14, 2026 17:41
Keep the current Library and Activity dashboard, including managed Slack discovery, account actions, limited access and blocked states. Retain fresh authorization and browser ownership checks while using request-shared reads only for listings.

Preserve upstream migrations through 0145 and append only the byte-identical Slack table at 0146, without renaming or dropping retired tables. Regenerate API, SDK, audit and Helm outputs. Replace an unsupported upstream dialog selector with a supported absence assertion.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
Check the closed disclosure, explicitly open it, and assert the custom-app setup label while retaining all catalog entries and the existing Microsoft 365 readiness and member-isolation journey.

Signed-off-by: Laurent De Marez <laurent@demarez.org>
Signed-off-by: Laurent De Marez <laurent@demarez.org>

@diff-warden diff-warden Bot 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.

Warden clearance. Complete security and confidentiality review of 0872afbe804b582c6c4d3a4c604baae3444c43a9 found no high or medium security findings and no confidentiality findings. Any new push dismisses this approval. Analysis run

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-diagnostics with the following error:

Creating the Deployment Timed Out.

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-app with the following error:

Creating the Deployment Timed Out.

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-den with the following error:

Creating the Deployment Timed Out.

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-landing with the following error:

Creating the Deployment Timed Out.

This branch is waiting to be deployed

5 active and 1 waiting deployments
Preview – openwork-den — 0872afbe Deployed Oct 14, 2026 by vercel[bot]
Preview – openwork-app — 0872afbe Deployed Oct 14, 2026 by vercel[bot]
Preview – openwork-landing — 0872afbe Deployed Oct 14, 2026 by vercel[bot]
Preview – openwork-diagnostics — 0872afbe Deployed Oct 14, 2026 by vercel[bot]
staging - packages/docs — 0872afbe Deployed Oct 14, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants