feat(enterprise): add workspace resource routes#70
Draft
Gracker wants to merge 1 commit intofeature/enterprise-multi-tenant-legacy-api-wrapperfrom
Draft
feat(enterprise): add workspace resource routes#70Gracker wants to merge 1 commit intofeature/enterprise-multi-tenant-legacy-api-wrapperfrom
Gracker wants to merge 1 commit intofeature/enterprise-multi-tenant-legacy-api-wrapperfrom
Conversation
mr-torto
pushed a commit
to mr-torto/SmartPerfetto
that referenced
this pull request
May 8, 2026
…Gracker#34, Gracker#51, Gracker#70, Gracker#109, Gracker#112) MemoryRootCauseContract folds eight memory-class Spark ideas into one graph contract. Five facets, all optional and provenance-tagged so missing data surfaces explicitly: - ProcessMemorySnapshot[] for RSS / Swap / mm_event / oomScoreAdj (Spark Gracker#11) - LmkKillEvent[] tying kills to oom_score_adj and reason (Spark Gracker#12) - DmaBufAllocation[] for DMA / dmabuf / ion / GPU pressure (Spark Gracker#13) - MemoryExternalArtifact[] for LeakCanary / KOOM / hprof / baseline imports (Spark Gracker#51, Gracker#70, Gracker#109, Gracker#112) - baselineDiff with topContributors[] for the leak baseline diff graph (Spark Gracker#34) Plan: docs/superpowers/spark/plans/14-memory-lmk-dmabuf.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mr-torto
pushed a commit
to mr-torto/SmartPerfetto
that referenced
this pull request
May 8, 2026
…racker#34, Gracker#51, Gracker#70, Gracker#109, Gracker#112) buildMemoryRootCause folds five orthogonal facets (process snapshots, LMK events, DMA/DMABUF allocations, external artifacts, baseline diff) into one MemoryRootCauseContract. baseline.perCategoryBytes is reduced to topContributors[] sorted by absolute delta so the largest-impact category surfaces first regardless of sign (Spark Gracker#34 leak baseline diff graph). Coverage status is computed per facet: LeakCanary external artifacts flip Spark Gracker#51/Gracker#70/Gracker#109 to implemented; KOOM artifacts flip Spark Gracker#112; baselineDiff flips Spark Gracker#34. Missing facets remain scaffolded so the contract honestly records partial coverage. When every facet is omitted, the contract is marked unsupportedReason rather than emitting an empty graph that consumers might mistake for "no memory pressure observed". Tests: 4 cases covering facet pass-through, topContributors ordering, LeakCanary status promotion, and unsupported. Plan: docs/superpowers/spark/plans/14-memory-lmk-dmabuf.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
/api/workspaces/:workspaceId/*Scope note
/api/traces,/api/reports,/api/agent/v1, and/api/v1/providersremain available through the §0.2.5 compatibility wrapper.Deprecationheaders.Verification
cd backend && npx jest src/routes/__tests__/workspaceResourceRoutes.test.ts src/routes/__tests__/requestContextRouteCoverage.test.ts src/routes/__tests__/ownerGuardRoutes.test.ts src/middleware/__tests__/legacyApiCompatibility.test.ts --runInBandcd backend && npx jest src/routes/__tests__/agentRoutesRbac.test.ts src/routes/__tests__/enterpriseApiKeyRoutes.test.ts src/middleware/__tests__/auth.test.ts src/services/__tests__/rbac.test.ts --runInBandcd backend && npm run typecheckcd backend && npm run test:scene-trace-regressionnpm run verify:pr