Feature/team rollup reporting#896
Closed
Lanhubs wants to merge 4 commits into
Closed
Conversation
Add comprehensive security tests for step-up middleware proving: - Tokens are bound to user and cannot be used by different users - Tokens are bound to action context and cannot be replayed across endpoints - Tokens are rejected immediately after expiry window (including boundary) - Tokens are single-use and cannot be replayed even within validity window Tests cover: - User binding (4 tests) - Action/context binding (5 tests) - Replay window edge cases (7 tests) - Security attack prevention (7 tests) - Middleware integration (7 tests) Enhanced AuthService to support optional action binding in tokens. Enhanced requireStepUp middleware to extract and validate action context. Fixed existing test file imports for Jest globals compatibility. Added abuseMonitor test helper function for taxonomy tests. Closes Disciplr-Org#739
- Add getTeamRollup(orgId) to src/services/team.ts with single-query CTE that joins teams, vaults, milestones, and memberships under strict org-scoped tenant isolation - Deduplicate vaults shared across teams via ROW_NUMBER partitioning - Compute per-team and org-wide vault counts, capital totals, milestone completion, and slash rates - Wire GET /:orgId/teams/rollup route in src/routes/orgAnalytics.ts with requireOrgRole(owner,admin) auth and rate limiting - Add docs/team-rollup.md documenting rollup shape and isolation guarantees - Add src/tests/team.rollup.test.ts covering zero teams, empty metrics, cross-org leakage prevention, dedup, and slash rate calculation
Remove stray backtick and misplaced closing brace that broke the handler object literal, causing TS1136/TS1005 errors on every subsequent handler entry.
Add 'sessions.cleanup', 'outbox.relay', 'embeddings.reindex' to JOB_TYPES union, JobPayloadByType, and add payload interfaces. Fix broken switch case in isPayloadForJobType (vault.reconcile missing closing paren). Import cleanupExpiredSessions, relayOutboxBatch, and runReindexBatches in handlers.ts.
|
Hey @Lanhubs! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
Contributor
|
thanks for the PR — i couldn't find a linked issue it addresses, and our flow needs each PR tied to an issue you're assigned to. closing for now; open it against an issue you've claimed (add 'Closes #N') and we'll review. https://discord.gg/xvNAvMJf |
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.
No description provided.