Repository navigation
feat(615): knowledge & collaboration reads (service-bridge 1.8.0), comment resolve, native label-leak fix - #59
Merged
Conversation
Service-bridge contract 1.8.0 (all CCC code; the bridge stays an id-trusting data plane pinned to the platform's authorized set): - content/pages/list: labelName, lastUpdatedById, created range, topLevel, descendantOf+maxDepth (recurses only through supplied live ids), linksTo/linkedFrom, position sort, creator/last-editor projection - new: pages/ancestors, labels/list, activity/list, spaces/comment-policy - content/search: label/parent/editor/date filters in the candidate SQL, one-row hasMore peek, and an optional service-account leg so OBO results and paging are computed over service ∩ user Also: - POST /api/comments/resolve: original resolve/reopen endpoint (EE-only upstream), app-root seam #4 - PdpLabelRepo (remote mode, seam #1): the native label picker and pages-by-label no longer list labels that exist only on pages the caller cannot view; pagination meta computed after the PDP gate - activity: the CCC audit service also persists a small IP-free allowlist of lifecycle events into Docmost's own `audit` table (reused; no new table) for the activity feed, with retention prune Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Fork side of wiki-v2 issue 615: service-bridge contract 1.8.0 adds the reads that back the new
/v1+ MCP knowledge and collaboration surface. It also adds an original comment-resolve endpoint and fixes the native label-picker leak. Merge this first, then the wiki-v2 super PR bumps the gitlink.Context
wiki-v2 issue 615 gives agents search filters, a page tree, labels, comments, activity and permission introspection. The platform keeps every authorization decision. This fork only serves data for the PDP-authorized id set it is handed (filter-then-retrieve). The full plan and tradeoffs are in the issue 615 "Implementation plan" comment.
Related issues
What changed
content/pages/listlabelName,lastUpdatedById, pages created range,topLevel,descendantOf+maxDepth,linksTo/linkedFrom. Each is pinned to the supplied ids, the workspace and live pages.descendantOfwalks only through supplied live ids and is depth-bounded.positionsort (collate "C",'~'NULL sentinel).content:readroutes:pages/ancestors(ids only; never self or restriction facts),labels/list(withpageCountover the supplied ids),activity/list(a keyset union over pages, page_history, comments, attachments and the Docmostaudittable), andspaces/comment-policy.content/searchhasMorecomes from a one-row peek.searchPagekeeps its native shape.POST /api/comments/resolve(authz/comment-resolution/, app-root seam fix(authz): harden PLATFORM_AUTHZ_TIMEOUT_MS parse (empty/typo → deny-all self-DoS) #4). This is original code; upstream's is EE-only. It checks, in order: live page,validateCanComment, the comment belongs to the page, then top-level only. The write is an idempotent compare-and-set. It updates the inline mark only for inline comments, and emits the ws event, notification and audit event.PdpLabelRepo(remote mode, seam feat(public): anonymous front page + discovery endpoint (wiki-v2 #26) #1, mode-selected like the two existing rebinds). NativePOST /api/labelsand/api/labels/pagesgate through the PDP before pagination, so labels that exist only on pages the caller cannot view are no longer listed.PlatformAuditService(and aStandaloneAuditServicein native mode) also persists an IP-free allowlist into Docmost's ownaudittable: page trashed, restored and moved to space; comment deleted, resolved and reopened. It never throws and has a retention prune. The table already existed, so there is no new schema.How this was tested
AUTHZ_TEST_PG_URL=… npx jest src/authz src/service-bridge src/core/label src/core/comment src/integrations/audit. 1484/1484 tests pass, including real-Postgres specs: new knowledge pg specs, the label repo pg spec, the search pg spec, and the activity writer pg spec.comment.service.spec.ts, can't load an ESM dependency locally and is not in the CI lane.scripts/check-upstream-boundary.shpasses, the platform consumer contract passes 64/64, and the import-boundary, route-inventory and scope-coverage specs are green.scripts/smoke-v1-content.shat 190/190. Curl checks confirmed the native/api/labelsno longer lists a restricted-only label for a reader, and there were real MCP OAuth tool calls.AWS / infra apply
N/A
Checklist
Scope
Tests
Docs & contracts
README/docs// an ADR), or N/A.Safety (this is a security-first, deny-by-default platform)
UPSTREAM_MODIFICATIONS.md); proprietary/authz logic stays out-of-process.Housekeeping
Known limitations / follow-ups
🤖 Generated with Claude Code